emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* binding org-id-goto to a key
@ 2014-03-01  5:27 Xebar Saram
  2014-03-01  7:01 ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Xebar Saram @ 2014-03-01  5:27 UTC (permalink / raw)
  To: org mode

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

hi all

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?

best

Z

[-- Attachment #2: Type: text/html, Size: 465 bytes --]

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

* Re: binding org-id-goto to a key
  2014-03-01  5:27 binding org-id-goto to a key Xebar Saram
@ 2014-03-01  7:01 ` Bastien
  2014-03-01 11:08   ` Xebar Saram
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2014-03-01  7:01 UTC (permalink / raw)
  To: Xebar Saram; +Cc: org mode

Hi Xebar,

Xebar Saram <zeltakc@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

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

* Re: binding org-id-goto to a key
  2014-03-01  7:01 ` Bastien
@ 2014-03-01 11:08   ` Xebar Saram
  0 siblings, 0 replies; 3+ messages in thread
From: Xebar Saram @ 2014-03-01 11:08 UTC (permalink / raw)
  To: Bastien, org mode

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

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 <bzg@gnu.org> wrote:

> Hi Xebar,
>
> Xebar Saram <zeltakc@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
>

[-- Attachment #2: Type: text/html, Size: 1883 bytes --]

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

end of thread, other threads:[~2014-03-01 11:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-01  5:27 binding org-id-goto to a key Xebar Saram
2014-03-01  7:01 ` Bastien
2014-03-01 11:08   ` Xebar Saram

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