GNU bug report logs -
#12078
24.1; Improve the I-search prompt
Previous Next
Reported by: Dani Moncayo <dmoncayo <at> gmail.com>
Date: Sat, 28 Jul 2012 18:04:02 UTC
Severity: wishlist
Tags: wontfix
Found in version 24.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 12078 <at> debbugs.gnu.org (full text, mbox):
>> 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)
This bug report was last modified 4 years and 304 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.