From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: [RFC/PATCH] org-goto: Update for isearch changes Date: Mon, 03 Nov 2014 11:58:00 -0500 Message-ID: <87sii0rzl3.fsf@kyleam.com> References: <87d295uw5g.fsf@kyleam.com> <87h9yhgrwk.fsf@nicolasgoaziou.fr> <87r3xlnrxn.fsf@kyleam.com> <87oaspfa8t.fsf@nicolasgoaziou.fr> <8738a1upft.fsf@kyleam.com> <87egtkop1p.fsf@kmlap.domain.org> <87fve0g002.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlKxJ-00020n-Hc for emacs-orgmode@gnu.org; Mon, 03 Nov 2014 11:58:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlKxC-0007zk-MP for emacs-orgmode@gnu.org; Mon, 03 Nov 2014 11:58:13 -0500 Received: from mail-qa0-f52.google.com ([209.85.216.52]:51891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlKxC-0007zb-JZ for emacs-orgmode@gnu.org; Mon, 03 Nov 2014 11:58:06 -0500 Received: by mail-qa0-f52.google.com with SMTP id u7so8465820qaz.39 for ; Mon, 03 Nov 2014 08:58:05 -0800 (PST) Received: from localhost (nat-130-132-173-5.central.yale.edu. [130.132.173.5]) by mx.google.com with ESMTPSA id m39sm3317576qgd.28.2014.11.03.08.58.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Nov 2014 08:58:02 -0800 (PST) In-Reply-To: <87fve0g002.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Mon, 03 Nov 2014 09:29:49 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-mode --=-=-= Content-Type: text/plain Nicolas Goaziou wrote: [...] > OK. So let's bind both of them to nil then. Thanks for the > investigation. I've attached an updated patch. It now includes a comment about which version removed isearch-other-control-char, and the commit message has been extended to explain why both 'C-m' and RET are bound to nil. Thanks for your comments. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-org-goto-Update-for-isearch-changes.patch >From 2d560370d1626544265d2c21559a0f138ef39ec9 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 2 Nov 2014 01:32:43 -0400 Subject: [PATCH] org-goto: Update for isearch changes * lisp/org.el (org-goto): Update for isearch changes that removed isearch-other-control-char. isearch-other-control-char has been removed from isearch.el [1]. The default interface for org-goto uses isearch-other-control-char to pass certain key presses from org-goto-local-auto-isearch-map to org-goto-map. Specifically, 'C-i' calls org-cycle and 'C-m' calls org-goto-ret. With the current isearch, the keys that should be passed to org-goto-map can be set to nil. In addition to 'C-i' and 'C-m', RET must also be set to nil because isearch-mode-map sets both 'C-m' and RET. [1] bzr revision 114586, git commit aa04ac2c6, http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15200 --- lisp/org.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 5b365b0..a70275c 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -7523,8 +7523,14 @@ (defun org-get-location (buf help) (defvar org-goto-local-auto-isearch-map (make-sparse-keymap)) (set-keymap-parent org-goto-local-auto-isearch-map isearch-mode-map) -(define-key org-goto-local-auto-isearch-map "\C-i" 'isearch-other-control-char) -(define-key org-goto-local-auto-isearch-map "\C-m" 'isearch-other-control-char) +;; `isearch-other-control-char' was removed in Emacs 24.4. +(if (boundp 'isearch-other-control-char) + (progn + (define-key org-goto-local-auto-isearch-map "\C-i" 'isearch-other-control-char) + (define-key org-goto-local-auto-isearch-map "\C-m" 'isearch-other-control-char)) + (define-key org-goto-local-auto-isearch-map "\C-i" nil) + (define-key org-goto-local-auto-isearch-map "\C-m" nil) + (define-key org-goto-local-auto-isearch-map [return] nil)) (defun org-goto-local-search-headings (string bound noerror) "Search and make sure that any matches are in headlines." -- 2.1.3 --=-=-= Content-Type: text/plain -- Kyle --=-=-=--