* can you require a certain template with lognotedone?
@ 2010-07-13 1:05 Michael Gilbert
2010-07-13 4:17 ` Juan
2010-07-13 12:18 ` Matt Lundin
0 siblings, 2 replies; 4+ messages in thread
From: Michael Gilbert @ 2010-07-13 1:05 UTC (permalink / raw
To: emacs-orgmode Mailinglist
Hi —
I asked Darlan this off-list and then I realized that it might be of broader interest.
I require a note when certain TODOs are changed to DONE. These are almost always some sort of structured logging. Is there a way to call org-capture and/or require a certain template for that note? That would be a very powerful workflow for me.
TIA
— Michael
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: can you require a certain template with lognotedone?
2010-07-13 1:05 can you require a certain template with lognotedone? Michael Gilbert
@ 2010-07-13 4:17 ` Juan
2010-07-13 12:18 ` Matt Lundin
1 sibling, 0 replies; 4+ messages in thread
From: Juan @ 2010-07-13 4:17 UTC (permalink / raw
To: Michael Gilbert; +Cc: emacs-orgmode Mailinglist
Michael,
Have a look at org-log-note-headings customization variable,
together with org-log-done and friends.
All these are quite static text you can configure, so probably then
do not accomplish what you ask for.
Maybe a good-enough solution is to store your template as a register
and then insert it in the note-taking buffer.
Throw something like this in your .emacs:
(set-register ?n "This is\nmy template\n")
so that C-x r i n will insert that text.
///----------------------------------------///
If you're feeling strange and are willing to change the code here:
in file org.el, line ~10880 (current git pull):
;; It is now done, and it was not done before
(org-add-planning-info 'closed (org-current-time))
(if (and (not dolog) (eq 'note org-log-done))
(org-add-log-setup 'done state this
'findpos 'note)))
after the 'note, add your template as a string (or a lisp function
that provides a string (template) depending on the context/setup):
... 'findpos 'note "this is\\nmy template")))
The string is an optional parameter for org-add-log-setup which will
be copied into the Org-Note buffer.
Good luck!
.j.
On Mon, Jul 12, 2010 at 06:05:43PM -0700, Michael Gilbert wrote:
> I require a note when certain TODOs are changed to DONE. These are
> almost always some sort of structured logging. Is there a way to
> call org-capture and/or require a certain template for that note?
> That would be a very powerful workflow for me.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: can you require a certain template with lognotedone?
2010-07-13 1:05 can you require a certain template with lognotedone? Michael Gilbert
2010-07-13 4:17 ` Juan
@ 2010-07-13 12:18 ` Matt Lundin
2010-07-13 16:58 ` Michael Gilbert
1 sibling, 1 reply; 4+ messages in thread
From: Matt Lundin @ 2010-07-13 12:18 UTC (permalink / raw
To: Michael Gilbert; +Cc: emacs-orgmode Mailinglist
Hi Michael,
Michael Gilbert <mcg@gilbert.org> writes:
> I require a note when certain TODOs are changed to DONE. These are
> almost always some sort of structured logging. Is there a way to call
> org-capture and/or require a certain template for that note? That
> would be a very powerful workflow for me.
You could use org-after-todo-state-change-hook to call a function that
invokes org-capture, using arbitrary tests to see if the current entry
has a particular property, etc.
Best,
Matt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: can you require a certain template with lognotedone?
2010-07-13 12:18 ` Matt Lundin
@ 2010-07-13 16:58 ` Michael Gilbert
0 siblings, 0 replies; 4+ messages in thread
From: Michael Gilbert @ 2010-07-13 16:58 UTC (permalink / raw
To: emacs-orgmode Mailinglist
>> I require a note when certain TODOs are changed to DONE. These are
>> almost always some sort of structured logging. Is there a way to call
>> org-capture and/or require a certain template for that note? That
>> would be a very powerful workflow for me.
>
> You could use org-after-todo-state-change-hook to call a function that
> invokes org-capture, using arbitrary tests to see if the current entry
> has a particular property, etc.
Thank you. This may be beyond my skill right now. And as Darlan pointed out to me offlist, this might be something that should be framed more generically. I do need to start learning about hooks though.
— Michael
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-13 16:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-13 1:05 can you require a certain template with lognotedone? Michael Gilbert
2010-07-13 4:17 ` Juan
2010-07-13 12:18 ` Matt Lundin
2010-07-13 16:58 ` Michael Gilbert
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.