From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: remapping C-c ' to another key Date: Wed, 30 Jul 2014 11:24:54 +0200 Message-ID: References: <87y4vcoz97.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCQ89-0002se-IO for emacs-orgmode@gnu.org; Wed, 30 Jul 2014 05:25:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCQ7z-0003tq-Dm for emacs-orgmode@gnu.org; Wed, 30 Jul 2014 05:25:05 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:26017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCQ7z-0003th-7H for emacs-orgmode@gnu.org; Wed, 30 Jul 2014 05:24:55 -0400 In-Reply-To: <87y4vcoz97.fsf@gmail.com> (Thorsten Jolitz's message of "Tue, 29 Jul 2014 19:23:16 +0200") 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: Thorsten Jolitz Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2014-07-29 19:23, Thorsten Jolitz writes: > Alan Schmitt writes: > >> Hello, >> >> I'm trying to remap ~C-c '~ to ~ '~ and I'm having some >> trouble. More specifically, I'm able to initiate the editing part using >> a global binding to `org-edit-special', but I don't know how to bind the >> same key to `org-edit-src-exit' when I'm editing a source block. As >> I suspect I will also need to change the binding for other special edit >> buffers, I'm wondering if there is a way to do it all at once. > > you are in org-mode when you call `org-edit-special', thus you could do > > ,---- > | (org-defkey org-mode-map "KEY" `org-edit-special) > `---- > > > then you are in some major-mode with minor-mode 'org-src-mode' active, > thus > > ,---- > | (org-defkey org-src-mode-map "KEY" `org-edit-src-exit) > `---- > > should work (completely untested though ...) It works great, thanks a lot. A followup question: why use ` and not ' before the function name? Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBCgAGBQJT2LnmAAoJEAQNCjtO0uXHi74H/RachGad3XOx76hhijJy4niA ASVO03q2CLgLswG80mrJDRRMcYgM9rTgfYPlZo41TEMozNb46w8rPfadCxA7LR1J /hQJWxZWFeGyFDxPpvbOQ5WAMPb7/JbWJvs5qI/DfwS1aE3md4lKtaKqXBiRW5Q8 GtROzDzmfQ5xGCzCxv5D9bjYg167TEsPUl5X5hONPKGMQmsueG2P4ojU9vxZIcmw UAwQHQ6DZeJJoZF5igVQkjPpOADxMf6TfGCrK6lseq2x92eNBO5ki0pf5zkmgnqL eyadlZW5HPFYGCiKUdFZkTJ5V0eKOWEVfgBVO0tm7hIpEiox957ggVSUK2lZi2g= =4Zlq -----END PGP SIGNATURE----- --=-=-=--