From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xebar Saram Subject: Re: binding org-id-goto to a key Date: Sat, 1 Mar 2014 13:08:26 +0200 Message-ID: References: <878usu9zc4.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c30c7cde7e7704f389920a Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJhmO-00043R-TT for emacs-orgmode@gnu.org; Sat, 01 Mar 2014 06:08:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJhmN-0006fG-VE for emacs-orgmode@gnu.org; Sat, 01 Mar 2014 06:08:28 -0500 In-Reply-To: <878usu9zc4.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien , org mode --001a11c30c7cde7e7704f389920a Content-Type: text/plain; charset=ISO-8859-1 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 wrote: > Hi Xebar, > > Xebar Saram 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 " 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-") > (lambda () > (interactive) > (org-id-goto "8460d499-ea32-4693-a8d4-0d08b00ba3f3"))) > > > For (kbd " l") to work, you need to have f9 to be a prefix key, > so I changed it to (kbd "C-") 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 > --001a11c30c7cde7e7704f389920a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
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 =A0mailing 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&= gt; writes:

> im trying to bind some headers to specific keys using the org-id-goto<= br> > 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>")
=A0 (lambda ()
=A0 =A0 (interactive)
=A0 =A0 =A0 (org-id-goto "8460d499-ea32-4693-a8d4-0d08b00ba3f3"))= )


For (kbd "<f9> l") to work, you need to have f9 to be a pre= fix 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,

--
=A0Bastien

--001a11c30c7cde7e7704f389920a--