[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35860: Delayed window positioning after buffer display
From: |
Eli Zaretskii |
Subject: |
bug#35860: Delayed window positioning after buffer display |
Date: |
Thu, 23 May 2019 07:34:28 +0300 |
> From: Juri Linkov <juri@linkov.net>
> Date: Wed, 22 May 2019 23:32:13 +0300
>
> There are commands that set point while the buffer is not displayed,
> and after displaying the buffer point remains at an old position,
> not where it was moved while the buffer was undisplayed.
That's a feature, isn't it? See switch-to-buffer-preserve-window-point.
> One solution is to generalize the variable 'help-window-point-marker'
> currently described as:
>
> ;; `help-window-point-marker' is a marker you can move to a valid
> ;; position of the buffer shown in the help window in order to override
> ;; the standard positioning mechanism (`point-min') chosen by
> ;; `with-output-to-temp-buffer' and `with-temp-buffer-window'.
> ;; `with-help-window' has this point nowhere before exiting. Currently
> ;; used by `view-lossage' to assert that the last keystrokes are always
> ;; visible.
> (defvar help-window-point-marker (make-marker)
> "Marker to override default `window-point' in help windows.")
Why not bind switch-to-buffer-preserve-window-point to nil instead?