From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: bug? scroll-lock-mode and searching Date: Sat, 29 Mar 2008 00:06:48 -0400 Message-ID: References: <20080328.081607.109435269.wl@gnu.org> <87d4pev6ea.fsf@photon.caeruleus.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1206763629 29611 80.91.229.12 (29 Mar 2008 04:07:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Mar 2008 04:07:09 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ralf Angeli Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 29 05:07:40 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JfSM0-000352-Cq for ged-emacs-devel@m.gmane.org; Sat, 29 Mar 2008 05:07:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JfSLO-0007RN-SZ for ged-emacs-devel@m.gmane.org; Sat, 29 Mar 2008 00:07:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JfSLI-0007Ph-P8 for emacs-devel@gnu.org; Sat, 29 Mar 2008 00:06:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JfSLH-0007Oc-Kv for emacs-devel@gnu.org; Sat, 29 Mar 2008 00:06:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JfSLH-0007OP-EW for emacs-devel@gnu.org; Sat, 29 Mar 2008 00:06:55 -0400 Original-Received: from 206-248-178-205.dsl.teksavvy.com ([206.248.178.205] helo=ceviche.home) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JfSLH-0005V6-2T for emacs-devel@gnu.org; Sat, 29 Mar 2008 00:06:55 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id ED0C0B40BB; Sat, 29 Mar 2008 00:06:48 -0400 (EDT) In-Reply-To: <87d4pev6ea.fsf@photon.caeruleus.net> (Ralf Angeli's message of "Fri, 28 Mar 2008 23:19:09 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:93753 Archived-At: >> 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