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: Tue, 17 Dec 2013 07:17:19 +0100 Message-ID: References: <87vbz5zcxv.fsf@mail.jurta.org> <87mwkgay9s.fsf@mail.jurta.org> <877gbi94p9.fsf@mail.jurta.org> <87y53s9rfq.fsf@mail.jurta.org> <8761qoa653.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c245fa7c21c904edb4e1af X-Trace: ger.gmane.org 1387261091 9976 80.91.229.3 (17 Dec 2013 06:18:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Dec 2013 06:18:11 +0000 (UTC) Cc: 16035@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 17 07:18:17 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 1Vsnyy-0000px-8c for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Dec 2013 07:18:16 +0100 Original-Received: from localhost ([::1]:59845 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vsnyx-00070o-Rk for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Dec 2013 01:18:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vsnyp-0006zt-R5 for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2013 01:18:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vsnyk-00036s-TL for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2013 01:18:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vsnyk-00036o-PI for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2013 01:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vsnyk-0005NT-BP for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2013 01:18: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: Tue, 17 Dec 2013 06:18: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.138726104420616 (code B ref 16035); Tue, 17 Dec 2013 06:18:02 +0000 Original-Received: (at 16035) by debbugs.gnu.org; 17 Dec 2013 06:17:24 +0000 Original-Received: from localhost ([127.0.0.1]:54875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vsny7-0005MR-4w for submit@debbugs.gnu.org; Tue, 17 Dec 2013 01:17:23 -0500 Original-Received: from mail-wg0-f52.google.com ([74.125.82.52]:39391) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vsny4-0005MJ-Uy for 16035@debbugs.gnu.org; Tue, 17 Dec 2013 01:17:21 -0500 Original-Received: by mail-wg0-f52.google.com with SMTP id x13so5622727wgg.7 for <16035@debbugs.gnu.org>; Mon, 16 Dec 2013 22:17:19 -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=KBV0VkvClW1iJYB8LD1MoD/Evbgik7ZJFIRJKxmu6yg=; b=kx1PuOZsgdNjO8+qgyQ1hBrAGIhW0IgA/iN/BgaN+9j75RlaB90LDtb3Df3nQvCiL6 irTHgS26W9u8+O2w9XBXm8d86nbaqRSCjn4TS3fHinP7trqAovZRn0/4DzpQyQrlSuG6 zyWO1ftMqXqbWU8/H1uFiTYLxfkdIV6AK+7cKtzII5ScCugsvsPmwk/WMZ2iQHwYEODB eZeOLyud3Eb0UcK2J5nObCDlvp0dZFwKw5gOJsL/vj5zEtwMCEAeTJ7TXAEEfZ5NryQz 9VpuhOPsgG84HJQvx23klmBEdLlREliq8R34tS8mdTbINAZgd3Tk3Fn57RnApSFLbEnb ZlPg== X-Received: by 10.180.9.74 with SMTP id x10mr1360407wia.56.1387261039746; Mon, 16 Dec 2013 22:17:19 -0800 (PST) Original-Received: by 10.216.223.140 with HTTP; Mon, 16 Dec 2013 22:17:19 -0800 (PST) In-Reply-To: <8761qoa653.fsf@mail.jurta.org> 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:82115 Archived-At: --001a11c245fa7c21c904edb4e1af Content-Type: text/plain; charset=ISO-8859-1 Hi! I just tried the patch. It solved the problem I reported. However, when I did some more testing I realized that there is still a difference between ESC and the real meta key. ESC c toggles case-sensitivity. However, Meta-c doesn't (it exits the search). -- Anders On Mon, Dec 16, 2013 at 9:32 PM, Juri Linkov wrote: > > I just found another (minor) detail problem regarding the new isearch > > system. > > > > I sometimes use ESCAPE as the meta key. However, to exit an isearch > search, > > pressing the real meta key (Cmd, on my mac) and < work as intended. > > However, the sequence ESCAPE < does not. Emacs simply responds that > > " < is undefined". > > Hopefully, the following patch fixes this in a correct way. > At least, it works in all tests that I tried: > > C-s ESC < - exits isearch and goes to the top > C-s ESC c - doesn't exit isearch and toggles case-sensitivity > C-s ESC ESC ESC - cancels isearch > > === modified file 'lisp/isearch.el' > --- lisp/isearch.el 2013-12-06 00:55:20 +0000 > +++ lisp/isearch.el 2013-12-16 20:28:12 +0000 > @@ -435,8 +435,7 @@ (defvar isearch-mode-map > ;; would be simpler to disable the global keymap, and/or have a > ;; default local key binding for any key not otherwise bound. > (let ((meta-map (make-sparse-keymap))) > - (define-key map (char-to-string meta-prefix-char) meta-map) > - (define-key map [escape] meta-map)) > + (define-key map (char-to-string meta-prefix-char) meta-map)) > > ;; Several non-printing chars change the searching behavior. > (define-key map "\C-s" 'isearch-repeat-forward) > @@ -453,7 +452,6 @@ (defvar isearch-mode-map > (or (= ?\e meta-prefix-char) > (error "Inconsistency in isearch.el")) > (define-key map "\e\e\e" 'isearch-cancel) > - (define-key map [escape escape escape] 'isearch-cancel) > > (define-key map "\C-q" 'isearch-quote-char) > > --001a11c245fa7c21c904edb4e1af Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi!

I just tried the patch. It solved t= he problem I reported. However, when I did some more testing I realized tha= t there is still a difference between ESC and the real meta key. ESC c togg= les case-sensitivity. However, Meta-c doesn't (it exits the search).

=A0 =A0 -- Anders


On Mon, Dec 16, 2013 at 9:32 PM, Juri L= inkov <juri@jurta.org> wrote:
> I just found another = (minor) detail problem regarding the new isearch
> system.
>
> I sometimes use ESCAPE as the meta key. However, to exit an isearch se= arch,
> pressing the real meta key (Cmd, on my mac) and < work as intended.=
> However, the sequence ESCAPE < does not. Emacs simply responds that=
> "<escape> < is undefined".

Hopefully, the following patch fixes this in a correct way.
At least, it works in all tests that I tried:

C-s ESC < =A0 =A0 =A0 - exits isearch and goes to the top
C-s ESC c =A0 =A0 =A0 - doesn't exit isearch and toggles case-sensitivi= ty
C-s ESC ESC ESC - cancels isearch

=3D=3D=3D modified file 'lisp/isearch.el'
--- lisp/isearch.el =A0 =A0 2013-12-06 00:55:20 +0000
+++ lisp/isearch.el =A0 =A0 2013-12-16 20:28:12 +0000
@@ -435,8 +435,7 @@ (defvar isearch-mode-map
=A0 =A0 =A0;; would be simpler to disable the global keymap, and/or have a<= br> =A0 =A0 =A0;; default local key binding for any key not otherwise bound. =A0 =A0 =A0(let ((meta-map (make-sparse-keymap)))
- =A0 =A0 =A0(define-key map (char-to-string meta-prefix-char) meta-map) - =A0 =A0 =A0(define-key map [escape] meta-map))
+ =A0 =A0 =A0(define-key map (char-to-string meta-prefix-char) meta-map))
=A0 =A0 =A0;; Several non-printing chars change the searching behavior.
=A0 =A0 =A0(define-key map "\C-s" 'isearch-repeat-forward) @@ -453,7 +452,6 @@ (defvar isearch-mode-map
=A0 =A0 =A0(or (=3D ?\e meta-prefix-char)
=A0 =A0 =A0 =A0 (error "Inconsistency in isearch.el"))
=A0 =A0 =A0(define-key map "\e\e\e" 'isearch-cancel)
- =A0 =A0(define-key map =A0[escape escape escape] 'isearch-cancel)

=A0 =A0 =A0(define-key map "\C-q" 'isearch-quote-char)


--001a11c245fa7c21c904edb4e1af--