emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] binding org-id-goto to a key


From: Xebar Saram
Subject: Re: [O] binding org-id-goto to a key
Date: Sat, 1 Mar 2014 13:08:26 +0200

Thx Bastien

as always your answers are spot on and brilliant. i want to personally thank you again for everything you've contributed to the community in the past years, anytime i read a blog post of yours or a post in the  mailing lists its always such a joy. its really appreciated!

best

Z


On Sat, Mar 1, 2014 at 9:01 AM, Bastien <address@hidden> wrote:
Hi Xebar,

Xebar Saram <address@hidden> writes:

> im trying to bind some headers to specific keys using the org-id-goto
> command and so far have this:
>
> (global-set-key (kbd "<f9> l") 'org-id-goto
> "8460d499-ea32-4693-a8d4-0d08b00ba3f3")
>
> but im aware that this code isnt wrong. can anyone guide me in the
> right direction?

(global-set-key (kbd "C-<f9>")
  (lambda ()
    (interactive)
      (org-id-goto "8460d499-ea32-4693-a8d4-0d08b00ba3f3")))


For (kbd "<f9> l") to work, you need to have f9 to be a prefix key,
so I changed it to (kbd "C-<f9>") for my own test.

(lambda () ...) is an anonymous function.

(interactive) makes the function an interactive command, which is
needed for the form to be bound to the key.

HTH,

--
 Bastien


reply via email to

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