From: Juri Linkov <juri@linkov.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 49963@debbugs.gnu.org, laslydone <laslydone@protonmail.com>
Subject: bug#49963: 28.0.50; isearch failing in Dired after rectangle-mark-mode and query-replace
Date: Tue, 10 Aug 2021 10:03:39 +0300 [thread overview]
Message-ID: <87k0kudsb8.fsf@mail.linkov.net> (raw)
In-Reply-To: <zQRAw1lYfbepdO-gOK7xykPzJOKVGFD9c3e5HewRdBBNfO5JbMcol7W1gzJ8kPiDgMjGZ4McyPejde4IBzh0TnGpgr6F6EybXUlY9gUNhtg=@protonmail.com> (laslydone via's message of "Mon, 09 Aug 2021 16:30:35 +0000")
> What happened:
> In Dired isearch-{forward,backward} will no longer match anything after running
> `rectangle-mark-mode' and `query-replace'.
>
> What I thought would happen:
> In Dired after running `rectangle-mark-mode' and `query-replace',
> isearch-{forward,backward} would match again.
>
> To reproduce:
> 1. emacs -Q
> 2. C-x d <RET>
> 3. C-x C-q
> 4. C-x <SPC> C-n
> 5. M-% <RET> <RET> (entering nothing)
> 6. ^s (searching for anything will show "Failing I-search: ANYTHING" in minibuffer)
Stefan, please help. Wdired adds advice on a buffer-local isearch-filter-predicate,
and perform-replace adds advice on a let-bound isearch-filter-predicate
that changes the global value. This is the minimal test case:
(add-function :after-while (local 'isearch-filter-predicate)
(lambda (&rest _) 'filter-local))
(let ((isearch-filter-predicate isearch-filter-predicate))
(add-function :after-while isearch-filter-predicate
(lambda (&rest _) 'filter-letbound)))
C-h v isearch-filter-predicate:
Value:
#f(advice-wrapper :after-while #f(compiled-function
(&rest args)
#<bytecode -0x1d2ab1d0859aebb6>)
(closure
(t)
(&rest _)
'filter-local))
Local in buffer *scratch*; global value is
#f(advice-wrapper :after-while isearch-filter-visible
(closure
(t)
(&rest _)
'filter-letbound))
Let-binding was supposed to protect from changing the global value,
but with a buffer-local value it still changes the global value.
next prev parent reply other threads:[~2021-08-10 7:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-09 16:30 bug#49963: 28.0.50; isearch failing in Dired after rectangle-mark-mode and query-replace laslydone via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-10 7:03 ` Juri Linkov [this message]
2021-08-10 13:38 ` Eli Zaretskii
2021-08-10 14:28 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-10 15:32 ` Eli Zaretskii
2021-08-10 15:44 ` Lars Ingebrigtsen
2021-08-10 15:56 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-10 16:42 ` Eli Zaretskii
2021-08-10 20:37 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-11 12:39 ` Eli Zaretskii
2021-08-11 2:58 ` Richard Stallman
2021-08-11 5:32 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-11 7:04 ` Juri Linkov
2021-08-10 16:37 ` Eli Zaretskii
2021-08-10 14:30 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-11 7:08 ` Juri Linkov
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k0kudsb8.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=49963@debbugs.gnu.org \
--cc=laslydone@protonmail.com \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).