From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#12078: 24.1; Improve the I-search prompt Date: Sun, 29 Jul 2012 21:04:51 +0300 Organization: JURTA Message-ID: <87d33esat8.fsf@mail.jurta.org> References: <87txwr2ylo.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1343585282 19525 80.91.229.3 (29 Jul 2012 18:08:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 29 Jul 2012 18:08:02 +0000 (UTC) Cc: 12078@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 29 20:08:00 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SvXuI-0005Pq-5w for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Jul 2012 20:07:58 +0200 Original-Received: from localhost ([::1]:42247 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvXuH-0003AG-De for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Jul 2012 14:07:57 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvXuE-0003AB-NK for bug-gnu-emacs@gnu.org; Sun, 29 Jul 2012 14:07:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SvXuD-0000Zk-Jq for bug-gnu-emacs@gnu.org; Sun, 29 Jul 2012 14:07:54 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvXuD-0000Ze-GO for bug-gnu-emacs@gnu.org; Sun, 29 Jul 2012 14:07:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SvY18-0001Sh-2M for bug-gnu-emacs@gnu.org; Sun, 29 Jul 2012 14:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Jul 2012 18:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12078 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12078-submit@debbugs.gnu.org id=B12078.13435856655562 (code B ref 12078); Sun, 29 Jul 2012 18:15:01 +0000 Original-Received: (at 12078) by debbugs.gnu.org; 29 Jul 2012 18:14:25 +0000 Original-Received: from localhost ([127.0.0.1]:49071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SvY0X-0001Rf-DC for submit@debbugs.gnu.org; Sun, 29 Jul 2012 14:14:25 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:42933 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SvY0U-0001RW-Ld for 12078@debbugs.gnu.org; Sun, 29 Jul 2012 14:14:24 -0400 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 2997B451C1EF; Sun, 29 Jul 2012 11:07:11 -0700 (PDT) In-Reply-To: <87txwr2ylo.fsf@mail.jurta.org> (Juri Linkov's message of "Sun, 29 Jul 2012 03:35:31 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62576 Archived-At: >> Failing I-search: foobar >> Overwrapped I-search: foobar >> Failing overwrapped I-search: foobar >> Failing I-search: foobar [initial node] >> >> would be >> >> I-search: foobar [failing] >> I-search: foobar [overwrapped] >> I-search: foobar [failing, overwrapped] >> I-search: foobar [failing, initial node] > > I think we should distinguish between momentary messages and search states. > For instance, "failing" is a momentary message, but "overwrapped" > is a search state. It would be very annoying to display persistent > search states like "overwrapped" at the end of the search prompt. So what could be moved to the end of the search string are two messages "failing" and "pending". With the following patch a failed search will display the message suffix "[failed]". A failed search in Info will display the message suffix either "[failed at the end of node]" or "[failed at the end of manual]", and pending will display "[pending]". I don't propose to install this change immediately. Please try this out for a while. === modified file 'lisp/isearch.el' --- lisp/isearch.el 2012-07-18 09:27:23 +0000 +++ lisp/isearch.el 2012-07-29 18:01:27 +0000 @@ -2371,8 +2412,8 @@ (defun isearch-message-prefix (&optional (error nil))) ;; If currently failing, display no ellipsis. (or isearch-success (setq ellipsis nil)) - (let ((m (concat (if isearch-success "" "failing ") - (if isearch-adjusted "pending " "") + (let ((m (concat ;; (if isearch-success "" "failing ") + ;; (if isearch-adjusted "pending " "") (if (and isearch-wrapped (not isearch-wrap-function) (if isearch-forward @@ -2402,11 +2448,14 @@ (defun isearch-message-prefix (&optional 'face 'minibuffer-prompt))) (defun isearch-message-suffix (&optional c-q-hack _ellipsis) - (concat (if c-q-hack "^Q" "") - (if isearch-error - (concat " [" isearch-error "]") - "") - (or isearch-message-suffix-add ""))) + (let ((m (mapconcat 'identity + (delq nil (list (if (not isearch-success) "failed") + (if isearch-adjusted "pending") + isearch-error)) + " "))) + (concat (if c-q-hack "^Q" "") + (if (> (length m) 0) (concat " [" m "]") "") + (or isearch-message-suffix-add "")))) ;; Searching === modified file 'lisp/info.el' --- lisp/info.el 2012-07-10 11:51:54 +0000 +++ lisp/info.el 2012-07-29 18:01:28 +0000 @@ -1863,13 +1867,13 @@ (defun Info-search (regexp &optional bou (not bound) (or give-up (and found (not (and (> found opoint-min) (< found opoint-max)))))) - (signal 'search-failed (list regexp "initial node"))) + (signal 'search-failed (list regexp "at the end of node"))) ;; If no subfiles, give error now. (if give-up (if (null Info-current-subfile) (if isearch-mode - (signal 'search-failed (list regexp "end of manual")) + (signal 'search-failed (list regexp "at the end of manual")) (let ((search-spaces-regexp (if (or (not isearch-mode) isearch-regexp) Info-search-whitespace-regexp))) @@ -1946,7 +1951,7 @@ (defun Info-search (regexp &optional bou (if found (message "") (signal 'search-failed (if isearch-mode - (list regexp "end of manual") + (list regexp "at the end of manual") (list regexp))))) (if (not found) (progn (Info-read-subfile osubfile)