From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: how to bind keys in orgtbl-mode Date: Thu, 15 Dec 2011 09:11:03 +0100 Message-ID: References: <878vmltojo.fsf@mat.ucm.es> <80pqfq1det.fsf@somewhere.org> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:56928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rb6PE-0006PH-Pr for emacs-orgmode@gnu.org; Thu, 15 Dec 2011 03:11:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rb6PD-0003fY-Pj for emacs-orgmode@gnu.org; Thu, 15 Dec 2011 03:11:08 -0500 Received: from pony.ic.uva.nl ([145.18.40.181]:51667) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rb6PD-0003fM-IC for emacs-orgmode@gnu.org; Thu, 15 Dec 2011 03:11:07 -0500 In-Reply-To: <80pqfq1det.fsf@somewhere.org> 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: Sebastien Vauban Cc: emacs-orgmode@gnu.org 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