From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Isearch in dired Date: Mon, 17 Nov 2008 00:22:35 +0200 Organization: JURTA Message-ID: <87ljvjqqh0.fsf@jurta.org> References: <87zlk90yjb.fsf@cyd.mit.edu> <87ljvssrkb.fsf@jurta.org> <87tzadzxdi.fsf@cyd.mit.edu> <87vdut9y4r.fsf@jurta.org> <87wsf97zis.fsf@cyd.mit.edu> <87r65fef74.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1226874213 19207 80.91.229.12 (16 Nov 2008 22:23:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Nov 2008 22:23:33 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 16 23:24:36 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 1L1q2k-0005WM-IO for ged-emacs-devel@m.gmane.org; Sun, 16 Nov 2008 23:24:34 +0100 Original-Received: from localhost ([127.0.0.1]:47618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1q1b-0001Rp-WE for ged-emacs-devel@m.gmane.org; Sun, 16 Nov 2008 17:23:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L1q1W-0001RE-Q2 for emacs-devel@gnu.org; Sun, 16 Nov 2008 17:23:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L1q1W-0001Qz-39 for emacs-devel@gnu.org; Sun, 16 Nov 2008 17:23:18 -0500 Original-Received: from [199.232.76.173] (port=37016 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1q1V-0001Qw-Tx for emacs-devel@gnu.org; Sun, 16 Nov 2008 17:23:17 -0500 Original-Received: from relay02.kiev.sovam.com ([62.64.120.197]:52748) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L1q1V-0000Xg-Nn for emacs-devel@gnu.org; Sun, 16 Nov 2008 17:23:17 -0500 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay02.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1L1q1T-000HyH-Eb for emacs-devel@gnu.org; Mon, 17 Nov 2008 00:23:15 +0200 In-Reply-To: <87r65fef74.fsf@jurta.org> (Juri Linkov's message of "Thu, 13 Nov 2008 18:57:51 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) X-Scanner-Signature: 8fcfa5a562f326ba64a474cd1db6e25e X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Trusted X-SpamTest-Info: Profiles 5726 [Nov 17 2008] X-SpamTest-Info: {received from trusted relay: common white list} X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: white ip list X-SpamTest-Rate: 10 X-SpamTest-Status: Trusted X-SpamTest-Status-Extended: trusted X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1) 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:105727 Archived-At: > One solution is to change the call order in `isearch-mode' from > > (isearch-update) > (run-hooks 'isearch-mode-hook) > > to > > (run-hooks 'isearch-mode-hook) > (isearch-update) Actually a new call order is more correct because in most cases isearch-mode-hook is used to setup isearch parameters such as a search function, search string, message, etc. and after these settings to update the isearch display with the specified parameters. So the current order is wrong. The only reason it causes no problems now is because typing the first C-s just activates isearch mode and doesn't run a real search. So I see no problems with changing the order: Index: lisp/isearch.el =================================================================== RCS file: /sources/emacs/emacs/lisp/isearch.el,v retrieving revision 1.335 diff -u -r1.335 isearch.el --- lisp/isearch.el 11 Nov 2008 20:11:34 -0000 1.335 +++ lisp/isearch.el 16 Nov 2008 22:21:04 -0000 @@ -800,8 +801,8 @@ (isearch-push-state) (setq overriding-terminal-local-map isearch-mode-map) - (isearch-update) (run-hooks 'isearch-mode-hook) + (isearch-update) (add-hook 'mouse-leave-buffer-hook 'isearch-done) (add-hook 'kbd-macro-termination-hook 'isearch-done) -- Juri Linkov http://www.jurta.org/emacs/