* Bug: :clock-in not working in org-capture-templates [7.9.1 (release_7.9.1-274-g2f4d76)]
@ 2012-09-21 2:47 Levin Du
2012-09-21 13:43 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: Levin Du @ 2012-09-21 2:47 UTC (permalink / raw)
To: emacs-orgmode
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/)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Bug: :clock-in not working in org-capture-templates [7.9.1 (release_7.9.1-274-g2f4d76)]
2012-09-21 2:47 Bug: :clock-in not working in org-capture-templates [7.9.1 (release_7.9.1-274-g2f4d76)] Levin Du
@ 2012-09-21 13:43 ` Bastien
0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2012-09-21 13:43 UTC (permalink / raw)
To: Levin Du; +Cc: emacs-orgmode
Hi Levin,
Levin Du <zslevin@gmail.com> writes:
> 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:
Applied, thanks for catching this!
--
Bastien
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-21 13:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-21 2:47 Bug: :clock-in not working in org-capture-templates [7.9.1 (release_7.9.1-274-g2f4d76)] Levin Du
2012-09-21 13:43 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).