From: Juri Linkov <juri@linkov.net>
To: Dani Moncayo <dmoncayo@gmail.com>
Cc: 21176@debbugs.gnu.org
Subject: bug#21176: 25.0.50; Garbage in the header line of *Occur* buffers
Date: Wed, 14 Oct 2015 19:09:36 +0300 [thread overview]
Message-ID: <87a8rlph33.fsf@mail.linkov.net> (raw)
In-Reply-To: <CAH8Pv0giMHXejS0evZbeVFFFkugXYv_dHBOY4T_kUQJQUZURSQ@mail.gmail.com> (Dani Moncayo's message of "Wed, 14 Oct 2015 00:25:31 +0200")
>> I still see garbage that you reported with (setq character-fold-search t).
>
> Oh, I didn't notice that the default value of that variable was
> changed to nil. Then you're right - the bug isn't fixed yet.
>
>> While your bug report is closed, I can't fix it.
>
> Can't you? The status of a bug report should not prevent you from
> doing anything. ;)
>
> Ok, I've just re-opened the bug report.
Thanks, it's more comfortable to fix open bugs rather than closed :)
For this bug the only good solution I see is like in this patch:
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 4fc9b38..16ed9af 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1831,7 +1839,12 @@ (defun isearch-occur (regexp &optional nlines)
isearch-regexp-lax-whitespace
isearch-lax-whitespace)
search-whitespace-regexp)))
- (occur regexp nlines)))
+ (occur (if isearch-word
+ (propertize regexp
+ 'isearch-string isearch-string
+ 'isearch-word-mode (isearch--describe-word-mode isearch-word))
+ regexp)
+ nlines)))
(declare-function hi-lock-read-face-name "hi-lock" ())
diff --git a/lisp/replace.el b/lisp/replace.el
index 3a908ac..718499f 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1657,8 +1657,12 @@ (defun occur-engine (regexp buffers out-buf nlines case-fold
lines (if (= lines 1) "" "s")))
;; Don't display regexp for multi-buffer.
(if (> (length buffers) 1)
- "" (format " for \"%s\""
- (query-replace-descr regexp)))
+ "" (format " for %s\"%s\""
+ (or (get-text-property 0 'isearch-word-mode regexp)
+ "")
+ (query-replace-descr
+ (or (get-text-property 0 'isearch-string regexp)
+ regexp))))
(buffer-name buf))
'read-only t))
(setq end (point))
next prev parent reply other threads:[~2015-10-14 16:09 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-01 12:22 bug#21176: 25.0.50; Garbage in the header line of *Occur* buffers Dani Moncayo
2015-08-01 12:44 ` Eli Zaretskii
2015-08-01 12:57 ` Dani Moncayo
2015-08-01 13:23 ` Eli Zaretskii
2015-08-01 15:01 ` Dani Moncayo
2015-08-02 20:34 ` Juri Linkov
2015-08-03 6:41 ` Dani Moncayo
2015-08-03 21:49 ` Stefan Monnier
2015-10-10 7:56 ` Dani Moncayo
2015-10-11 0:40 ` Glenn Morris
2015-10-12 20:21 ` Juri Linkov
2015-10-12 21:05 ` Dani Moncayo
2015-10-13 22:05 ` Juri Linkov
2015-10-13 22:25 ` Dani Moncayo
2015-10-14 16:09 ` Juri Linkov [this message]
2015-08-04 12:05 ` Angelo Graziosi
2015-08-04 12:32 ` Alexis
2015-08-04 12:44 ` Dani Moncayo
2015-08-04 12:50 ` Dani Moncayo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a8rlph33.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=21176@debbugs.gnu.org \
--cc=dmoncayo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.