emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* set-keys in orgtble mode
@ 2008-05-22 16:50 Eric Schulte
  2008-05-22 18:02 ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2008-05-22 16:50 UTC (permalink / raw)
  To: Org-mode

Hi,

I very much enjoy using orgtble mode, however there are some functions
which I run over and over org-table-delete-column, and
org-table-insert-row, etc... it is not clear if there is a way to
define key mappings such that they only take effect inside of tables.
Would it be possible to do this using the familiar
local/global-set-key syntax?

Should I write my own orgtble-hijacker-command-### functions?

Also, is there a good way to display the available table commands
other than grepping the org-mode help?

Thanks for the great tool!
Eric

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: set-keys in orgtble mode
  2008-05-22 16:50 set-keys in orgtble mode Eric Schulte
@ 2008-05-22 18:02 ` Carsten Dominik
  2008-05-22 21:38   ` Eric Schulte
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2008-05-22 18:02 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org-mode

Hi Eric,

On May 22, 2008, at 6:50 PM, Eric Schulte wrote:
> Hi,
>
> I very much enjoy using orgtble mode, however there are some functions
> which I run over and over org-table-delete-column, and
> org-table-insert-row, etc...

That would be M-S-<left> and M-S-<down>, can't you use these keys?


> it is not clear if there is a way to
> define key mappings such that they only take effect inside of tables.
> Would it be possible to do this using the familiar
> local/global-set-key syntax?

> Should I write my own orgtble-hijacker-command-### functions?

To add your own keys, you can do something like this, in orgtbl-mode- 
hook.

(org-defkey orgtbl-mode-map "\C-cd"
             (orgtbl-make-binding 'org-table-delete-column 1001 "\C- 
cd"))

Note that you need to give the key twice, and the 1001 should be a  
unique number.
Instead of org-defkey, you can use define-key.  org-defkey is the same,
only that it obeys the variable org-disputed-keys.

>
> Also, is there a good way to display the available table commands
> other than grepping the org-mode help?

Looking at the menu, it contains a pretty much complete list of  
commands.
Or how about the refcard?  Pretty complete, too.

- Carsten

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: set-keys in orgtble mode
  2008-05-22 18:02 ` Carsten Dominik
@ 2008-05-22 21:38   ` Eric Schulte
  2008-05-23  6:22     ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2008-05-22 21:38 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Org-mode

Hi Carsten,

Thanks for the pointers, currently M-S-<left> and M-S-<down> are
intercepted by my window manager (xfce), but the

 > To add your own keys, you can do something like this, in orgtbl-mode- 
 > hook.
 > 
 > (org-defkey orgtbl-mode-map "\C-cd"
 >              (orgtbl-make-binding 'org-table-delete-column 1001 "\C- 
 > cd"))

form looks very manageable.

Much Appreciated,
Eric

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: set-keys in orgtble mode
  2008-05-22 21:38   ` Eric Schulte
@ 2008-05-23  6:22     ` Carsten Dominik
  2008-05-23  6:25       ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2008-05-23  6:22 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org-mode


On May 22, 2008, at 11:38 PM, Eric Schulte wrote:

> Hi Carsten,
>
> Thanks for the pointers, currently M-S-<left> and M-S-<down> are
> intercepted by my window manager (xfce), but the
>
>> To add your own keys, you can do something like this, in orgtbl-mode-
>> hook.
>>
>> (org-defkey orgtbl-mode-map "\C-cd"
>>             (orgtbl-make-binding 'org-table-delete-column 1001 "\C-
>> cd"))
>
> form looks very manageable.

I actually should modify this so that it is not required to give the key
again at the end....  Will do so.

- Carsten

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: set-keys in orgtble mode
  2008-05-23  6:22     ` Carsten Dominik
@ 2008-05-23  6:25       ` Carsten Dominik
  0 siblings, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2008-05-23  6:25 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Org-mode


On May 23, 2008, at 8:22 AM, Carsten Dominik wrote:

>
> On May 22, 2008, at 11:38 PM, Eric Schulte wrote:
>
>> Hi Carsten,
>>
>> Thanks for the pointers, currently M-S-<left> and M-S-<down> are
>> intercepted by my window manager (xfce), but the
>>
>>> To add your own keys, you can do something like this, in orgtbl- 
>>> mode-
>>> hook.
>>>
>>> (org-defkey orgtbl-mode-map "\C-cd"
>>>            (orgtbl-make-binding 'org-table-delete-column 1001 "\C-
>>> cd"))
>>
>> form looks very manageable.
>
> I actually should modify this so that it is not required to give the  
> key
> again at the end....  Will do so.


Ooops, no, this is not possible.  Please ignore my last message.

- Carsten

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-05-23  6:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-22 16:50 set-keys in orgtble mode Eric Schulte
2008-05-22 18:02 ` Carsten Dominik
2008-05-22 21:38   ` Eric Schulte
2008-05-23  6:22     ` Carsten Dominik
2008-05-23  6:25       ` Carsten Dominik

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).