From: Tomi Ollila Date: Mon, 6 Aug 2012 14:29:10 +0000 (+0300) Subject: Re: [PATCH] emacs: Make moving to the previous message move to the previous boundary X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=85cc51d14580ab53ea8d4c9e350263cf0da0095c;p=notmuch-archives.git Re: [PATCH] emacs: Make moving to the previous message move to the previous boundary --- diff --git a/b1/2662367210b2cbe47aa35a45558f59eadb6c55 b/b1/2662367210b2cbe47aa35a45558f59eadb6c55 new file mode 100644 index 000000000..e99883891 --- /dev/null +++ b/b1/2662367210b2cbe47aa35a45558f59eadb6c55 @@ -0,0 +1,113 @@ +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 CCC45431FB6 + for ; Mon, 6 Aug 2012 07:29:01 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 4wl+LICsmT0I for ; + Mon, 6 Aug 2012 07:29:01 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id DA0D5431FAE + for ; Mon, 6 Aug 2012 07:29:00 -0700 (PDT) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id CE58B1002A4; Mon, 6 Aug 2012 17:29:10 +0300 (EEST) +From: Tomi Ollila +To: Austin Clements , notmuch@notmuchmail.org +Subject: Re: [PATCH] emacs: Make moving to the previous message move to the + previous boundary +In-Reply-To: <1342237668-2489-1-git-send-email-amdragon@mit.edu> +References: <1342237668-2489-1-git-send-email-amdragon@mit.edu> +User-Agent: Notmuch/0.13.2+128~g07453d8 (http://notmuchmail.org) Emacs/23.1.1 + (x86_64-redhat-linux-gnu) +X-Face: HhBM'cA~ +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: Mon, 06 Aug 2012 14:29:01 -0000 + +On Sat, Jul 14 2012, Austin Clements wrote: + +> Previously, notmuch-show-previous-message would move to the beginning +> of the message before the message containing point. This patch makes +> it instead move to the previous message *boundary*. That is, if point +> isn't already at the beginning of the message, it moves to the +> beginning of the current message. This is consistent with +> notmuch-show-next-message, which can be thought of as moving to the +> next message boundary. Several people have expressed a preference for +> this. +> --- + +LGTM. Contrary to what I wrote in id:"m2pq746tlq.fsf@guru.guru-group.fi" +I think this could be pushed... + +Tomi + +> This patch accompanies the series in [0] (though they're independent +> and can be applied in either order). This makes the behavior of 'p' +> and 'P' in show-mode conceptually similar to the new behavior of 'p' +> in search-mode. +> +> [0] 1342140319-19859-1-git-send-email-amdragon@mit.edu +> +> emacs/notmuch-show.el | 10 +++++++--- +> 1 file changed, 7 insertions(+), 3 deletions(-) +> +> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +> index 6335d45..02e319f 100644 +> --- a/emacs/notmuch-show.el +> +++ b/emacs/notmuch-show.el +> @@ -1525,9 +1525,11 @@ thread, navigate to the next thread in the parent search buffer." +> (goto-char (point-max))))) +> +> (defun notmuch-show-previous-message () +> - "Show the previous message." +> + "Show the previous message or the start of the current message." +> (interactive) +> - (notmuch-show-goto-message-previous) +> + (if (= (point) (notmuch-show-message-top)) +> + (notmuch-show-goto-message-previous) +> + (notmuch-show-move-to-message-top)) +> (notmuch-show-mark-read) +> (notmuch-show-message-adjust)) +> +> @@ -1587,7 +1589,9 @@ to show, nil otherwise." +> (defun notmuch-show-previous-open-message () +> "Show the previous open message." +> (interactive) +> - (while (and (notmuch-show-goto-message-previous) +> + (while (and (if (= (point) (notmuch-show-message-top)) +> + (notmuch-show-goto-message-previous) +> + (notmuch-show-move-to-message-top)) +> (not (notmuch-show-message-visible-p)))) +> (notmuch-show-mark-read) +> (notmuch-show-message-adjust)) +> -- +> 1.7.10 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch