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

Lex Trotman elextr at xxxxx
Fri Apr 15 12:57:00 UTC 2011


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.

Cheers
Lex

>
> More likely, I'd want them changed (and "captured") when a document is
> created.
>
> But, I strongly suggest matching the behavior to other similar
> applications (i.e., editors / word processors).
>
> Randy Kramer
>
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>



More information about the Devel mailing list