> Eval: (setq foo 'bar) > > typing `C-s foo' will display: > > Eval: (setq foo 'bar) [I-search backward: foo] > > and `foo' will be highlighted in `isearch' face, as usual. > > I suggest that those who find this interesting try it out.
This doesn't work satisfactorily: temporarily displaying the search prompt at the end of the minibuffer causes too long delay after typing C-s and before point moves to the next occurrence of the search string. Instead of that, I propose a different solution: 1. not to display the search prompt while searching in the minibuffer at all, because the search string is highlighted in the minibuffer anyway. Thus the search prompt will not obscure the minibuffer text, and users will be provided with visual feedback about the place the search reached. 2. to display the search prompt for 2 sec only when it contains error messages. Index: lisp/isearch.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/isearch.el,v retrieving revision 1.275 diff -c -r1.275 isearch.el *** lisp/isearch.el 29 Sep 2005 22:55:53 -0000 1.275 --- lisp/isearch.el 17 Oct 2005 08:03:03 -0000 *************** *** 1926,1935 **** isearch-message) (isearch-message-suffix c-q-hack ellipsis) ))) ! (if c-q-hack m (let ((message-log-max nil)) ! (message "%s" m))))) (defun isearch-message-prefix (&optional c-q-hack ellipsis nonincremental) ;; If about to search, and previous search regexp was invalid, --- 1934,1950 ---- isearch-message) (isearch-message-suffix c-q-hack ellipsis) ))) ! (if (or c-q-hack ! (and (minibufferp) isearch-success (not isearch-error) ! (> (length isearch-string) 0))) m (let ((message-log-max nil)) ! (message "%s" m) ! (when (and (minibufferp) (not isearch-error)) ! (sit-for (or isearch-original-minibuffer-message-timeout ! minibuffer-message-timeout ! 2)) ! (message "")))))) (defun isearch-message-prefix (&optional c-q-hack ellipsis nonincremental) ;; If about to search, and previous search regexp was invalid, -- Juri Linkov http://www.jurta.org/emacs/ _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel