Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 537F7431E64 for ; Tue, 31 Jan 2012 15:18:58 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.513 X-Spam-Level: X-Spam-Status: No, score=0.513 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, GAPPY_SUBJECT=1.312, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id loLwQYu6juM6 for ; Tue, 31 Jan 2012 15:18:57 -0800 (PST) Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id E225D429E25 for ; Tue, 31 Jan 2012 15:18:56 -0800 (PST) Received: by bke11 with SMTP id 11so528295bke.26 for ; Tue, 31 Jan 2012 15:18:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type; bh=U9XCxJljR7GbajPVeNGuME+fqMDH6CLx2kZS7lJAuX0=; b=RWgGHZoPvxTEBtwEoKbDFeN8U4TZhY1VDbM/HFXXPfcvXvBoEnQ6NeBw9Vn55O047d oZlPoEP5OAeUBZYobcq4Ku/KFYI2fl4GwQYgRM3XkUWnPrj5S1mgHJZrTLmmQ9NYTJEX 2DpY0f0a10CagjQpQ2T4Rikt/p2VNIqhYuiyg= Received: by 10.204.136.211 with SMTP id s19mr11593301bkt.101.1328051932721; Tue, 31 Jan 2012 15:18:52 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id cz3sm48678823bkb.3.2012.01.31.15.18.51 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jan 2012 15:18:51 -0800 (PST) From: Dmitry Kurochkin To: Jani Nikula , notmuch@notmuchmail.org Subject: Re: [RFC PATCH v2] emacs: make show view a/A/x/X key bindings more consistent In-Reply-To: <1328030946-9793-1-git-send-email-jani@nikula.org> References: <1328030946-9793-1-git-send-email-jani@nikula.org> User-Agent: Notmuch/0.11+139~gd9b7cab (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Wed, 01 Feb 2012 03:17:39 +0400 Message-ID: <87sjivmpgs.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2012 23:18:58 -0000 On Tue, 31 Jan 2012 19:29:06 +0200, Jani Nikula wrote: > Modify the show view key bindings as follows to make them more > consistent: > > 'a' = Archive current message, then move to next message, or show next > thread from search if at the last message in thread. > > 'A' = Archive each message in thread, then show next thread from > search. > > 'x' = Archive current message, then move to next message, or exit back > to search results if at the last message in thread. > > 'X' = Archive each message in thread, then exit back to search > results. > > The changes make the key bindings more consistent in two ways: > 1) 'a'/'A' both advance to the next thread like 'a' used to. > 2) 'x' operates on messages and 'X' on threads like 'a'/'A'. > > --- > > The original proposal with some discussion is at > http://titanpad.com/SA39EbNezU. > > This v2 is merely a slightly polished version of the original. There > will be no further contributions on the subject from me. > --- Looks good to me. Regards, Dmitry > emacs/notmuch-show.el | 28 ++++++++++++++++++++++------ > 1 files changed, 22 insertions(+), 6 deletions(-) > > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el > index de9421e..57830b6 100644 > --- a/emacs/notmuch-show.el > +++ b/emacs/notmuch-show.el > @@ -1075,9 +1075,10 @@ thread id. If a prefix is given, crypto processing is toggled." > (define-key map "h" 'notmuch-show-toggle-headers) > (define-key map "-" 'notmuch-show-remove-tag) > (define-key map "+" 'notmuch-show-add-tag) > - (define-key map "x" 'notmuch-show-archive-thread-then-exit) > - (define-key map "a" 'notmuch-show-archive-message-then-next) > + (define-key map "X" 'notmuch-show-archive-thread-then-exit) > + (define-key map "x" 'notmuch-show-archive-message-then-next-or-exit) > (define-key map "A" 'notmuch-show-archive-thread-then-next) > + (define-key map "a" 'notmuch-show-archive-message-then-next-or-next-thread) > (define-key map "N" 'notmuch-show-next-message) > (define-key map "P" 'notmuch-show-previous-message) > (define-key map "n" 'notmuch-show-next-open-message) > @@ -1417,7 +1418,8 @@ thread, navigate to the next thread in the parent search buffer." > > If a prefix argument is given and this is the last open message > in the thread, navigate to the next thread in the parent search > -buffer." > +buffer. Return t if there was a next open message in the thread > +to show, nil otherwise." > (interactive "P") > (let (r) > (while (and (setq r (notmuch-show-goto-message-next)) > @@ -1428,7 +1430,8 @@ buffer." > (notmuch-show-message-adjust)) > (if pop-at-end > (notmuch-show-next-thread) > - (goto-char (point-max)))))) > + (goto-char (point-max)))) > + r)) > > (defun notmuch-show-previous-open-message () > "Show the previous open message." > @@ -1645,12 +1648,25 @@ removed)." > (notmuch-show-add-tag "inbox") > (notmuch-show-remove-tag "inbox"))) > > -(defun notmuch-show-archive-message-then-next () > - "Archive the current message, then show the next open message in the current thread." > +(defun notmuch-show-archive-message-then-next-or-exit () > + "Archive the current message, then show the next open message in the current thread. > + > +If at the last open message in the current thread, then exit back > +to search results." > (interactive) > (notmuch-show-archive-message) > (notmuch-show-next-open-message t)) > > +(defun notmuch-show-archive-message-then-next-or-next-thread () > + "Archive the current message, then show the next open message in the current thread. > + > +If at the last open message in the current thread, then show next > +thread from search." > + (interactive) > + (notmuch-show-archive-message) > + (unless (notmuch-show-next-open-message) > + (notmuch-show-next-thread t))) > + > (defun notmuch-show-stash-cc () > "Copy CC field of current message to kill-ring." > (interactive) > -- > 1.7.5.4 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch