emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Assigning a keyboard shortcut
@ 2011-05-10 14:59 John Hendy
  2011-05-10 15:06 ` Matt Lundin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: John Hendy @ 2011-05-10 14:59 UTC (permalink / raw)
  To: emacs-orgmode

This is surely very simple but I can't find it anywhere...

I'm trying to assign org-resolve-clocks to C-c C-r. I tried to just
modify the way that link and agendar are set:
,---
| (global-set-key "\C-ca" 'org-agenda)
`---

So I've tried:
,---
| (global-set-key "\C-c C-r" 'org-resolve-clocks)
| (global-set-key "\C-c \C-r" 'org-resolve-clocks)
| (global-set-key "\C-c\C-r" 'org-resolve-clocks)
`---

and none have worked.
,---
| (global-set-key "\C-cr" 'org-resolve-clocks)
`---

works fine, but I wanted C-c C-r not C-c r. What am I goofing?


Thanks,
John

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

* Re: Assigning a keyboard shortcut
  2011-05-10 14:59 Assigning a keyboard shortcut John Hendy
@ 2011-05-10 15:06 ` Matt Lundin
  2011-05-10 15:07 ` Michael Markert
  2011-05-10 19:06 ` Darlan Cavalcante Moreira
  2 siblings, 0 replies; 6+ messages in thread
From: Matt Lundin @ 2011-05-10 15:06 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

John Hendy <jw.hendy@gmail.com> writes:

> This is surely very simple but I can't find it anywhere...
>
> I'm trying to assign org-resolve-clocks to C-c C-r. I tried to just
> modify the way that link and agendar are set:
[...]
> ,---
> | (global-set-key "\C-c\C-r" 'org-resolve-clocks)
> `---

This one works for me. You could also use this:

(global-set-key (kbd "C-c C-r") 'org-resolve-clocks)

Best,
Matt

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

* Re: Assigning a keyboard shortcut
  2011-05-10 14:59 Assigning a keyboard shortcut John Hendy
  2011-05-10 15:06 ` Matt Lundin
@ 2011-05-10 15:07 ` Michael Markert
  2011-05-10 16:16   ` John Hendy
  2011-05-10 19:06 ` Darlan Cavalcante Moreira
  2 siblings, 1 reply; 6+ messages in thread
From: Michael Markert @ 2011-05-10 15:07 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 201 bytes --]

Hi John,

don't bother and use `kbd':

---------- snip ------------------------------
      (global-set-key (kbd "C-c C-r") 'org-resolve-clocks)
---------- snap ------------------------------

Michael

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: Assigning a keyboard shortcut
  2011-05-10 15:07 ` Michael Markert
@ 2011-05-10 16:16   ` John Hendy
  0 siblings, 0 replies; 6+ messages in thread
From: John Hendy @ 2011-05-10 16:16 UTC (permalink / raw)
  To: Michael Markert; +Cc: emacs-orgmode

Got it -- I found that in my googling, but wondered why the org-mode
setup documentation has the other notation "\C-ca" vs. (kbd "C-c a").

Thanks,
John

On Tue, May 10, 2011 at 10:07 AM, Michael Markert
<markert.michael@googlemail.com> wrote:
> Hi John,
>
> don't bother and use `kbd':
>
> ---------- snip ------------------------------
>      (global-set-key (kbd "C-c C-r") 'org-resolve-clocks)
> ---------- snap ------------------------------
>
> Michael
>

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

* Re: Assigning a keyboard shortcut
  2011-05-10 14:59 Assigning a keyboard shortcut John Hendy
  2011-05-10 15:06 ` Matt Lundin
  2011-05-10 15:07 ` Michael Markert
@ 2011-05-10 19:06 ` Darlan Cavalcante Moreira
  2011-05-10 22:50   ` John Hendy
  2 siblings, 1 reply; 6+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-05-10 19:06 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode


Emacs has different ways to assign key-bindings but the method with kbd
seems to be the best one.

An excellent blog post about key-bindings in Emacs is
http://www.masteringemacs.org/articles/2011/02/08/mastering-key-bindings-emacs/

--
Darlan

At Tue, 10 May 2011 09:59:21 -0500,
John Hendy <jw.hendy@gmail.com> wrote:
> 
> This is surely very simple but I can't find it anywhere...
> 
> I'm trying to assign org-resolve-clocks to C-c C-r. I tried to just
> modify the way that link and agendar are set:
> ,---
> | (global-set-key "\C-ca" 'org-agenda)
> `---
> 
> So I've tried:
> ,---
> | (global-set-key "\C-c C-r" 'org-resolve-clocks)
> | (global-set-key "\C-c \C-r" 'org-resolve-clocks)
> | (global-set-key "\C-c\C-r" 'org-resolve-clocks)
> `---
> 
> and none have worked.
> ,---
> | (global-set-key "\C-cr" 'org-resolve-clocks)
> `---
> 
> works fine, but I wanted C-c C-r not C-c r. What am I goofing?
> 
> 
> Thanks,
> John
> 

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

* Re: Assigning a keyboard shortcut
  2011-05-10 19:06 ` Darlan Cavalcante Moreira
@ 2011-05-10 22:50   ` John Hendy
  0 siblings, 0 replies; 6+ messages in thread
From: John Hendy @ 2011-05-10 22:50 UTC (permalink / raw)
  To: Darlan Cavalcante Moreira; +Cc: emacs-orgmode

On Tue, May 10, 2011 at 2:06 PM, Darlan Cavalcante Moreira
<darcamo@gmail.com> wrote:
>
> Emacs has different ways to assign key-bindings but the method with kbd
> seems to be the best one.
>
> An excellent blog post about key-bindings in Emacs is
> http://www.masteringemacs.org/articles/2011/02/08/mastering-key-bindings-emacs/

I'll say. That was *awesome* -- and thanks for the link to the blog in
general; I suspect I'll be spending a lot of time there and didn't
know about it.


John

>
> --
> Darlan
>
> At Tue, 10 May 2011 09:59:21 -0500,
> John Hendy <jw.hendy@gmail.com> wrote:
>>
>> This is surely very simple but I can't find it anywhere...
>>
>> I'm trying to assign org-resolve-clocks to C-c C-r. I tried to just
>> modify the way that link and agendar are set:
>> ,---
>> | (global-set-key "\C-ca" 'org-agenda)
>> `---
>>
>> So I've tried:
>> ,---
>> | (global-set-key "\C-c C-r" 'org-resolve-clocks)
>> | (global-set-key "\C-c \C-r" 'org-resolve-clocks)
>> | (global-set-key "\C-c\C-r" 'org-resolve-clocks)
>> `---
>>
>> and none have worked.
>> ,---
>> | (global-set-key "\C-cr" 'org-resolve-clocks)
>> `---
>>
>> works fine, but I wanted C-c C-r not C-c r. What am I goofing?
>>
>>
>> Thanks,
>> John
>>
>

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

end of thread, other threads:[~2011-05-10 22:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-10 14:59 Assigning a keyboard shortcut John Hendy
2011-05-10 15:06 ` Matt Lundin
2011-05-10 15:07 ` Michael Markert
2011-05-10 16:16   ` John Hendy
2011-05-10 19:06 ` Darlan Cavalcante Moreira
2011-05-10 22:50   ` John Hendy

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