[PATCH] emacs: when archiving move the cursor depending on the sort order.

Subject: [PATCH] emacs: when archiving move the cursor depending on the sort order.

Date: Tue, 13 Apr 2010 09:04:55 -0400

To: notmuch

Cc:

From: Servilio Afre Puentes


The current hardcoded behaviour will not take you to the next unread
thread when the sort order is set to newer-first from the default of
older-first.

Signed-off-by: Servilio Afre Puentes <servilio@gmail.com>
---
 emacs/notmuch.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 517c53a..728aa2b 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -572,7 +572,9 @@ thread or threads in the current region."
 This function advances the next thread when finished."
   (interactive)
   (notmuch-search-remove-tag-thread "inbox")
-  (forward-line))
+  (if notmuch-search-oldest-first
+      (forward-line)
+    (previous-line)))

 (defun notmuch-search-process-sentinel (proc msg)
   "Add a message to let user know when \"notmuch search\" exits"
-- 
1.7.0.4

Thread: