[PATCH 2/2] emacs: Don't move to the next thread unless the cursor is at the end of the buffer.
David Edmondson
dme at dme.org
Tue Jan 31 00:22:20 PST 2012
On Tue, 31 Jan 2012 12:12:50 +0400, Dmitry Kurochkin <dmitry.kurochkin at gmail.com> wrote:
> On Tue, 31 Jan 2012 08:01:54 +0000, David Edmondson <dme at dme.org> 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.
> Regards,
> Dmitry
>
> > +
> > (t
> > ;; This is the last message - change the return value
> > (setq ret t)))
> > --
> > 1.7.8.3
> >
> > _______________________________________________
> > notmuch mailing list
> > notmuch at notmuchmail.org
> > http://notmuchmail.org/mailman/listinfo/notmuch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120131/91faac74/attachment.pgp>
More information about the notmuch
mailing list