Subject: Re: bug#21663: 25.0.50; isearch-edit-string dont resume multi-isearch-files

From: Tino Calancha <[email-masked]>
Date: Tue, 13 Oct 2015 10:35:31 +0900 (JST)

> I wonder why ‘isearch-mode-end-hook-quit’ is not initialized as
> ‘(and nopush edit)’ in the first place?  If it was so, then
> you could just check for it in ‘multi-isearch-end’.

My understanding about that variable (i may be wrong) is that is should
be non nil just when the user quit the search with
C-g
we dont want this variable being non nil in the case of editing the string
with the idea to resume the same kind of search.

> have you tried to re-initialize multi-isearch on resuming isearch
> after exiting from the minibuffer?  (This could be achieved by
> remembering its state variables).

I like your proposal: this way is more consistent with the original code.
See attached new patch.

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 4fc9b38..74b1250 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1242,6 +1242,14 @@ with-isearch-suspended
 	      (isearch-adjusted isearch-adjusted)
 	      (isearch-yank-flag isearch-yank-flag)
 	      (isearch-error isearch-error)
+              ;;  multi isearch variables
+	      (multi-isearch-file-list multi-isearch-file-list)
+	      (multi-isearch-buffer-list multi-isearch-buffer-list)
+	      (multi-isearch-next-buffer-current-function multi-isearch-next-buffer-current-function)
+	      (multi-isearch-current-buffer multi-isearch-current-buffer)
+	      (isearch-push-state-function isearch-push-state-function)
+	      (isearch-wrap-function isearch-wrap-function)
+	      (isearch-search-fun-function isearch-search-fun-function)
   ;;; Don't bind this.  We want isearch-search, below, to set it.
   ;;; And the old value won't matter after that.
   ;;;	    (isearch-other-end isearch-other-end)