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: Ralf Angeli
Subject: Re: bug? scroll-lock-mode and searching
Date: Fri, 28 Mar 2008 23:19:09 +0100

* Werner LEMBERG (2008-03-28) writes:

> 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)))

-- 
Ralf




reply via email to

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