Re: [RFC PATCH v2] emacs: make show view a/A/x/X key bindings more consistent
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Tue, 31 Jan 2012 23:17:39 +0000 (03:17 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:43:51 +0000 (09:43 -0800)
0f/1e0564012a42b8d66788d6b5abe260caf0f19a [new file with mode: 0644]

diff --git a/0f/1e0564012a42b8d66788d6b5abe260caf0f19a b/0f/1e0564012a42b8d66788d6b5abe260caf0f19a
new file mode 100644 (file)
index 0000000..f3c7084
--- /dev/null
@@ -0,0 +1,174 @@
+Return-Path: <dmitry.kurochkin@gmail.com>\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 537F7431E64\r
+       for <notmuch@notmuchmail.org>; Tue, 31 Jan 2012 15:18:58 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.513\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.513 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, GAPPY_SUBJECT=1.312, RCVD_IN_DNSWL_LOW=-0.7]\r
+       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 loLwQYu6juM6 for <notmuch@notmuchmail.org>;\r
+       Tue, 31 Jan 2012 15:18:57 -0800 (PST)\r
+Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
+       [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id E225D429E25\r
+       for <notmuch@notmuchmail.org>; Tue, 31 Jan 2012 15:18:56 -0800 (PST)\r
+Received: by bke11 with SMTP id 11so528295bke.26\r
+       for <notmuch@notmuchmail.org>; Tue, 31 Jan 2012 15:18:54 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
+       :mime-version:content-type;\r
+       bh=U9XCxJljR7GbajPVeNGuME+fqMDH6CLx2kZS7lJAuX0=;\r
+       b=RWgGHZoPvxTEBtwEoKbDFeN8U4TZhY1VDbM/HFXXPfcvXvBoEnQ6NeBw9Vn55O047d\r
+       oZlPoEP5OAeUBZYobcq4Ku/KFYI2fl4GwQYgRM3XkUWnPrj5S1mgHJZrTLmmQ9NYTJEX\r
+       2DpY0f0a10CagjQpQ2T4Rikt/p2VNIqhYuiyg=\r
+Received: by 10.204.136.211 with SMTP id s19mr11593301bkt.101.1328051932721;\r
+       Tue, 31 Jan 2012 15:18:52 -0800 (PST)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id cz3sm48678823bkb.3.2012.01.31.15.18.51\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Tue, 31 Jan 2012 15:18:51 -0800 (PST)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
+Subject: Re: [RFC PATCH v2] emacs: make show view a/A/x/X key bindings more\r
+       consistent\r
+In-Reply-To: <1328030946-9793-1-git-send-email-jani@nikula.org>\r
+References: <id:1328022235-8400-1-git-send-email-jani@nikula.org>\r
+       <1328030946-9793-1-git-send-email-jani@nikula.org>\r
+User-Agent: Notmuch/0.11+139~gd9b7cab (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Wed, 01 Feb 2012 03:17:39 +0400\r
+Message-ID: <87sjivmpgs.fsf@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\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 23:18:58 -0000\r
+\r
+On Tue, 31 Jan 2012 19:29:06 +0200, Jani Nikula <jani@nikula.org> wrote:\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
+\r
+Looks good to me.\r
+\r
+Regards,\r
+  Dmitry\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
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r