summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2011-02-25 18:50:29 +0100
committerNicolas Goaziou <n.goaziou@gmail.com>2011-02-25 18:50:29 +0100
commit97de64cfc3a9b177a8129f500d73a673bd8e11d7 (patch)
treec00f0d9c230bc1554da01f2a7b538ac069cea58e
parent7745ad28c355bdc686897f613f31d826e85d375c (diff)
downloadorg-mode-97de64cfc3a9b177a8129f500d73a673bd8e11d7.tar.gz
org-clock: take full adjacent list when wraping clocks into a drawer
* lisp/org-clock.el (org-clock-find-position): if a list was adjacent to some clocks and a drawer was going to be created, only the first element of the list would make it into the drawer.
-rw-r--r--lisp/org-clock.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 3c7028e..6d484f5 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1253,7 +1253,10 @@ line and position cursor in that line."
(beginning-of-line 2)
(if (and (>= (org-get-indentation) ind-last)
(org-at-item-p))
- (org-end-of-item))
+ (when (and (>= (org-get-indentation) ind-last)
+ (org-at-item-p))
+ (let ((struct (org-list-struct)))
+ (goto-char (org-list-get-bottom-point struct)))))
(insert ":END:\n")
(beginning-of-line 0)
(org-indent-line-to ind-last)