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 91ED9421192 for ; Tue, 31 Jan 2012 00:02:00 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 Sa7oryuKELMl for ; Tue, 31 Jan 2012 00:01:59 -0800 (PST) Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id A9AC6431E64 for ; Tue, 31 Jan 2012 00:01:59 -0800 (PST) Received: by werb10 with SMTP id b10so4626407wer.26 for ; Tue, 31 Jan 2012 00:01:58 -0800 (PST) Received: by 10.216.135.106 with SMTP id t84mr481947wei.21.1327996918422; Tue, 31 Jan 2012 00:01:58 -0800 (PST) Received: from hotblack-desiato.hh.sledj.net (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25]) by mx.google.com with ESMTPS id n5sm60433422wiw.7.2012.01.31.00.01.56 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jan 2012 00:01:57 -0800 (PST) Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) id 6B1AAA02EC; Tue, 31 Jan 2012 08:01:55 +0000 (GMT) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH 2/2] emacs: Don't move to the next thread unless the cursor is at the end of the buffer. Date: Tue, 31 Jan 2012 08:01:54 +0000 Message-Id: <1327996914-9644-3-git-send-email-dme@dme.org> X-Mailer: git-send-email 1.7.8.3 In-Reply-To: <1327996914-9644-1-git-send-email-dme@dme.org> References: <1327996914-9644-1-git-send-email-dme@dme.org> 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 08:02:01 -0000 When using the spacebar to scroll through a thread, hitting 'space' when the bottom of the last message is visible should take the cursor to the end of the buffer rather than immediately archiving the thread and moving to the next thread. --- emacs/notmuch-show.el | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index ec72ff8..3f54de0 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1319,6 +1319,11 @@ current window), advance to the next open message." ;; This is not the last message - move to the next visible one. (notmuch-show-next-open-message)) + ((not (= (point) (point-max))) + ;; This is the last message, but the cursor is not at the end of + ;; the buffer. Move it there. + (goto-char (point-max))) + (t ;; This is the last message - change the return value (setq ret t))) -- 1.7.8.3