emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: [RFC/PATCH] org-goto: Update for isearch changes
Date: Mon, 03 Nov 2014 11:58:00 -0500	[thread overview]
Message-ID: <87sii0rzl3.fsf@kyleam.com> (raw)
In-Reply-To: <87fve0g002.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Mon, 03 Nov 2014 09:29:49 +0100")

[-- Attachment #1: Type: text/plain, Size: 368 bytes --]

Nicolas Goaziou <mail@nicolasgoaziou.fr> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-goto-Update-for-isearch-changes.patch --]
[-- Type: text/x-diff, Size: 2080 bytes --]

From 2d560370d1626544265d2c21559a0f138ef39ec9 Mon Sep 17 00:00:00 2001
From: Kyle Meyer <kyle@kyleam.com>
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

<http://thread.gmane.org/gmane.emacs.orgmode/92317>
---
 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


[-- Attachment #3: Type: text/plain, Size: 10 bytes --]


-- 
Kyle

  reply	other threads:[~2014-11-03 16:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-02 21:31 [RFC/PATCH] org-goto: Update for isearch changes Kyle Meyer
2014-11-02 22:27 ` Nicolas Goaziou
2014-11-02 22:44   ` Kyle Meyer
2014-11-02 23:33     ` Nicolas Goaziou
2014-11-02 23:56       ` Kyle Meyer
2014-11-03  5:12         ` Kyle Meyer
2014-11-03  8:29           ` Nicolas Goaziou
2014-11-03 16:58             ` Kyle Meyer [this message]
2014-11-03 20:11               ` Nicolas Goaziou
2014-11-03 20:19                 ` Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sii0rzl3.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).