瀏覽代碼

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.
Nicolas Goaziou 14 年之前
父節點
當前提交
97de64cfc3
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      lisp/org-clock.el

+ 4 - 1
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)