[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] remapping C-c ' to another key
From: |
Thorsten Jolitz |
Subject: |
Re: [O] remapping C-c ' to another key |
Date: |
Wed, 30 Jul 2014 11:46:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Alan Schmitt <address@hidden> writes:
Hi Alan,
> On 2014-07-29 19:23, Thorsten Jolitz <address@hidden> writes:
>
>> Alan Schmitt <address@hidden> writes:
>>
>>> Hello,
>>>
>>> I'm trying to remap ~C-c '~ to ~<menu> '~ 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?
Should be a normal quote ', this is just a typo!
Although it does not hurt in this case, but anyway ...
--
cheers,
Thorsten