From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?UmFkb3PFgmF3IEdyemFua2E=?= Subject: Re: Clock-in task when emacs starts Date: Wed, 13 Apr 2011 13:20:43 +0200 Message-ID: <4DA5870B.5010901@gmail.com> References: <4DA42568.4000102@gmail.com> <87k4eztx3e.fsf@norang.ca> Reply-To: radoslawg@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9y8I-0004Jn-HJ for emacs-orgmode@gnu.org; Wed, 13 Apr 2011 07:21:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9y8D-0000Cy-42 for emacs-orgmode@gnu.org; Wed, 13 Apr 2011 07:21:14 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:57259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9y8C-0000CZ-WD for emacs-orgmode@gnu.org; Wed, 13 Apr 2011 07:21:09 -0400 Received: by wyf19 with SMTP id 19so490731wyf.0 for ; Wed, 13 Apr 2011 04:21:08 -0700 (PDT) In-Reply-To: <87k4eztx3e.fsf@norang.ca> 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 Cc: Org-mode ml > --8<---------------cut here---------------start------------->8--- > (require 'org-id) > > (defun bh/clock-in-organization-task () > (interactive) > (bh/clock-in-task-by-id "eb155a82-92b2-4f25-a3c6-0304591af2f9")) > > (defun bh/clock-in-task-by-id (id) > "Clock in a task by id" > (save-restriction > (widen) > (org-with-point-at (org-id-find id 'marker) > (org-clock-in '(16))))) > --8<---------------cut here---------------end--------------->8--- Thanks Bernt, that is so cool. In fact I conceived something simillar but it dependent on exact headline name. Your version is way more versilite. Thanks!