From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#16035: 24.3.50; Custom isearch broken on trunk (e.g. change-log-mode) Date: Fri, 06 Dec 2013 02:57:22 +0200 Organization: JURTA Message-ID: <877gbi94p9.fsf@mail.jurta.org> References: <87vbz5zcxv.fsf@mail.jurta.org> <87mwkgay9s.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1386291558 4435 80.91.229.3 (6 Dec 2013 00:59:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Dec 2013 00:59:18 +0000 (UTC) Cc: 16035@debbugs.gnu.org, Anders Lindgren To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 06 01:59:22 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VojlF-00016D-L2 for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Dec 2013 01:59:17 +0100 Original-Received: from localhost ([::1]:56858 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VojlF-0007lH-CO for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Dec 2013 19:59:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vojl6-0007bV-D7 for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2013 19:59:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vojl0-0003Ec-CG for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2013 19:59:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vojl0-0003EY-8L for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2013 19:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vojkz-0006s5-R9 for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2013 19:59:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Dec 2013 00:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16035 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16035-submit@debbugs.gnu.org id=B16035.138629149926354 (code B ref 16035); Fri, 06 Dec 2013 00:59:01 +0000 Original-Received: (at 16035) by debbugs.gnu.org; 6 Dec 2013 00:58:19 +0000 Original-Received: from localhost ([127.0.0.1]:60815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VojkI-0006r0-Ls for submit@debbugs.gnu.org; Thu, 05 Dec 2013 19:58:18 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:44241 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VojkG-0006qr-6k for 16035@debbugs.gnu.org; Thu, 05 Dec 2013 19:58:16 -0500 Original-Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 43B3C258B9E935; Thu, 5 Dec 2013 16:58:14 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Wed, 04 Dec 2013 21:45:37 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:81481 Archived-At: >> +(defvar isearch-saved-overriding-local-map nil) > > Oops, now that I see it, I think this one deserves a double-dash. > >> (setq overriding-terminal-local-map isearch-mode-map) >> (run-hooks 'isearch-mode-hook) >> + (setq isearch-saved-overriding-local-map overriding-terminal-local-map) > > Please include a comment referring either to folding-isearch or to this bug. The patch is installed now including these corrections. Now I discovered another case that fails to move point after exiting Isearch. Running `multi-isearch-buffers' and typing e.g. `C-a' exits Isearch but doesn't move point to the beginning of the line. The problem is that `multi-isearch-buffers' let-binds `multi-isearch-buffer-list' to the list of buffers, and invokes `isearch-forward' without NO-RECURSIVE-EDIT, so dynamic binding of `multi-isearch-buffer-list' is available for Isearch to get the next buffer to search. But after exiting in `isearch-pre-command-hook', `isearch-done' calls `exit-recursive-edit' that prevents this-command from executing (in this case `move-beginning-of-line' is not executed). So `isearch-forward' in `multi-isearch-buffers' should be invoked with non-nil NO-RECURSIVE-EDIT argument, and then `multi-isearch-buffer-list' needs to be a global variable. Exactly the same problem exists in `dired-isearch-filenames' that let-binds `dired-isearch-filenames' and calls `isearch-forward' without NO-RECURSIVE-EDIT. And in `comint-history-isearch-backward' that let-binds `comint-history-isearch'. These variables should be global. Maybe this is not the right solution, but I have no better ideas.