summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-02-24 10:35:28 +0100
committerCarsten Dominik <carsten.dominik@gmail.com>2010-02-24 10:35:28 +0100
commita27d1c296379305609fcf841e923b58a18861307 (patch)
treefce8729866c63e879516ff10f52389561e6efe73
parent0afc4633f797815ab8b31e4377e0e129cbc8b379 (diff)
downloadorg-mode-a27d1c296379305609fcf841e923b58a18861307.tar.gz
Remember: Allow to file as sibling of current clock
Patch by Lukasz Stelmach.
-rw-r--r--doc/org.texi14
-rwxr-xr-xlisp/ChangeLog5
-rw-r--r--lisp/org-remember.el9
3 files changed, 18 insertions, 10 deletions
diff --git a/doc/org.texi b/doc/org.texi
index dd7dfdd..19583d9 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -5968,13 +5968,13 @@ now@footnote{To avoid this query, configure the variable
will continue to run after the note was filed away.
The handler will then store the note in the file and under the headline
-specified in the template, or it will use the default file and headline.
-The window configuration will be restored, sending you back to the working
-context before the call to Remember. To re-use the location found
-during the last call to Remember, exit the Remember buffer with
-@kbd{C-0 C-c C-c}, i.e. specify a zero prefix argument to @kbd{C-c C-c}.
-Another special case is @kbd{C-2 C-c C-c} which files the note as a child of
-the currently clocked item.
+specified in the template, or it will use the default file and headline. The
+window configuration will be restored, sending you back to the working
+context before the call to Remember. To re-use the location found during the
+last call to Remember, exit the Remember buffer with @kbd{C-0 C-c C-c},
+i.e. specify a zero prefix argument to @kbd{C-c C-c}. Another special case
+is @kbd{C-2 C-c C-c} which files the note as a child of the currently clocked
+item, and @kbd{C-3 C-c C-c} files as a sibling of the currently clocked item.
@vindex org-remember-store-without-prompt
If you want to store the note directly to a different place, use
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ef23971..20cb4d0 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2010-02-24 Carsten Dominik <carsten.dominik@gmail.com>
+
+ * org-remember.el (org-remember-apply-template): Extend comment.
+ (org-remember-handler): Implement clock sibling filing.
+
2010-02-23 Carsten Dominik <carsten.dominik@gmail.com>
* org-publish.el (org-publish-all, org-publish-current-file)
diff --git a/lisp/org-remember.el b/lisp/org-remember.el
index c229946..1312e51 100644
--- a/lisp/org-remember.el
+++ b/lisp/org-remember.el
@@ -479,7 +479,7 @@ to be run from that hook to function properly."
## C-u C-c C-c like C-c C-c, and immediately visit note at target location
## C-0 C-c C-c \"%s\" -> \"* %s\"
## %s to select file and header location interactively.
-## C-2 C-c C-c as child of the currently clocked item
+## C-2 C-c C-c as child (C-3: as sibling) of the currently clocked item
## To switch templates, use `\\[org-remember]'. To abort use `C-c C-k'.\n\n"
(if org-remember-store-without-prompt " C-c C-c" " C-1 C-c C-c")
(abbreviate-file-name (or file org-default-notes-file))
@@ -869,6 +869,7 @@ See also the variable `org-reverse-note-order'."
(previousp (and (member current-prefix-arg '((16) 0))
org-remember-previous-location))
(clockp (equal current-prefix-arg 2))
+ (clocksp (equal current-prefix-arg 3))
(fastp (org-xor (equal current-prefix-arg 1)
org-remember-store-without-prompt))
(file (cond
@@ -891,7 +892,7 @@ See also the variable `org-reverse-note-order'."
visiting (and file (org-find-base-buffer-visiting file))
heading (cdr org-remember-previous-location)
fastp t))
- (when clockp
+ (when (or clockp clocksp)
(setq file (buffer-file-name (marker-buffer org-clock-marker))
visiting (and file (org-find-base-buffer-visiting file))
heading org-clock-heading-for-remember
@@ -1024,7 +1025,9 @@ See also the variable `org-reverse-note-order'."
(beginning-of-line 2)
(end-of-line 1)
(insert "\n"))))
- (org-paste-subtree (org-get-valid-level level 1) txt)
+ (org-paste-subtree (if clocksp
+ level
+ (org-get-valid-level level 1)) txt)
(and org-auto-align-tags (org-set-tags nil t))
(bookmark-set "org-remember-last-stored")
(move-marker org-remember-last-stored-marker (point)))