|
From: | Juri Linkov |
Subject: | Re: find-file-hook, recenter, scroll-conservatively and save-place |
Date: | Sat, 02 Feb 2019 23:03:50 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
>> Interesting question. Maybe introduce two new buffer-local variables >> 'window-point' and 'window-start' that a hook could set and then >> display-buffer could read and call functions window-point and window-start? >> These buffer-local values should be used only once and should be reverted >> to nil after the first use. > > I start to understand the approach proposed by you and Martin. This > buffer-local variable approach feels natural and OK to me. > > Martin also said this: > >>> When 'display-buffer' finds a '(window-start . recenter) ALIST entry >>> it would call 'recenter' after assigning the window buffer. > > Just one point to this: should we have '(window-start . (recenter 10)) > also, where 10 is the ARG for the future recenter call? Using one-off buffer-local variables will allow standard hooks like adding window-start-hook.
[Prev in Thread] | Current Thread | [Next in Thread] |