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
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
[-- 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 --]
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
>
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 >
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 >> >