From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Is it possible to use the refile interface to select the heading for clocking? Date: Sat, 09 Jan 2016 13:40:56 +0100 Message-ID: <87oacvylgn.fsf@gmx.us> References: <87io336iw6.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHspR-0003xe-2p for emacs-orgmode@gnu.org; Sat, 09 Jan 2016 07:41:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHspN-0003Wo-T4 for emacs-orgmode@gnu.org; Sat, 09 Jan 2016 07:41:08 -0500 Received: from plane.gmane.org ([80.91.229.3]:33776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHspN-0003Wh-MJ for emacs-orgmode@gnu.org; Sat, 09 Jan 2016 07:41:05 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aHspL-00039N-G1 for emacs-orgmode@gnu.org; Sat, 09 Jan 2016 13:41:03 +0100 Received: from 179.43.177.226 ([179.43.177.226]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 09 Jan 2016 13:41:03 +0100 Received: from rasmus by 179.43.177.226 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 09 Jan 2016 13:41:03 +0100 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: emacs-orgmode@gnu.org Marcin Borkowski writes: > Hi all, > > and thanks in advance;-)! Maybe something like this? (defun rasmus/org-clock-in (&optional DEFAULT-BUFFER NEW-NODES NO-EXCLUDE) "Clock in remotely" (interactive) (save-excursion (goto-char (nth 3 (org-refile-get-location "clock in" DEFAULT-BUFFER NEW-NODES NO-EXCLUDE))) (org-clock-in))) You could also cook your own locator, e.g. (org-goto-local-search-headings (ido-completing-read "File note to: " (org-element-map (org-element-parse-buffer) 'headline (lambda (hl) (and (= (org-element-property :level hl) 1) (org-element-property :title hl))))) nil nil) Hope it helps, Rasmus -- Even a three-legged dog has three good legs to lose