From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Keith David Bershatsky <esq@lawlist.com>
Cc: 17678@debbugs.gnu.org
Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay
Date: Wed, 11 Jun 2014 14:00:39 -0400 [thread overview]
Message-ID: <jwv38fbe3ls.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <m2ppiphojd.wl%esq@lawlist.com>
> In a stackoverflow thread regarding this issue, @Stefan suggested that
> I take a look at the `jit-lock-register`. After combing through the
> code in `jit-lock.el` and trying some experiments, I believe that
> `jit-lock.el` is more suited to a situation when buffer *modification*
> occurs -- it is also suited for situations where one may wish to
> incrementially act upon an entire buffer in small chunks at a time to
> increase efficiency of avaialble resources.
Indeed, jit-lock is designed for features that depend on the buffer's
*contents* but not on things like the value of `point'.
> I believe that the solution may be to have a `sneak-preview-redisplay`
> whereby the *new* `window-start` and *new* `window-end` could be
> correctly calculated without the visual buffer actually
> being redisplayed.
Of course, there's a circularity problem, here: if you need window-start
(you can already compute window-end without an actual redisplay) in
order to then install things like text-properties properties and
overlays that affect the display, then those added properties may end up
requiring changing window-start again (because they end up pushing point
outside of the window and require a scroll).
This said, the request is reasonable, and seems related to the needs of
follow-mode as well.
IIUC your particular use case (drawing crosshairs to show where the
cursor is located) is one where what you really need is to know when
window-start changes (just like follow-mode).
So, a good feature might be one that runs a hook when redisplay decides
that window-start needs to be reset (i.e. that point moved out of the
window and we need to scroll).
Stefan
next prev parent reply other threads:[~2014-06-11 18:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-03 17:48 bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Keith David Bershatsky
2014-06-11 18:00 ` Stefan Monnier [this message]
2014-06-11 18:45 ` Eli Zaretskii
2014-06-11 21:58 ` Stefan Monnier
2014-06-12 17:54 ` Eli Zaretskii
2014-06-13 2:11 ` Stefan Monnier
2014-06-13 6:22 ` Eli Zaretskii
2014-06-13 12:34 ` Stefan Monnier
2014-06-13 13:27 ` Eli Zaretskii
2014-06-13 14:14 ` Stefan Monnier
2014-06-13 14:47 ` Eli Zaretskii
2014-06-13 18:47 ` Stefan Monnier
2014-06-13 20:21 ` Keith David Bershatsky
2014-06-13 20:59 ` Eli Zaretskii
2014-06-14 9:45 ` Eli Zaretskii
2014-06-14 17:10 ` Keith David Bershatsky
2014-06-15 2:24 ` Stefan Monnier
2014-06-13 16:22 ` Keith David Bershatsky
2014-06-13 17:55 ` Eli Zaretskii
2014-06-13 18:24 ` Keith David Bershatsky
2014-06-13 20:54 ` Eli Zaretskii
2014-06-13 21:19 ` Keith David Bershatsky
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=jwv38fbe3ls.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=17678@debbugs.gnu.org \
--cc=esq@lawlist.com \
/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.