GNU bug report logs - #49963
28.0.50; isearch failing in Dired after rectangle-mark-mode and query-replace

Previous Next

Package: emacs;

Reported by: laslydone <laslydone <at> protonmail.com>

Date: Mon, 9 Aug 2021 16:36:02 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> linkov.net>
Cc: 49963 <at> debbugs.gnu.org, laslydone <laslydone <at> 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:30:54 -0400
>   (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 it doesn't, does it?

So don't use `let`.
Instead use `remove-function` with `unwind-protect`.


        Stefan





This bug report was last modified 3 years and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.