From: Dmitry Kurochkin Date: Tue, 31 Jan 2012 08:24:27 +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=d49939fd0a9fbb23bbaf620f00f826b0e22db90a;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/67/a4bc75a33c2c742f3cbedaa963cc3f25e96ce9 b/67/a4bc75a33c2c742f3cbedaa963cc3f25e96ce9 new file mode 100644 index 000000000..c792029d5 --- /dev/null +++ b/67/a4bc75a33c2c742f3cbedaa963cc3f25e96ce9 @@ -0,0 +1,121 @@ +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 537B5429E34 + for ; Tue, 31 Jan 2012 00:25:47 -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 PQi8AoQPDUnq for ; + Tue, 31 Jan 2012 00:25:46 -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 8605B431E64 + for ; Tue, 31 Jan 2012 00:25:46 -0800 (PST) +Received: by bke11 with SMTP id 11so2276244bke.26 + for ; Tue, 31 Jan 2012 00:25:45 -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=oha9sH6fopClXRnD8kIgbDt1DvmCCZss5LxVp2+xnjg=; + b=MrjcOWgeGhEqIG41njW1VGTgBy2XC2TafFZ8qX6VO8gfz8FOklok0PS7j/HtrKP2di + /9qXmJkSHpr7JvVHR5fhz8pD5Ww0HObS70adpN0b11xCm335yZeURc+8zrUEbNBI9Fd2 + tfnihs92KLNV/QtXpNAndijPsHNUmVphsUqFo= +Received: by 10.205.132.138 with SMTP id hu10mr9950153bkc.117.1327998345194; + Tue, 31 Jan 2012 00:25:45 -0800 (PST) +Received: from localhost ([91.144.186.21]) + by mx.google.com with ESMTPS id bw9sm43487518bkb.8.2012.01.31.00.25.42 + (version=TLSv1/SSLv3 cipher=OTHER); + Tue, 31 Jan 2012 00:25:43 -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: +References: <1327996914-9644-1-git-send-email-dme@dme.org> + <1327996914-9644-3-git-send-email-dme@dme.org> + <87bopknvct.fsf@gmail.com> + +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:24:27 +0400 +Message-ID: <877h08nutg.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:25:47 -0000 + +On Tue, 31 Jan 2012 08:22:20 +0000, David Edmondson wrote: +> On Tue, 31 Jan 2012 12:12:50 +0400, Dmitry Kurochkin wrote: +> > 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? +> +> It's the CONDITION clause of `cond', so that wouldn't be appropriate. +> + +oh + +This is why I like big diff contexts... + +Regards, + Dmitry + +> > 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