[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12253: Restore window start position
From: |
Juri Linkov |
Subject: |
bug#12253: Restore window start position |
Date: |
Wed, 10 Jan 2024 19:16:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
>>> This is not helpful. It was many years ago, and I don't remember the
>>> details.
>>> In bug#12253 there is a patch that restores the window position
>>> when navigating back in Info history. I could try to rebase it
>>> if there is still an interest in such improvement.
>>
>> I think you should try to do that. Any sort of navigation should
>> restore window start and window point positions whenever possible.
>
> Did you make any progress with this?
With Info history or with Isearch history?
Here is how to restore the window position
when navigating back in Isearch history:
#+begin_src emacs-lisp
(setq isearch-push-state-function
(lambda ()
;; Recenter new search hits outside of window boundaries
(when (and isearch-success
(not (pos-visible-in-window-p)))
(recenter))
`(lambda (cmd)
(when isearch-success
(set-window-start nil ,(window-start))))))
#+end_src