From: Carl Worth Date: Thu, 5 Nov 2009 01:42:01 +0000 (-0800) Subject: notmuch.el: Don't require an extra press of space bar before archiving. X-Git-Tag: 0.1~570 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=22adeeaab79f33f8aaaefe2a86f665dc32756065;p=notmuch.git notmuch.el: Don't require an extra press of space bar before archiving. I had implemented this intentionally originally, thinking that it would be important to see the last message scroll all the way off screen before the next press of the magic space bar would go and archive away the whole thread. But in practice, that just turns out to be annoying, (especially for a long sequence of single-message threads where the space bar has to be pressed twice for every one). It's actually quite easy to know if it's "safe" to press the space bar expecting just a scroll instead of an archive by simply looking down and seeing if the current window is full. And as for the total lack of undo with all of this, I'm getting by by simply using x to get back to the search view, and then going back into the thread of interest. --- diff --git a/notmuch.el b/notmuch.el index cd5c8964..8f0852b4 100644 --- a/notmuch.el +++ b/notmuch.el @@ -358,11 +358,10 @@ which this thread was originally shown." (unread (notmuch-show-message-unread-p))) (if (> next (window-end)) (scroll-up nil) - (if unread - (notmuch-show-mark-read-then-next-open-message) - (if (notmuch-show-last-message-p) - (notmuch-show-archive-thread) - (notmuch-show-next-open-message)))))) + (let ((last (notmuch-show-last-message-p))) + (notmuch-show-mark-read-then-next-open-message) + (if last + (notmuch-show-archive-thread)))))) (defun notmuch-show-markup-citations-region (beg end) (goto-char beg)