From: Dmitry Kurochkin Date: Tue, 31 Jan 2012 08:12:50 +0000 (+0400) Subject: Re: [PATCH 2/2] emacs: Don't move to the next thread unless the cursor is at the... X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=8e201c925d33d1aa191742aeca0f455a2bb5267c;p=notmuch-archives.git Re: [PATCH 2/2] emacs: Don't move to the next thread unless the cursor is at the end of the buffer. --- diff --git a/9b/d8aa0d7d7203dc0a7b99e55c5828d2069fecfb b/9b/d8aa0d7d7203dc0a7b99e55c5828d2069fecfb new file mode 100644 index 000000000..f01b56334 --- /dev/null +++ b/9b/d8aa0d7d7203dc0a7b99e55c5828d2069fecfb @@ -0,0 +1,107 @@ +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 7FE4B429E5B + for ; Tue, 31 Jan 2012 00:14:04 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, 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 rpwuZ3WEbnx0 for ; + Tue, 31 Jan 2012 00:14:04 -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 B7D2F429E34 + for ; Tue, 31 Jan 2012 00:14:03 -0800 (PST) +Received: by bke11 with SMTP id 11so2268756bke.26 + for ; Tue, 31 Jan 2012 00:14:02 -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=uIO2PZBqsOjy7Kqo27A5puKa3XYkhHOEK7BS2vE4WFk=; + b=Lkj7hFGSXa9eU7kuNvpB/FvBea5IAYba9SZUcyy8CqcW/vQ3hQv1SiaWuV9yBZJvdH + H7c1iyGZbt/8xpyPWzW5ysT3VI2b/uiZZ9j5tWGGWWxnIsEFSiU3Qt+V32xYlz3nOHjV + oBorc5/4VNN/JOKepPPVzr8ko9ZP/LFoWjvtg= +Received: by 10.205.120.132 with SMTP id fy4mr10371836bkc.23.1327997642462; + Tue, 31 Jan 2012 00:14:02 -0800 (PST) +Received: from localhost ([91.144.186.21]) + by mx.google.com with ESMTPS id bw9sm43429001bkb.8.2012.01.31.00.14.01 + (version=TLSv1/SSLv3 cipher=OTHER); + Tue, 31 Jan 2012 00:14:01 -0800 (PST) +From: Dmitry Kurochkin +To: David Edmondson , notmuch@notmuchmail.org +Subject: Re: [PATCH 2/2] emacs: Don't move to the next thread unless the + cursor is at the end of the buffer. +In-Reply-To: <1327996914-9644-3-git-send-email-dme@dme.org> +References: <1327996914-9644-1-git-send-email-dme@dme.org> + <1327996914-9644-3-git-send-email-dme@dme.org> +User-Agent: Notmuch/0.11+139~gd9b7cab (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-pc-linux-gnu) +Date: Tue, 31 Jan 2012 12:12:50 +0400 +Message-ID: <87bopknvct.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 08:14:04 -0000 + +On Tue, 31 Jan 2012 08:01:54 +0000, David Edmondson wrote: +> 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. +> --- + +I did not notice this change yet, so +0 + +A style comment below. + +> 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))) + +Perhaps `unless' would be better here? + +Regards, + Dmitry + +> + +> (t +> ;; This is the last message - change the return value +> (setq ret t))) +> -- +> 1.7.8.3 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch