[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find-file-hook, recenter, scroll-conservatively and save-place

From: martin rudalics
Subject: Re: find-file-hook, recenter, scroll-conservatively and save-place
Date: Thu, 31 Jan 2019 19:44:22 +0100

>> Juri, should we handle this somehow?  That is, provide 'window-point'
>> and 'window-start' action alist entries with the former allowing the
>> 'switch-to-buffer-preserve-window-point' logic (among others) and the
>> latter optionally allowing to recenter.
> How would you compute window-start in this case so that point is
> centered?

When 'display-buffer' finds a '(window-start . recenter) ALIST entry
it would call 'recenter' after assigning the window buffer.

>> I don't know how 'save-place' could pass these on to the
>> 'pop-to-buffer' call in 'find-file' though.  Can you think of any
>> other use cases where these would be helpful?
> save-place installs a find-file-hook, which simply calls goto-char.
> All this happens before pop-to-buffer is called.

Which probably means that no 'window-point' entry is needed -
'(window-point . nil) would mean to use the buffer's point as


reply via email to

[Prev in Thread] Current Thread [Next in Thread]