GNOME Bugzilla – Bug 713986
Support Archive special folder
Last modified: 2016-05-15 07:26:56 UTC
---- Reported by jim@yorba.org 2013-09-16 15:27:00 -0700 ---- Original Redmine bug id: 7492 Original URL: http://redmine.yorba.org/issues/7492 Searchable id: yorba-bug-7492 Original author: Jim Nelson Original description: Some services (i.e. Outlook.com, see #7479) support the notion of an "Archive" folder. This is different than All Mail in that it's not a virtual folder of every message, but rather a catch-bin for the user to drop everything they want to keep once they're done with it in their Inbox. Thunderbird has [some support for this](http://kb.mozillazine.org/Archiving_your_e-mail), although it's complicated by their notion of local-only versus remote folders, as well as an optional date hierarchy that the client automatically generates. For Geary, it's probably sufficient to simply offer support for an Archive folder that the Archive button moves email into. There's an \Archive SPECIAL- USE attribute (#6070), so that should be supported, as well as allowing the user to specify their Archive folder in the Account preferences (#6066). Related issues: related to geary - Feature #7479: Support Outlook.com IMAP (Fixed) related to geary - Feature #6070: Support SPECIAL-USE extension (Open) related to geary - Feature #6066: Geary has no interface for selecting default IMAP Junk/Se... (Open) related to geary - Feature #5338: Archive for non-Gmail servers (Open) --- Bug imported by chaz@yorba.org 2013-11-21 20:24 UTC --- This bug was previously known as _bug_ 7492 at http://redmine.yorba.org/show_bug.cgi?id=7492 Unknown milestone "unknown in product geary. Setting to default milestone for this product, "---". Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one. Resolution set on an open status. Dropping resolution
I'm trying to retrieve the bugzilla issue number of redmine issue #6070. The following search doesn't work: https://bugzilla.gnome.org/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__all__&product=geary&content=yorba-bug-6070 Please help
That's bug #714103.
Created attachment 302793 [details] [review] Adds Archive support for all IMAP accounts Need to detect if the account has a special "Archive" folder to hide/show archive button for Geary.ImapEngine.OtherAccount.
Thanks for the patch! I notice some commented-out code in there. Is this a work-in-progress, or is that just some remnant from testing?
It's a test to detect if there is an "Archive" folder available or not. But I don't even know if it's relevant to do this test, since we create the folder if it doesn't exist. What do you think?
Created attachment 303271 [details] [review] Adds Archive support for all IMAP accounts Ready for review
Review of attachment 303271 [details] [review]: The accounts system is not my area of expertise. I've asked Jim Nelson to take a look at the substance of your patch. In the meantime, I can offer a few style pointers. Feel free to wait for Jim's review before addressing anything. ::: src/engine/imap-engine/other/imap-engine-other-folder.vala @@ +15,3 @@ + // Use move_email_async("Archive") here; Gmail will do the right thing and report + // it was copied with the pre-existing All Mail UID (in other words, no actual copy is + // performed). This allows for undoing an archive with the same code path as a move. I think this comment was mistakenly carried over from the Gmail implementation. @@ +18,3 @@ + Geary.Folder? archive_folder = null; + try { + archive_folder = yield account.get_required_special_folder_async (Geary.SpecialFolderType.ARCHIVE, cancellable); Yorba style is no space between function name and opening paren. @@ +26,3 @@ + debug("Can't archive email because no archive folder was found in %s", account.to_string()); + } else { + stderr.printf (archive_folder.path.get_fullpath (null)); I assume this is a debugging line that can be removed.
Created attachment 303880 [details] [review] Adds Archive support for all IMAP accounts Fixed, now ready for review :-)
Review of attachment 303880 [details] [review]: Unfortunately, I don't have access to an IMAP account that supports Archive to test this. I'm going to assume you do and have tested this out. If so, this looks good to me.
Emersion, thanks for your work! I'm testing your patch on an imap account using dovecot on the server and AFAICS it works perfect. Archiving in Geary worked immediately, while I had to reconfigure the special folder on the server: I think that Geary created an ARCHIVE folder on the server, but I had to manually make it visible and configure it as special folder (I used to use a regular folder for the archive action on the webmail).
I noticed only one minor issue: Geary displays initially an Archive folder under Labels, while getting updates from the server. Then the Archive folder disappears and it appears a new special folder called Archivio (italian locale), right below Outgoing folder. This happens every time Geary is launched and it takes from 30 seconds to 1 minute or more. I've just realized that this happens also with the Spam special folder. I can send you a screenshot of my webmail configuration for special folders. Or maybe some logs privately?
Forget my last comment: I guess it was just a network/sync problem. Today, the sync is fast and the special folders are immediately in the right place. I hope this patch will be merged soon. Thanks
Pushed as 51ecfe0d9. Thanks for seeing this through!