From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68046 Path: news.gmane.org!not-for-mail From: Greg Troxel Newsgroups: gmane.emacs.gnus.general Subject: Re: Agent & disconnected IMAP: move messages between folders? Date: Sat, 03 Jan 2009 11:36:15 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1231000591 9093 80.91.229.12 (3 Jan 2009 16:36:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 3 Jan 2009 16:36:31 +0000 (UTC) Cc: ding@gnus.org To: John Owens Original-X-From: ding-owner+M16491=ding+2Daccount=gmane.org@lists.math.uh.edu Sat Jan 03 17:37:40 2009 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1LJ9VL-0007Uj-Jk for ding-account@gmane.org; Sat, 03 Jan 2009 17:37:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1LJ9U6-0003sD-76 for ding-account@gmane.org; Sat, 03 Jan 2009 10:36:22 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1LJ9U4-0003s7-LK for ding@lists.math.uh.edu; Sat, 03 Jan 2009 10:36:20 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1LJ9U1-0001G7-Ek for ding@lists.math.uh.edu; Sat, 03 Jan 2009 10:36:20 -0600 Original-Received: from linuxpal.mit.edu ([18.62.1.14]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1LJ9UH-0004vV-00 for ; Sat, 03 Jan 2009 17:36:33 +0100 Original-Received: by linuxpal.mit.edu (Postfix, from userid 9545) id 6493016E44; Sat, 3 Jan 2009 11:36:15 -0500 (EST) In-Reply-To: (John Owens's message of "Sat, 3 Jan 2009 01:48:03 +0000 (UTC)") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (berkeley-unix) X-Hashcash: 1:20:090103:ding@gnus.org::Gr2DySjloo5OCjFo:00002hvF X-Hashcash: 1:20:090103:john_owens@yahoo.com::QY0z0NO8pUTg8I+j:000000000000000000000000000000000000000002Voe X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68046 Archived-At: John Owens writes: > John Owens yahoo.com> writes: > >> (I read email in the following way: most stuff comes into my >> inbox, I read it, I answer it, I file it into a folder. Thus >> such a capability is useful to me. I am totally willing to hear >> about a more Gnus-y way to handle this, but I don't think >> "auto-filter every message that comes in into its destination" >> is ideal for me, since I get lots of mail that would be hard >> to categorize like that.) > > So I'd like to hear about a more Gnus-y way to do this. The good > thing about Gnus (compared to Wanderlust) is it has a much larger > user community and a much more active developer community. > Disconnected IMAP would seem to be something that would be useful > for lots of people, so I'd suspect that the reason it's not > currently supported (at least this feature) is less "this is a > feature we haven't got to yet" and more "well, people just use Gnus > in this different way that obviates the need for such a feature". > Thoughts? What is the common usage pattern for disconnected IMAP? I've somewhat struggled with the same issue. The gnus-y way is to have mail arrive and leave it there, treating it as read news, and never deleting it. I don't read mail like that either. What I do is filter most of my mail to separate IMAP folders (outside of gnus, at delivery time). Examples are mailing lists, commit messsages per project, plus anything else that I can identify and don't need to know about in a timely manner. Spam scoring N spamassassin points for N >=1 goes to spam.N. Many of these folders I read only with gnus. On some I use total-expire, and most of the rest auto-expire. Then my INBOX gets unfiltered mail, and some of that I file manually (with B m). On other messages I type 'd' which is bound to: (setq gdt-trash-newsgroup "nnimap+[machine-name]:Trash") (defun gdt-gnus-move-to-trash () (interactive) (gnus-summary-move-article nil gdt-trash-newsgroup)) via (add-hook 'gnus-summary-mode-hook (lambda () (local-set-key "d" 'gdt-gnus-move-to-trash))) so I generally keep my INBOX small. This is not gnus-y, but how I want to read mail, and how I can use other IMAP clients against the same mailbox - a lot of the point of sorting is to make looking at INBOX on my phone reasonable. I don't think there is philosophical opposition to disconnected IMAP - it's just hard. Right now the agent seems to be a read-only cache of the server. With disconnected IMAP you keep log of operations to play back later. I don't know whether implementations typically modify the cache or play back the log locally when reading the cache, but I suspect the cache reflects the state with the log operations applied. All of this seems doable, and seems like a natural extension to the agent. You might want to look at the Coda filesystem for inspiration of how to deal with things, but Thunderbird might be more useful. It seems there should be an open-source disconnected-mode IMAP library. I wonder if it's just easier to use an offline IMAP proxy, and if those really support disconnected mode. Before getting to offline IMAP, there are some cache consistency bugs to fix. When I have the agent enabled, I find ghost articles. I suspect that these are from moving the article from a group (message from a folder :-) with another client. So there needs to be some sort of "resynchronize" operation where messages in a folder are listed by UID or something and then removed from the agent cache if gone on the server. Plus any changes made to the server need to be made in the cache. Then a change in architecture so that changes are made to the cache, which makes them locally and then puts them in the playback log, doing them immediately if possible. Full disconnected operation might be really hard, but just having the "B m" operation be supported would be a huge win, since most of what I want to do disconnected is clean up my INBOX: file messages away and delete them (which for me is refile to Trash, with Trash having total-expire).