Hi Xebar,

Xebar Saram <zelt...@gmail.com> 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