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: Searching in the minibuffer (was: wrapper fn for message and minibuffer-message?) Date: Mon, 17 Oct 2005 11:04:44 +0300 Organization: JURTA Message-ID: <87fyr0k2ry.fsf_-_@jurta.org> References: <87slv2rjtl.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1129541705 8745 80.91.229.2 (17 Oct 2005 09:35:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 Oct 2005 09:35:05 +0000 (UTC) Cc: drew.adams@oracle.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 17 11:34:57 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ERRNW-0001cr-Cg for ged-emacs-devel@m.gmane.org; Mon, 17 Oct 2005 11:33:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ERRNV-0000V0-3Y for ged-emacs-devel@m.gmane.org; Mon, 17 Oct 2005 05:33:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ERQ5P-00077j-UR for emacs-devel@gnu.org; Mon, 17 Oct 2005 04:11:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ERQ2Z-0006Cc-L4 for emacs-devel@gnu.org; Mon, 17 Oct 2005 04:08:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ERQ1y-0005yc-11 for emacs-devel@gnu.org; Mon, 17 Oct 2005 04:07:39 -0400 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ERQ1w-0002pP-Pm; Mon, 17 Oct 2005 04:07:37 -0400 Original-Received: from mail.neti.ee (80-235-32-85-dsl.mus.estpak.ee [80.235.32.85]) by Relayhost1.neti.ee (Postfix) with ESMTP id 8E28B20DE; Mon, 17 Oct 2005 11:07:45 +0300 (EEST) Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Sun, 16 Oct 2005 10:40:52 -0400") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee 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:44169 Archived-At: > 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/