emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] how to bind keys in orgtbl-mode


From: Carsten Dominik
Subject: Re: [O] how to bind keys in orgtbl-mode
Date: Thu, 15 Dec 2011 09:11:03 +0100

On 15.12.2011, at 08:50, Sebastien Vauban wrote:

> Hi Carsten,
> 
> Carsten Dominik wrote:
>> On 9.12.2011, at 22:36, Uwe Brauer wrote:
>>> I would like to have the same binding as in org-mode
>>> 
>>> (local-set-key [(control c) (control w)] 'org-table-wrap-region)
>> 
>> We could just add this to the standard orgtbl bindings - don't know why
>> this is not the case.  OK, I just did that.
>> 
>>> (local-set-key [(control c) (control h)] 'org-table-insert-hline)
>> 
>> This one on the other hand violates Emacs conventions, so
>> we cannot do this by default.
> 
> FMI, why is the second violating Emacs conventions?  I don't really grap a
> difference between both, and I'm not aware of the convention which would
> become broken there.

C-c is a prefix key.  As with all prefix keys, if you follow
with C-h (h for help), a list of key bindings in that prefix
map is displayed.  This is automatic and is one of the
self-documenting features of Emacs.  If you bind
C-c C-h to a different command, the user looses helpful display.

Try, for example C-x C-h or C-c C-x C-h to see what I mean.
I hardly use this, but I do use it to remind myself of
rarely used rectangle commands: C-x r C-h

Cheers

- Carsten



reply via email to

[Prev in Thread] Current Thread [Next in Thread]