emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Bug: :clock-in not working in org-capture-templates [7.9.1 (release_


From: Levin Du
Subject: [O] Bug: :clock-in not working in org-capture-templates [7.9.1 (release_7.9.1-274-g2f4d76)]
Date: Fri, 21 Sep 2012 10:47:25 +0800

Hi there,

I find :clock-in not work in org-capture-templates, with initial empty heading:

(setq org-capture-templates
      '(("j" "Journal" entry (file+datetree "")
         "* %?\n%U\n%i\n" :clock-in t :clock-resume t)))

I proposed the patch:

        Modified   lisp/org-clock.el
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index b8db2d1..674a5d7 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1180,7 +1180,8 @@ make this the default behavior.)"
                  (cond ((and org-clock-heading-function
                              (functionp org-clock-heading-function))
                         (funcall org-clock-heading-function))
-                       ((looking-at org-complex-heading-regexp)
+                       ((and (looking-at org-complex-heading-regexp)
+                             (match-string 4))
                         (replace-regexp-in-string
                          "\\[\\[.*?\\]\\[\\(.*?\\)\\]\\]" "\\1"
                          (match-string 4)))

Thanks

Emacs  : GNU Emacs 24.2.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
 of 2012-08-31 on tchip-levcom
Package: Org-mode version 7.9.1 (release_7.9.1-274-g2f4d76 @ 
/home/zslevin/sd/emacs24-starter-kit/src/org-mode/lisp/)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]