GNU bug report logs -
#23038
25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
Previous Next
Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>
Date: Thu, 17 Mar 2016 14:08:01 UTC
Severity: normal
Merged with 23084
Found in version 25.0.92
Fixed in version 25.1
Done: Michael Heerdegen <michael_heerdegen <at> web.de>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 23038 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Michael,
I believe that the bug was already there but I can try fixing it (below
patch is my first attempt).
This bug got revealed because when you do "C-s C-w M-%", the space-before
argument is set to t for the isearch--describe-regexp-mode.
The let-bound var description value was staying nil as both
search-default-mode and regexp-function are nil. The bug probably did not
reveal earlier because we had search-default-mode set to a non-nil value by
default.
The error simply tells that
(replace-regexp-in-string "\\(.*\\) \\'" " \\1" description)
is seeing description as a non-string value (nil).
Below patch sets the default case for the cond (which we should technically
anyways be doing). By default the description var is set to an empty string
"" instead of nil. As description is anyways supposed to be a string, I
think that this patch should not hurt.
I would let you and others evaluate this proposed fix.
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 988503e..9b8a0f0 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2594,7 +2594,8 @@ isearch--describe-regexp-mode
(isearch-regexp "regexp ")
;; 4. And finally, if we're in literal mode (and if the
;; default mode is also not literal), describe it.
- ((functionp search-default-mode) "literal "))))
+ ((functionp search-default-mode) "literal ")
+ (t ""))))
(if space-before
;; Move space from the end to the beginning.
(replace-regexp-in-string "\\(.*\\) \\'" " \\1" description)
[Message part 2 (text/html, inline)]
This bug report was last modified 9 years and 120 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.