Re: [notmuch] [PATCH] Simplify unread tag handling in emacs UI.
On Wed, 24 Feb 2010 14:20:27 -0500, Jameson Rollins jroll...@finestructure.net wrote: On Wed, 24 Feb 2010 10:26:47 -0800, Carl Worth cwo...@cworth.org wrote: It then checks the unread status in order to decide whether to proceed to the next again. So with your patch notmuch-show-next-unread-message will skip through all messages in a thread thinking they are all read (and actually marking all as read). ...that seems like a fatal bug in this script. Thanks for noting that Sebastian. I certainly don't see it as fatal, but it is something we should resolve. I think the simplification that the patch provides is worth it. Well, it is fatal in the sense that it makes that function useless. But it's not as bad as it is currently unused. You will only notice it if you make the skip to next unread (interactive) and bind it to a key (which is what I have done). I still think it's worth taking this patch and fixing it then. The solutions I can see are: - split into a notmuch-show-next-message and a notmuch-show-show-next-message (what a naming!) function. One would merely skip to the next and one actually show and mark unread. - Introduce a second argument option whether we should mark as unread or not. - rework notmuch-show-next-unread-message to not make use of notmuch-show-next-message but e.g. to just use notmuch-show-find-next-message or so. Does this make any sense? I'm seeing the notmuch-show-next-unread-message as a non-interactive function that's not currently called by any other functions, and is therefore not being used. Sebastian, are you using that in a private function, or am I misreading the code? Touché. As explained above. I made it interactive and bound it to 'n'. Sebastian ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [notmuch] [PATCH] Simplify unread tag handling in emacs UI.
On Wed, 17 Feb 2010 14:33:11 +0100, Sebastian Spaeth sebast...@sspaeth.de wrote: On Tue, 19 Jan 2010 17:54:16 -0500, Jameson Rollins jroll...@finestructure.net wrote: This patch is intended to greatly simplify the handling of the unread tag in the emacs UI. This patch adds a new function 'notmuch-show-mark-read', that removes the unread tag in notmuch-show-mode. This function is then executed as a notmuch-show-hook, and by notmuch-show-next-message. All of the functions that explicitly marked messages as unread are removed or renamed. Hi Jameson, Thanks for contributing the patch. This exact feature, (removing all commands with and mark read in their names), has been on my todo list for too long, and I'm anxious to remove it from that. But... It then checks the unread status in order to decide whether to proceed to the next again. So with your patch notmuch-show-next-unread-message will skip through all messages in a thread thinking they are all read (and actually marking all as read). ...that seems like a fatal bug in this script. Thanks for noting that Sebastian. I'm very interested in augmenting the test suite such that we could write emacs-based tests that would capture this bug. It seems that with the --batch, --load, and --funcall options it shouldn't be too hard to write a modular function exercising emacs code and then execute it no-interactively. Then we could either inspect the state of the database to ensure the operation worked as desired, or else have the test function write a buffer out to a file and test that the file has the desired contents. So that's something I'll be working on soon. And of course, I'll always be glad to accept any help. -Carl pgpTZCas7ktU0.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [notmuch] [PATCH] Simplify unread tag handling in emacs UI.
On Wed, 24 Feb 2010 10:26:47 -0800, Carl Worth cwo...@cworth.org wrote: On Wed, 17 Feb 2010 14:33:11 +0100, Sebastian Spaeth sebast...@sspaeth.de wrote: On Tue, 19 Jan 2010 17:54:16 -0500, Jameson Rollins jroll...@finestructure.net wrote: This patch is intended to greatly simplify the handling of the unread tag in the emacs UI. This patch adds a new function 'notmuch-show-mark-read', that removes the unread tag in notmuch-show-mode. This function is then executed as a notmuch-show-hook, and by notmuch-show-next-message. All of the functions that explicitly marked messages as unread are removed or renamed. Thanks for contributing the patch. This exact feature, (removing all commands with and mark read in their names), has been on my todo list for too long, and I'm anxious to remove it from that. But... It then checks the unread status in order to decide whether to proceed to the next again. So with your patch notmuch-show-next-unread-message will skip through all messages in a thread thinking they are all read (and actually marking all as read). ...that seems like a fatal bug in this script. Thanks for noting that Sebastian. I certainly don't see it as fatal, but it is something we should resolve. I think the simplification that the patch provides is worth it. I'm seeing the notmuch-show-next-unread-message as a non-interactive function that's not currently called by any other functions, and is therefore not being used. Sebastian, are you using that in a private function, or am I misreading the code? jamie. pgpGEJw3EvCA3.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [notmuch] [PATCH] Simplify unread tag handling in emacs UI.
On Tue, 19 Jan 2010 17:54:16 -0500, Jameson Rollins jroll...@finestructure.net wrote: This patch is intended to greatly simplify the handling of the unread tag in the emacs UI. This patch adds a new function 'notmuch-show-mark-read', that removes the unread tag in notmuch-show-mode. This function is then executed as a notmuch-show-hook, and by notmuch-show-next-message. All of the functions that explicitly marked messages as unread are removed or renamed. Hi Jameson, I've been using this for quite some time now and I am pretty happy with it. However, there is a problem with this approach as this renders the function notmuch-show-next-unread-message useless. This proceeds to the next message, using notmuch-show-next-message, which your patch marks automatically as read. It then checks the unread status in order to decide whether to proceed to the next again. So with your patch notmuch-show-next-unread-message will skip through all messages in a thread thinking they are all read (and actually marking all as read). Sebastian ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [notmuch] [PATCH] Simplify unread tag handling in emacs UI.
On Wed, 17 Feb 2010 14:33:11 +0100, Sebastian Spaeth sebast...@sspaeth.de wrote: I've been using this for quite some time now and I am pretty happy with it. However, there is a problem with this approach as this renders the function notmuch-show-next-unread-message useless. This proceeds to the next message, using notmuch-show-next-message, which your patch marks automatically as read. It then checks the unread status in order to decide whether to proceed to the next again. So with your patch notmuch-show-next-unread-message will skip through all messages in a thread thinking they are all read (and actually marking all as read). Hey, Sebastian. I'm glad you've been finding the patch useful. I'd be happy to look at improving it, or of course accepting patch. I was hoping Carl might process these patch first, in which case it would be easier to know what any improvements might look like. I'll send a separate email to ping Carl about that. jamie. pgpUtKyn99VO1.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch