Subject: Re: bug#15342: 24.3.50; isearch wrap is replaced with multi-isearch

From: Juri Linkov <[email-masked]>
Date: Wed, 11 Sep 2013 22:59:40 +0300

> Alas, I cannot reproduce the problem from "emacs -Q". Sorry.
>
> I get this error since I rebuilt and restarted emacs this morning,
> I use desktop-save-mode, so all my many buffer are restored.
>
> When I hit C-s repeatedly, expecting isearch wrap to the BOB,
> I get this error instead:
>
> Debugger entered--Lisp error: (void-function nil)
>   nil(#<buffer bt2.json> t)
>   multi-isearch-wrap()
>   isearch-repeat(forward)
>   isearch-repeat-forward()
>   call-interactively(isearch-repeat-forward nil nil)
>   command-execute(isearch-repeat-forward)
>
> Obviously I am somehow stuck in misearch, and I wonder how to get out of it.
>
> Also, it would be nice if misearch completely exited when
> multi-isearch-next-buffer-current-function is nil.

It's easy to add a check for the nil value of
multi-isearch-next-buffer-current-function,
but I'd like to find the root cause of this problem.
Maybe this is related to desktop saving.  Do you add the variable
multi-isearch-next-buffer-current-function to your desktop-locals-to-save?