unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Edmondson <dme@dme.org>
To: Aaron Ecay <aaronecay@gmail.com>, Austin Clements <amdragon@MIT.EDU>
Cc: notmuch@notmuchmail.org
Subject: Re: [RFC][PATCH v4] emacs: Re-implement advance/rewind functions of notmuch-show-mode.
Date: Mon, 26 Dec 2011 10:54:14 +0000	[thread overview]
Message-ID: <cunipl3txgp.fsf@hotblack-desiato.hh.sledj.net> (raw)
In-Reply-To: <m2zkegt1jk.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]

On Sun, 25 Dec 2011 23:11:27 -0500, Aaron Ecay <aaronecay@gmail.com> wrote:
> > > +   ((> (let ((visible-bottom (notmuch-show-message-bottom)))
> > > +	 (while (invisible-p visible-bottom)
> > > +	   (setq visible-bottom (max (point-min)
> > > +				     (1- (previous-single-char-property-change
> > > +					  visible-bottom 'invisible)))))
> > > +	 visible-bottom) (window-end))
> 
> Can this (let...) be lifted out of the (cond...)?  IMO it is very
> confusing to be doing non-trivial computation in the test portion of a
> cond form.

It ends up a long way from where it's used, diluting the value of the
comment. I do like the current layout, but what if it was (something
like):

   ((let ((visible-bottom (1- (notmuch-show-message-bottom))))
      (while (invisible-p visible-bottom)
	(setq visible-bottom (max (point-min)
				  (1- (previous-single-char-property-change
				       visible-bottom 'invisible)))))
      (> visible-bottom (window-end)))
    ;; The end of this message is not visible - scroll to show more of
    ;; it.
    (scroll-up)
    nil)

That would seem more palatable, perhaps.

> Agreed.  I would like to see this case move back one screenful of text or
> to the previous beginning-of-message, whichever is shorter.

See previous comment - I agreed that it's not symmetric - just wonder
which is more useful behaviour.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2011-12-26 10:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <id:"1324553312-10972-1-git-send-email-dme@dme.org">
2011-12-23 18:41 ` [RFC][PATCH v4] emacs: Re-implement advance/rewind functions of notmuch-show-mode David Edmondson
2011-12-23 19:01   ` Dmitry Kurochkin
2011-12-26 10:46     ` David Edmondson
2011-12-26 11:09       ` Dmitry Kurochkin
2011-12-26 22:00         ` David Edmondson
2011-12-26 22:24           ` Jameson Graef Rollins
2011-12-27  7:56             ` David Edmondson
2011-12-25  1:06   ` Austin Clements
2011-12-26  4:11     ` Aaron Ecay
2011-12-26 10:54       ` David Edmondson [this message]
2011-12-26 10:49     ` David Edmondson
2011-12-28 15:22       ` David Edmondson
2011-12-28 18:04         ` Aaron Ecay
2011-12-28 20:21           ` Jameson Graef Rollins
2011-12-29  8:42           ` David Edmondson
2011-12-29 12:08   ` [PATCH 1/2] " David Edmondson
2011-12-29 12:08     ` [PATCH 2/2] test: Add tests for advance/rewind David Edmondson
2011-12-29 16:05       ` David Edmondson
2012-01-06 17:10         ` Jameson Graef Rollins
2012-01-06 17:31           ` David Edmondson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cunipl3txgp.fsf@hotblack-desiato.hh.sledj.net \
    --to=dme@dme.org \
    --cc=aaronecay@gmail.com \
    --cc=amdragon@MIT.EDU \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).