From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anders Lindgren Newsgroups: gmane.emacs.bugs Subject: bug#16035: 24.3.50; Custom isearch broken on trunk (e.g. change-log-mode) Date: Wed, 4 Dec 2013 12:48:52 +0100 Message-ID: References: <87vbz5zcxv.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b873a10454cbe04ecb3ff39 X-Trace: ger.gmane.org 1386157775 24416 80.91.229.3 (4 Dec 2013 11:49:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Dec 2013 11:49:35 +0000 (UTC) Cc: 16035@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 04 12:49:40 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 1VoAx9-0002BL-OI for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Dec 2013 12:49:15 +0100 Original-Received: from localhost ([::1]:47748 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoAx9-0006qo-Al for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Dec 2013 06:49:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoAx1-0006hP-KI for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2013 06:49:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoAww-0007PU-UY for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2013 06:49:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoAww-0007PQ-R0 for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2013 06:49:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VoAww-0001RD-FN for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2013 06:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Dec 2013 11:49:02 +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.13861577385512 (code B ref 16035); Wed, 04 Dec 2013 11:49:02 +0000 Original-Received: (at 16035) by debbugs.gnu.org; 4 Dec 2013 11:48:58 +0000 Original-Received: from localhost ([127.0.0.1]:57420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VoAwr-0001Qn-7N for submit@debbugs.gnu.org; Wed, 04 Dec 2013 06:48:58 -0500 Original-Received: from mail-wg0-f50.google.com ([74.125.82.50]:36473) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VoAwn-0001Qc-Ti for 16035@debbugs.gnu.org; Wed, 04 Dec 2013 06:48:55 -0500 Original-Received: by mail-wg0-f50.google.com with SMTP id a1so13028578wgh.17 for <16035@debbugs.gnu.org>; Wed, 04 Dec 2013 03:48:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=4Ljjr2IqNDuZpAis6rSduXhjpLFM28J2G0M3ndNZoXw=; b=jRtmfxCAWhtqpU6ZzP0gxazJh6ai8Ro4MtUmsGjrvKL/gx13LFEJDA6p2++FgtjoN+ JLUkhpe/8rGehbmLhZaFsBHRp1kOfUOPbbd4A8mtpr4dU/IvDi/i1CNb9XyUmaeiezwT 2pvQYu37r1rIH6tJ8ahkD+kaaY4NOIIaogdSMBd0nx97i4GIRZtJ8immN9wRP+6ZyLrx yEhFDApw8V3JOIykNfJjDZvu8s8aT6sXf+XrBSjgsN2swJ4+5t/ENQ4ImyPpfhlV4cqm uOUTR1aL0J7FyfXt50wtUN/yUMjOq+YOhdRi+UJCVyLjR0IwHHP4pI7xqXM1XpigdG31 kHnw== X-Received: by 10.194.202.230 with SMTP id kl6mr64529663wjc.9.1386157732873; Wed, 04 Dec 2013 03:48:52 -0800 (PST) Original-Received: by 10.216.223.140 with HTTP; Wed, 4 Dec 2013 03:48:52 -0800 (PST) In-Reply-To: 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:81358 Archived-At: --047d7b873a10454cbe04ecb3ff39 Content-Type: text/plain; charset=ISO-8859-1 Hi Stefan! I tried you solution and it works perfectly! Just make sure to save the keymap after the call to "(run-hooks 'isearch-mode-hook)", as this is where packages like "folding" installs its keymap. Juri and Stefan: While looking around the isearch code, I came up with a theory why multi-buffer search in change-log-mode no longer works. isearch adds its hook to the LOCAL pre-command-hook. As change-log-mode search change buffer and the hook is not installed in the new buffer, the user can't exit isearch. Sincerely, Anders Lindgren On Wed, Dec 4, 2013 at 5:31 AM, Stefan Monnier wrote: > > folding.el performs such initialization in > `folding-isearch-hook-function': > > > > (funcall (symbol-function 'set) > > 'overriding-terminal-local-map > folding-isearch-mode-map) > > Maybe folding.el is out of luck and will need to be updated. > > An alternative is to make isearch record the > overriding-terminal-local-map that was set "at the beginning" (which > should be folding-isearch-mode-map for the folding-isearch and > isearch-mode-map in the normal isearch), and then > change the check to > > ((not (eq overriding-terminal-local-map > isearch-saved-overriding-local-map)) > > But depending on how folding-isearch-mode-map is defined this may not be > sufficient, and changes to folding.el will be needed. > > > Stefan > --047d7b873a10454cbe04ecb3ff39 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Stefan!

I tried you solution and it = works perfectly! Just make sure to save the keymap after the call to "= (run-hooks 'isearch-mode-hook)", as this is where packages like &q= uot;folding" installs its keymap.

Juri and Stefan:

While loo= king around the isearch code, I came up with a theory why multi-buffer sear= ch in change-log-mode no longer works. isearch adds its hook to the LOCAL p= re-command-hook. As change-log-mode search change buffer and the hook is no= t installed in the new buffer, the user can't exit isearch.

Sincerely,
=A0 =A0 Anders Lindgren


On Wed, Dec = 4, 2013 at 5:31 AM, Stefan Monnier <monnier@iro.umontreal.ca>= ; wrote:
> folding.el performs such initialization= in `folding-isearch-hook-function':
>
> =A0 =A0 =A0 =A0 =A0 (funcall (symbol-function 'set)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0'overriding-terminal-local-= map folding-isearch-mode-map)

Maybe folding.el is out of luck and will need to be updated.

An alternative is to make isearch record the
overriding-terminal-local-map that was set "at the beginning" (wh= ich
should be folding-isearch-mode-map for the folding-isearch and
isearch-mode-map in the normal isearch), and then
change the check to

=A0 =A0 =A0((not (eq overriding-terminal-local-map
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0isearch-saved-overriding-local-map))

But depending on how folding-isearch-mode-map is defined this may not be sufficient, and changes to folding.el will be needed.


=A0 =A0 =A0 =A0 Stefan

--047d7b873a10454cbe04ecb3ff39--