diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2009-06-17 16:49:56 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2009-06-17 16:49:56 +0200 |
commit | cdb13c76e41886f46cd136d45544b98855f6a1ec (patch) | |
tree | e1471d8d11903a122963b0ef1ebf01e8ab004934 | |
parent | a5f080361aae47a1ea495066bace9d3adae28726 (diff) | |
download | org-mode-cdb13c76e41886f46cd136d45544b98855f6a1ec.tar.gz |
Remember: Allow template target headline to be a function
The target headline in a remember template may by be a function that
will be called to computer the real headline to be used.
-rwxr-xr-x | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/org-remember.el | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 05bfa8c..a7f264c 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2009-06-17 Carsten Dominik <carsten.dominik@gmail.com> + * org-remember.el (org-remember-templates): Allow the headline + element to be a function. + (org-remember-apply-template): If the headline is a function, call + it to get the true function. + * org-clock.el (org-clock-menu): New function. (org-clock-update-mode-line): Update help string. (org-clock-modify-effort-estimate): New function. diff --git a/lisp/org-remember.el b/lisp/org-remember.el index ac62bde..cd50905 100644 --- a/lisp/org-remember.el +++ b/lisp/org-remember.el @@ -186,6 +186,7 @@ calendar | %:type %:date" (const :tag "Use `org-default-notes-file'" nil)) (choice :tag "Destin. headline" (string :tag "Specify") + (function :tag "Function") (const :tag "Use `org-remember-default-headline'" nil) (const :tag "At beginning of file" top) (const :tag "At end of file" bottom)) @@ -431,6 +432,8 @@ to be run from that hook to function properly." (when (functionp file) (setq file (funcall file))) + (when (functionp headline) + (setq headline (funcall headline))) (when (and file (not (file-name-absolute-p file))) (setq file (expand-file-name file org-directory))) |