From: Keith David Bershatsky <esq@lawlist.com>
To: Eli Zaretskii <eliz@gnu.org>, Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 17678@debbugs.gnu.org
Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay
Date: Fri, 13 Jun 2014 14:19:21 -0700 [thread overview]
Message-ID: <52D781C2-53C8-4994-8B17-D8232D278F94@lawlist.com> (raw)
In-Reply-To: <83a99gwmwz.fsf@gnu.org>
The custom minor-mode that I am working places overlays between `window-start` and `window-end`, and is triggered upon a variety of occurrences. The three general categories that trigger removal / placement of overlays are: (1) buffer modification; (2) window modification; (3) cursor movement. The overlays draw three categories: (1) end of line indicators (e.g., pilcrow, or single-angle [for cursor eol]); (2) a horizontal line at the current cursor position that spans the entire window-width (excluding the line numbers and fringes); and, (3) a vertical line aligned with the cursor stretching from the top to bottom of the window (excluding the headline where I have Tabbar). To make the minor mode as efficient as possible (in terms of time needed to remove / place the overlays), I am limiting the area to only the visible window.
The goal is to have the new overlays placed before the redisplay occurs -- this avoids a brief glimpse of the naked buffer once the prior overlays have been removed (and before the new overlays are laid). Prior to the existence of the `test-mode` that I sent over a short while ago (based on the help that you and Stefan have so graciously provided), I was forcing a redisplay (whenever point moved outside of the *old* visible window limits) in order to obtain the *new* `window-start` and *new* `window-end`. It looks as if the `test-mode` concept will resolve the issue by handling the two different conditions separately -- i.e., point inside the *old* window limits, versus point outside thereof.
---------------------------------------
On Jun 13, 2014, at 1:54 PM, Eli Zaretskii wrote:
>> From: Keith David Bershatsky <esq@lawlist.com>
>> Date: Fri, 13 Jun 2014 11:24:01 -0700
>> Cc: 17678@debbugs.gnu.org
>>
>> I believe splitting up the work between the two hooks may be possible -- I will need to revise the conditions once I identify additional situations. As far as I can tell, the `window-scroll-functions` hook is NOT triggered when `point` STAYS between *old* `window-start` and *old* `window-end`. So when `point` STAYS between *old* `window-start` and *old* `window-end`, I will need to use the `post-command-hook`. When point moves BEYOND *old* `window-start` or `*old* `window-end`, then the `window-scroll-functions` hook can take over -- with a forced new `(window-end nil t)`.
>
> Why do you care about the situation where point stays inside the same
> window limits?
prev parent reply other threads:[~2014-06-13 21:19 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
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 [this message]
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://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52D781C2-53C8-4994-8B17-D8232D278F94@lawlist.com \
--to=esq@lawlist.com \
--cc=17678@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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://git.savannah.gnu.org/cgit/emacs.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).