--- /dev/null
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id DFDD7429E5B\r
+ for <notmuch@notmuchmail.org>; Tue, 31 Jan 2012 09:29:22 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.612\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.612 tagged_above=-999 required=5\r
+ tests=[GAPPY_SUBJECT=1.312, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id nYdwTu3KBJIk for <notmuch@notmuchmail.org>;\r
+ Tue, 31 Jan 2012 09:29:12 -0800 (PST)\r
+Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
+ [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id AFA4E429E25\r
+ for <notmuch@notmuchmail.org>; Tue, 31 Jan 2012 09:29:11 -0800 (PST)\r
+Received: by lahd3 with SMTP id d3so155817lah.26\r
+ for <notmuch@notmuchmail.org>; Tue, 31 Jan 2012 09:29:10 -0800 (PST)\r
+Received: by 10.112.100.200 with SMTP id fa8mr5664250lbb.99.1328030950130;\r
+ Tue, 31 Jan 2012 09:29:10 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw4-fe50f800-253.dhcp.inet.fi.\r
+ [84.248.80.253])\r
+ by mx.google.com with ESMTPS id w8sm17644479lbm.8.2012.01.31.09.29.07\r
+ (version=SSLv3 cipher=OTHER); Tue, 31 Jan 2012 09:29:08 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [RFC PATCH v2] emacs: make show view a/A/x/X key bindings more\r
+ consistent\r
+Date: Tue, 31 Jan 2012 19:29:06 +0200\r
+Message-Id: <1328030946-9793-1-git-send-email-jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.5.4\r
+In-Reply-To: <id:1328022235-8400-1-git-send-email-jani@nikula.org>\r
+References: <id:1328022235-8400-1-git-send-email-jani@nikula.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 31 Jan 2012 17:29:23 -0000\r
+\r
+Modify the show view key bindings as follows to make them more\r
+consistent:\r
+\r
+'a' = Archive current message, then move to next message, or show next\r
+thread from search if at the last message in thread.\r
+\r
+'A' = Archive each message in thread, then show next thread from\r
+search.\r
+\r
+'x' = Archive current message, then move to next message, or exit back\r
+to search results if at the last message in thread.\r
+\r
+'X' = Archive each message in thread, then exit back to search\r
+results.\r
+\r
+The changes make the key bindings more consistent in two ways:\r
+1) 'a'/'A' both advance to the next thread like 'a' used to.\r
+2) 'x' operates on messages and 'X' on threads like 'a'/'A'.\r
+\r
+---\r
+\r
+The original proposal with some discussion is at\r
+http://titanpad.com/SA39EbNezU.\r
+\r
+This v2 is merely a slightly polished version of the original. There\r
+will be no further contributions on the subject from me.\r
+---\r
+ emacs/notmuch-show.el | 28 ++++++++++++++++++++++------\r
+ 1 files changed, 22 insertions(+), 6 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index de9421e..57830b6 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -1075,9 +1075,10 @@ thread id. If a prefix is given, crypto processing is toggled."\r
+ (define-key map "h" 'notmuch-show-toggle-headers)\r
+ (define-key map "-" 'notmuch-show-remove-tag)\r
+ (define-key map "+" 'notmuch-show-add-tag)\r
+- (define-key map "x" 'notmuch-show-archive-thread-then-exit)\r
+- (define-key map "a" 'notmuch-show-archive-message-then-next)\r
++ (define-key map "X" 'notmuch-show-archive-thread-then-exit)\r
++ (define-key map "x" 'notmuch-show-archive-message-then-next-or-exit)\r
+ (define-key map "A" 'notmuch-show-archive-thread-then-next)\r
++ (define-key map "a" 'notmuch-show-archive-message-then-next-or-next-thread)\r
+ (define-key map "N" 'notmuch-show-next-message)\r
+ (define-key map "P" 'notmuch-show-previous-message)\r
+ (define-key map "n" 'notmuch-show-next-open-message)\r
+@@ -1417,7 +1418,8 @@ thread, navigate to the next thread in the parent search buffer."\r
+ \r
+ If a prefix argument is given and this is the last open message\r
+ in the thread, navigate to the next thread in the parent search\r
+-buffer."\r
++buffer. Return t if there was a next open message in the thread\r
++to show, nil otherwise."\r
+ (interactive "P")\r
+ (let (r)\r
+ (while (and (setq r (notmuch-show-goto-message-next))\r
+@@ -1428,7 +1430,8 @@ buffer."\r
+ (notmuch-show-message-adjust))\r
+ (if pop-at-end\r
+ (notmuch-show-next-thread)\r
+- (goto-char (point-max))))))\r
++ (goto-char (point-max))))\r
++ r))\r
+ \r
+ (defun notmuch-show-previous-open-message ()\r
+ "Show the previous open message."\r
+@@ -1645,12 +1648,25 @@ removed)."\r
+ (notmuch-show-add-tag "inbox")\r
+ (notmuch-show-remove-tag "inbox")))\r
+ \r
+-(defun notmuch-show-archive-message-then-next ()\r
+- "Archive the current message, then show the next open message in the current thread."\r
++(defun notmuch-show-archive-message-then-next-or-exit ()\r
++ "Archive the current message, then show the next open message in the current thread.\r
++\r
++If at the last open message in the current thread, then exit back\r
++to search results."\r
+ (interactive)\r
+ (notmuch-show-archive-message)\r
+ (notmuch-show-next-open-message t))\r
+ \r
++(defun notmuch-show-archive-message-then-next-or-next-thread ()\r
++ "Archive the current message, then show the next open message in the current thread.\r
++\r
++If at the last open message in the current thread, then show next\r
++thread from search."\r
++ (interactive)\r
++ (notmuch-show-archive-message)\r
++ (unless (notmuch-show-next-open-message)\r
++ (notmuch-show-next-thread t)))\r
++\r
+ (defun notmuch-show-stash-cc ()\r
+ "Copy CC field of current message to kill-ring."\r
+ (interactive)\r
+-- \r
+1.7.5.4\r
+\r