summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-05-10 22:29:53 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-05-10 22:42:38 +0200
commitd1786a0908ee46f2a0749a845d44e0854410f130 (patch)
tree5955b880f514a680eae098265da3d07890f4ca25
parent83e373f109e58900201e7cb3daa8bbebd7121b84 (diff)
downloadorg-mode-d1786a0908ee46f2a0749a845d44e0854410f130.tar.gz
org-clock: Fix generated drawer when `org-clock-into-drawer' is numerical
* lisp/org-clock.el (org-clock-find-position): Create a default "LOGBOOK" drawer when `org-clock-into-drawer' is a numeric value. Reported-by: Carlos Noguera <carlos.francisco.noguera@gmail.com> <http://permalink.gmane.org/gmane.emacs.orgmode/106886>
-rw-r--r--lisp/org-clock.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 143f749..e4b5189 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -560,7 +560,7 @@ of a different task.")
(defun org-clock-drawer-name ()
"Return clock drawer's name for current entry, or nil."
(let ((drawer (org-clock-into-drawer)))
- (cond ((integerp drawer) (org-log-into-drawer))
+ (cond ((integerp drawer) (or (org-log-into-drawer) "LOGBOOK"))
((stringp drawer) drawer)
(t nil))))
@@ -1514,9 +1514,9 @@ line and position cursor in that line."
;; When a clock drawer needs to be created because of the
;; number of clock items or simply if it is missing, collect
;; all clocks in the section and wrap them within the drawer.
- ((or drawer
- (and (wholenump org-clock-into-drawer)
- (>= (1+ count) org-clock-into-drawer)))
+ ((if (wholenump org-clock-into-drawer)
+ (>= (1+ count) org-clock-into-drawer)
+ drawer)
;; Skip planning line and property drawer, if any.
(org-end-of-meta-data)
(let ((beg (point)))