Hi Carsten,
On 2008-11-25 20:27:31(+0100), Carsten Dominik wrote:
On Nov 25, 2008, at 12:46 PM, James TD Smith wrote:
On 2008-11-24 09:58:49(+0100), Carsten Dominik wrote:
On Nov 24, 2008, at 12:25 AM, James TD Smith wrote:
I think it would make sense to move the code to get values for
remember
expansions out of `org-remember-apply-template' into separate
functions.
These could be added to an association list indexed by the
expansion
character. This would also make it easier to add new expansions.
Yes. However, it is necessary to keep the sequence of handling
the escapes,
in particular first filling in all non-interactive ones, and only
then
doing the interactive ones.
I'll probably use two lists, one of interactive escapes and one of
non-interactive escapes.
I believe it makes some sense to fill in the interactive parts in
place, while
the partially filled template is visible. The context may help.
I agree. I'm not going to change that.
** Plists for remember templates
Ah, this will be a big relieve when it is implemented, should
have been
like this from the start.
I want to change the format of remember templates to use plists.
This is
to allow introducing a number of optional parameters to control
the new
features I want to add. Org uses plists elsewhere, for example
in the
#+OPTIONS: configuration header, and #+PLOT: lines, so the
syntax should
already be familiar to org users.
I also think it would make sense to to move some options which are
currently set using escapes outside of the template,
specifically "%!"
(store template immediately) and "%&" (jump to entry after
storing).
Yes, this wil be much better.
I was thinking that maybe some other expansions should be moved
into the
template, specifically those which don't insert their values where
the %
expansion is.
For example instead of
,----
| ("Video" ?v "* TOWATCH %^{Title} %^g%^{Type}p%^{Length}p%^{Year}"
| "~/Personal/Video.org" top)
`----
we could have
,----
| (?v :name "Video" "* TOWATCH %^{Title}" :tags file :properties
| ("Type" "Length" "Year") :target "~/Personal/
Video.org" :prepend t)
`----
I think the latter is much better for adding properties,
particularly if you
want to have a template with a lot of them.
This is an interesting idea. The TODO state could also be done in
this way,
maybe offering the fast selection interface for TODO states.
Yes. An expansion for TODO states might be useful as well.
While one could have a property for explicitly selecting a type
like table
row or plain-list item or checkbox, it would also be possible to
derive
this from the Remember buffer content automatically. Which method
is
better?
I think using the property would be easier to implement, but
automatically
figuring out what kind of entry to insert will be needed to handle
entries
without templates.
Will we have entries without templates?
Yes, for two reasons: freeform entry with the possibility of
applying a template
later (see my reply to Samuel Wales' suggestions), and so remember
can be used
to add non-org items (possibly with other remember handlers).
I'd like two-key access for templates anyway; I have a number of
similar
templates which are scattered over the available keys and could be
grouped
together more logically with two stage selection.
Hmm. I am not sure if the two-key selection code from the agenda
can be easily
refactored for this case, so maybe we need to duplicate this
functionality, or
re-write the selector for agenda custom commands.
Is `org-agenda-get-restriction-and-command' the method I should be
looking at?