mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-05 11:45:52 +00:00
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.
This commit is contained in:
parent
a5f080361a
commit
cdb13c76e4
@ -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.
|
||||
|
@ -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)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user