diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2009-02-11 16:17:38 +0100 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2009-02-11 16:17:38 +0100 |
commit | 651d2e7a147bcff7737fe65979686a0a61e4a712 (patch) | |
tree | 781a294c3bb4d9abbbaa5897c84f77e48b8a0fc5 | |
parent | f993ecd67d7fc5be4b688857fe3be0bf3aaa11f1 (diff) | |
download | org-mode-651d2e7a147bcff7737fe65979686a0a61e4a712.tar.gz |
Bugfix: Allow org-clock-into-drawer to be 1.
-rwxr-xr-x | lisp/ChangeLog | 2 | ||||
-rw-r--r-- | lisp/org-clock.el | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7209a5e..d8d324d 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,8 @@ * org-clock.el (org-clock-find-position): Do not swallow an item less indented than the CLOCK line itself. (org-clock-in): Push markers to lin after the clock line. + (org-clock-find-position): Handle values of + `org-clock-into-drawer' smaller than 2. * org-exp.el (org-html-level-start): Add a CSS class to section numbers. diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 5f5e9d7..baf836c 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -395,6 +395,7 @@ the clocking selection, associated with the letter `d'." last (match-beginning 0) cnt (1+ cnt))) (when (and (integerp org-clock-into-drawer) + last (>= (1+ cnt) org-clock-into-drawer)) ;; Wrap current entries into a new drawer (goto-char last) @@ -420,7 +421,9 @@ the clocking selection, associated with the letter `d'." ;; Planning info, skip to after it (beginning-of-line 2) (or (bolp) (newline))) - (when (eq t org-clock-into-drawer) + (when (or (eq org-clock-into-drawer t) + (and (integerp org-clock-into-drawer) + (< org-clock-into-drawer 2))) (insert ":CLOCK:\n:END:\n") (beginning-of-line 0) (org-indent-line-function) |