From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Jorgen Schaefer <forcer@forcix.cx>
Cc: emacs-devel@gnu.org
Subject: Re: (Not) scrolling past the end of a buffer
Date: Tue, 23 Oct 2012 12:25:43 -0400 [thread overview]
Message-ID: <jwvwqyh6udq.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20121020115230.02b6cf20@forcix.kollektiv-hamburg.de> (Jorgen Schaefer's message of "Sat, 20 Oct 2012 11:52:30 +0200")
> (when (and window-bottom-mode
> (equal (point-max)
> (window-end nil t)))
> (save-excursion
> (goto-char (point-max))
> (recenter -1)))
I guess it would be useful for window-end (or some other function) to
return not just `point-max' when the EOB is displayed, but additionally
indicate where that EOB is displayed (so you can avoid calling
`recenter' if EOB is already at the bottom).
> My problem is that I do not have a place where I can actually put this.
Yup. I think a good place would be a new `after-redisplay-functions'.
Those functions would be called with one argument (the redisplayed
window) right after rebuilding the glyph matrix of a window (and only
if that matrix has changed).
I believe this hook shouldn't be too difficult to add.
A related hook would be `before-redisplay-functions' which I'd also like
to see added. This one is a bit trickier, because we don't want to call
it for every existing window, but only for those which actually require
a redisplay. I would *really* like to see such a hook (reveal-mode
could use it, the region-highlighting code could use it).
Stefan
next prev parent reply other threads:[~2012-10-23 16:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-19 22:34 (Not) scrolling past the end of a buffer Jorgen Schaefer
2012-10-20 2:07 ` Stefan Monnier
2012-10-20 9:52 ` Jorgen Schaefer
2012-10-23 16:25 ` Stefan Monnier [this message]
2012-10-20 16:31 ` Romain Francoise
2012-10-20 16:45 ` Jorgen Schaefer
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvwqyh6udq.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=forcer@forcix.cx \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.