[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use cases for post-redisplay hooks
From: |
Keith David Bershatsky |
Subject: |
Re: Use cases for post-redisplay hooks |
Date: |
Thu, 07 Jul 2016 13:19:03 -0700 |
With my limited computer skills, I was not able to find the "sweet spot" in the
redisplay code where I knew for sure that `window-start' and `window-end' were
always going to be correct such that I could easily set a hypothetical
`needs-recalculation' flag to `nil'. When I tried applying overlays too late
in time in the redisplay cycle, there were visual problems updating the screen.
With my custom `window-start-end-hook' (with accepts a function with arguments
for `window-start' and `window-end'), I use a test (built into the C code) to
see whether point is fully visible before I run the Lisp function attached to
the hook. However, it assumes that `make-cursor-line-fully-visible' remains
set at the default value of `t'. I use `(setq scroll-conservatively 101)'. On
my todo-list, is to figure out how to incorporate a test (akin to `needs
recalculation') for when `make-cursor-line-fully-visible' is set to `nil'.
Essentially, redisplay does less work when `make-cursor-line-fully-visible' is
`nil'. I've been using a custom build of Emacs with the
`window-start-end-hook' since shortly after generating Emacs feature request
22404.
Keith
At Thu, 7 Jul 2016 15:44:13 -0400,
Clément Pit--Claudel wrote:
>
> But I meant — can't you update this flag yourself, and do at most one
> recalculation per command loop?
- Re: Use cases for post-redisplay hooks, (continued)