[Geany-devel] {datetime} & {date} are updated only after config reload

Frank Lanitz frank at xxxxx
Fri Apr 15 16:35:22 UTC 2011


On Fri, 15 Apr 2011 22:57:00 +1000
Lex Trotman <elextr at gmail.com> wrote:

> On 15 April 2011 21:51, Randy Kramer <rhkramer at gmail.com> wrote:
> > On Thursday 14 April 2011 08:02:17 pm Lex Trotman wrote:
> >> Yes the {datetime} and {date} are substituted when the templates are
> >> initialised, usually when Geany is opened.  As you say this may not
> >> be very useful.
> >>
> >> This can be changed just by moving the call to
> >> templates_replace_default_dates, but where to?
> >>
> >> Options are:
> >>
> >> 1. when the document is created from the template
> >> 2. when the document is saved as a file (when untitled gets replaced)
> >>
> >> Votes please.
> >
> > I haven't yet used those templates (and might never, my file format is a
> > multi-record format and I will want to timestamp the creation of each
> > record, but I anticipate doing that with a recorded (or Lua) macro).
> >
> > I can't remember how those dates are handled in something like Microsoft
> > Word (the last time I can remember using something like those
> > tempates--but close to 10 years ago, now), but I'm pretty sure it would
> > *not* be a good idea to change them each time the document is saved.
> 
> Apologies if it was unclear, but after the {date} or {datetime} marker
> is *replaced* by the date/time the first time it no longer exists so
> no further updates occur.

What about moving this to request time? So not parsing at startup but
parsing it when requested by user to insert? 

Cheers, 
Frank
-- 
Frank Lanitz <frank at frank.uvena.de>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20110415/26b4af66/attachment.pgp>


More information about the Devel mailing list