From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: binding org-id-goto to a key Date: Sat, 01 Mar 2014 08:01:47 +0100 Message-ID: <878usu9zc4.fsf@bzg.ath.cx> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJdvo-00006u-EN for emacs-orgmode@gnu.org; Sat, 01 Mar 2014 02:02:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJdvi-00053l-6q for emacs-orgmode@gnu.org; Sat, 01 Mar 2014 02:01:56 -0500 Received: from rs249.mailgun.us ([209.61.151.249]:54030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJdvi-00053h-2Z for emacs-orgmode@gnu.org; Sat, 01 Mar 2014 02:01:50 -0500 In-Reply-To: (Xebar Saram's message of "Sat, 1 Mar 2014 07:27:04 +0200") 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: Xebar Saram Cc: org mode 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