bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#34723: 27.0.50; customize and improve diff-mode recentering


From: Eli Zaretskii
Subject: bug#34723: 27.0.50; customize and improve diff-mode recentering
Date: Tue, 05 Mar 2019 18:11:57 +0200

> Date: Mon, 04 Mar 2019 20:06:13 +0100
> From: charles@aurox.ch (Charles A. Roelli)
> Cc: 34723@debbugs.gnu.org
> 
> >   (setq isearch-push-state-function
> >         (lambda ()
> >           (when (and isearch-success (not (pos-visible-in-window-p)))
> >             (reposition-window))
> >           `(lambda (cmd)
> >              (when isearch-success
> >                (set-window-start nil ,(window-start))))))
> 
> Can we add something like this to isearch.el, maybe as a defcustom?
> Or maybe we could add it in a way such that other packages that show
> search results (grep, xref) could use the same function to reposition
> the window.  The function could inspect a defcustom in simple.el to
> decide whether (or how) to reposition the window.

Isn't it easier to temporarily bind scroll-margin to a non-zero value,
then force redisplay?

Or maybe I'm missing something in this discussion.





reply via email to

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