From mboxrd@z Thu Jan 1 00:00:00 1970 From: Deric Bytes Subject: SOLVED: clock in after org-remember based on TODO Date: Thu, 9 Apr 2009 17:41:13 +0100 Message-ID: <59b700510904090941v315ce9bs316b550c2a3be977@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LrxJY-0004lc-5t for emacs-orgmode@gnu.org; Thu, 09 Apr 2009 12:41:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LrxJT-0004jT-E0 for emacs-orgmode@gnu.org; Thu, 09 Apr 2009 12:41:19 -0400 Received: from [199.232.76.173] (port=41889 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrxJT-0004jP-4o for emacs-orgmode@gnu.org; Thu, 09 Apr 2009 12:41:15 -0400 Received: from mail-bw0-f167.google.com ([209.85.218.167]:41098) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LrxJS-0004j8-M2 for emacs-orgmode@gnu.org; Thu, 09 Apr 2009 12:41:14 -0400 Received: by bwz11 with SMTP id 11so732097bwz.42 for ; Thu, 09 Apr 2009 09:41:13 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org I couldn't find any documentation on how to do it. Here's the code I modified from an answer to a slightly different question. ;; start the clock if there is a STARTED todo tag is in your remember template (add-hook 'org-remember-before-finalize-hook 'my-start-clock-if-needed) (defun my-start-clock-if-needed () (save-excursion (goto-char (point-min)) (when (re-search-forward "* STARTED" nil t) (org-clock-in)))) ;; an example remember template (setq org-remember-templates '(("Task" ?t "* %^{Task status|TODO|STARTED|SUBTASK} %^{Brief Description} %^G\n %^{subject}p %^{other-subjects}p %^{sub-subjects}p %^{keywords}p %?\nCalled from: %a\nAdded: %U " "~/notes/notes-log-090410.org"))