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

Randy Kramer rhkramer at xxxxx
Fri Apr 15 11:51:05 UTC 2011

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.  

More likely, I'd want them changed (and "captured") when a document is 

But, I strongly suggest matching the behavior to other similar 
applications (i.e., editors / word processors).

Randy Kramer

More information about the Devel mailing list