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: Bastien
Subject: Re: [O] binding org-id-goto to a key
Date: Sat, 01 Mar 2014 08:01:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

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]