unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: emacs-devel@gnu.org
Subject: Re: Isearch in dired
Date: Mon, 17 Nov 2008 00:22:35 +0200	[thread overview]
Message-ID: <87ljvjqqh0.fsf@jurta.org> (raw)
In-Reply-To: <87r65fef74.fsf@jurta.org> (Juri Linkov's message of "Thu, 13 Nov 2008 18:57:51 +0200")

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




  reply	other threads:[~2008-11-16 22:22 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-08  9:56 Isearch in dired Richard M. Stallman
2008-11-08 10:59 ` Juri Linkov
2008-11-08 11:33   ` Lennart Borgman
2008-11-08 12:23     ` Alan Mackenzie
2008-11-08 15:22       ` Lennart Borgman
2008-11-08 17:07       ` Juri Linkov
2008-11-09  0:26   ` Richard M. Stallman
2008-11-09 21:57     ` Juri Linkov
2008-11-08 12:19 ` Alan Mackenzie
2008-11-08 17:08   ` Juri Linkov
2008-11-08 14:10 ` Chong Yidong
2008-11-08 16:05   ` joakim
2008-11-08 17:27     ` Juri Linkov
2008-11-08 17:17   ` Juri Linkov
2008-11-09  0:26   ` Richard M. Stallman
2008-11-08 21:57 ` Lazy " Juri Linkov
2008-11-09 20:54   ` recursive-edit in Isearch Juri Linkov
2008-11-09 21:09   ` Occur in Word Isearch Juri Linkov
2008-11-13 15:29     ` Chong Yidong
2008-11-13 15:30   ` Lazy Isearch in dired Chong Yidong
2008-11-13 15:32     ` Chong Yidong
2008-11-13 16:30       ` Juri Linkov
2008-11-13 17:07         ` Chong Yidong
2008-11-09 14:22 ` Chong Yidong
2008-11-09 15:08   ` Stefan Monnier
2008-11-09 17:59   ` Juri Linkov
2008-11-11 22:55     ` Chong Yidong
2008-11-12  2:59       ` Stefan Monnier
2008-11-12 11:59         ` René Kyllingstad
2008-11-12 15:13           ` Drew Adams
2008-11-12 15:53         ` Richard M. Stallman
2008-11-12  7:55       ` Juri Linkov
2008-11-12 15:08         ` Chong Yidong
2008-11-13 16:57           ` Juri Linkov
2008-11-16 22:22             ` Juri Linkov [this message]
2008-11-10  3:11   ` Richard M. Stallman
2008-11-11 21:35     ` Juri Linkov
  -- strict thread matches above, loose matches on Subject: below --
2007-08-08  3:05 propose: dired-isearch.el --- isearch in Dired William Xu
2007-08-08 18:46 ` Stefan Monnier
2007-08-08 22:54   ` Juri Linkov
2008-07-23 20:34     ` Juri Linkov
2008-07-24  6:41       ` Mathias Dahl
2008-07-25  0:32         ` Juri Linkov
2008-07-24 13:53       ` Stefan Monnier
2008-07-24 15:52         ` Drew Adams
2008-07-24 17:20           ` Stefan Monnier
2008-07-25  0:33         ` Juri Linkov
2008-07-25  0:40           ` Lennart Borgman (gmail)
2008-07-29 15:45           ` Juri Linkov
2008-07-29 17:56             ` Stefan Monnier
2008-07-30 14:29               ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ljvjqqh0.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).