GNU bug report logs - #25561
25.1; "Making isearch-search-fun-function local to *Minibuf-1* while let-bound!" warning with Evil

Previous Next

Package: emacs;

Reported by: Vasilij Schneidermann <v.schneidermann <at> gmail.com>

Date: Sat, 28 Jan 2017 11:04:01 UTC

Severity: minor

Merged with 25986

Found in versions 25.1, 25.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 25561 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Vasilij Schneidermann <v.schneidermann <at> gmail.com>
Cc: 25561 <at> debbugs.gnu.org
Subject: Re: bug#25561: 25.1;
 "Making isearch-search-fun-function local to *Minibuf-1* while
 let-bound!" warning with Evil
Date: Sun, 29 Jan 2017 02:39:53 +0200
> Hello,
>
> a user of the Evil package reported [1] that using a search command
> results in a "Making isearch-search-fun-function local to *Minibuf-1*
> while let-bound!" warning.  This appears to be an interaction between
> isearch and Evil, more specifically, Evil let-binds
> `isearch-search-fun-function' to something of its own, invokes isearch
> and something in isearch ends up running
> `minibuffer-history-isearch-setup' which `make-local-variable' to have
> `isearch-search-fun-function' have a separate value, resulting in the
> aforementioned warning.
>
> What's the recommended way to avoid or silence it?  Stefan suggested
> elsewhere [2] that this might indicate a bug, hence why I'm bringing
> this up here.
>
> [1]: https://github.com/emacs-evil/evil/issues/748
> [2]: https://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00903.html

Thanks for the report.  I'm not familiar with the Evil package,
so please correct me if I make wrong guesses about it.  I suppose
that the basic mode of operation of the Evil package is not buffer-local.
In this case I believe (make-local-variable 'isearch-search-fun-function)
is the wrong fix because it will make this variable have this value
in every random buffer where the user happens to invoke the search command.

OTOH, if evil-mode is the global mode then it makes sense to change the
global value of isearch-search-fun-function (and perhaps keeping its
old value).  If you need to keep standard search commands working,
then you could create a new internal defvar e.g. evil-search-is-active,
set it temporarily in evil-search commands, and check it in your new
implementation of the search function in isearch-search-fun-function.
If evil-search-is-active is nil, then call the old default value
isearch-search-fun-default.

I can't guarantee this solution to work, it's just an idea for you
to consider.




This bug report was last modified 8 years and 79 days ago.

Previous Next


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