emacs-devel
[Top][All Lists]
Advanced

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

Re: bug? scroll-lock-mode and searching


From: Stefan Monnier
Subject: Re: bug? scroll-lock-mode and searching
Date: Sat, 29 Mar 2008 00:06:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> Searching with C-s while scroll-lock-mode is active doesn't center the
>> search results.  I consider this a bug.  In case you decide this is a
>> `feature' I strongly ask for an option to configure scroll-lock-mode
>> so that isearch always centers its results.

> I'd consider it neither a bug nor a feature.  Scroll Lock mode is simply
> not aware of Isearch mode and it probably doesn't need to be because a
> search is not an explicit scrolling command.

> For me the current behavior is fine, but if other people think it would
> be a good idea for Scroll Lock mode to center search results, I would
> not mind adding an option for it.

> The only problem is that I could not find an appropriate hook in Isearch
> mode which provides a means to recenter the view.  One could perhaps
> abuse `isearch-message-function' for that but I don't consider this a
> good idea.  Another bad idea would be to advise `isearch-update' like
> this:

> (defadvice isearch-update (after scroll-lock-isearch-update activate)
>   "Recenter view after `isearch-update'."
>   (recenter '(4)))

I think the right fix is to introduce a new hook `before-redisplay-hook'
and scroll-lock-mode should use it.


        Stefan




reply via email to

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