From: Levin Du <zslevin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: 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 [thread overview]
Message-ID: <87mx0kdrcy.fsf@gmail.com> (raw)
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/)
next reply other threads:[~2012-09-21 2:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-21 2:47 Levin Du [this message]
2012-09-21 13:43 ` Bug: :clock-in not working in org-capture-templates [7.9.1 (release_7.9.1-274-g2f4d76)] Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mx0kdrcy.fsf@gmail.com \
--to=zslevin@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).