<html><head><title>Bug in template {filename} evaluation ?</title>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-15">
</head>
<body>
<span style=" font-family:'Arial'; font-size: 9pt;">I don't know if this is the place to talk about possible bugs in a nightly build. If not, please direct me to the proper place.<br>
<br>
With that said...<br>
<br>
Geany 0.21 "Gromia", built Feb 25 2011, RHEL6, Xfce 4.6<br>
<br>
When saving a new file created from a template, the expansion of {filename} in the header doesn't always accurately reflect the filename used when saving. For example in the following tests you can see where some of the {filename} wildcards expanded with an extra extension appended to the filename. Then again, I could be doing something wrong... ?<br>
<br>
<span style=" font-family:'courier new';">Template         Saved as         {filename} expansion<br>
<br>
file.html        x.html                x.html.html<br>
file.php        x.php                x.php.php<br>
file.pl        x.pl                x.pl.pl<br>
main.cpp        x.cpp                x.cpp.cpp<br>
file.sh        x.sh                x.sh<br>
main.c                x.c                x.c<br>
<br>
file.html        y                y.html<br>
file.php        y                y.php<br>
file.pl        y                y.pl<br>
main.cpp        y                y.cpp<br>
file.sh        y                y<br>
main.c                y                y<br>
<br>
<span style=" font-family:'Arial';">From this simple test it appears the sh and c templates are the only ones being named properly upon saving. These are customized templates, but I can find no suspicous difference betwen those that work and those that don't. <br>
<br>
Here are the actual templates, if that helps :<br>
<br>
<span style=" font-family:'courier new';">---------------------------------------------------------------------------<br>
file.html<br>
<br>
<!-- <br>
  -- {filename}<br>
  -- {developer} ({mail})<br>
  -- {company}<br>
  -- Created {datetime}<br>
  --><br>
<br>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<br>
"<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>"><br>
<html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>" xml:lang="en" lang="en"><br>
<head><br>
<title>{untitled}</title><br>
<meta http-equiv="content-type" content="text/html;charset=utf-8" /><br>
<meta name="generator" content="{geanyversion}" /><br>
</head><br>
<br>
<body><br>
<br>
</body><br>
</html><br>
---------------------------------------------------------------------------<br>
<br>
---------------------------------------------------------------------------<br>
file.php<br>
<br>
<?php<br>
/*<br>
* {filename}<br>
* {developer} ({mail})<br>
* {company}<br>
* Created {datetime}<br>
*/<br>
?><br>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<br>
"<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>"><br>
<html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>" xml:lang="en" lang="en"><br>
<head><br>
<title>{untitled}</title><br>
<meta http-equiv="content-type" content="text/html;charset=utf-8" /><br>
<meta name="generator" content="{geanyversion}" /><br>
</head><br>
<br>
<body><br>
<br>
</body><br>
</html><br>
---------------------------------------------------------------------------<br>
<br>
---------------------------------------------------------------------------<br>
file.pl<br>
<br>
#!/usr/bin/perl<br>
<br>
# {filename}<br>
# {developer} ({mail})<br>
# {company}<br>
# Created {datetime}<br>
<br>
=pod<br>
=cut<br>
<br>
use strict;<br>
use warnings;<br>
---------------------------------------------------------------------------<br>
<br>
---------------------------------------------------------------------------<br>
main.cpp<br>
<br>
// {filename}<br>
// {developer} ({mail})<br>
// {company}<br>
// Created {datetime}<br>
<br>
#include <iostream><br>
<br>
int main(int argc, char *argv[])<br>
{<br>
<br>
return 0;<br>
}<br>
---------------------------------------------------------------------------<br>
<br>
---------------------------------------------------------------------------<br>
file.sh<br>
<br>
#!/bin/bash<br>
<br>
# {filename}<br>
# {developer} ({mail})<br>
# {company}<br>
# Created {datetime}<br>
---------------------------------------------------------------------------<br>
<br>
---------------------------------------------------------------------------<br>
main.c<br>
<br>
/*<br>
* {filename}<br>
* {developer} ({mail})<br>
* {company}<br>
* Created {datetime}<br>
*/<br>
<br>
#include <stdio.h><br>
#include <stdlib.h><br>
<br>
int main(int argc, char *argv[])<br>
{<br>
<br>
return EXIT_SUCCESS;<br>
}<br>
---------------------------------------------------------------------------<br>
<br>
<br>
<span style=" font-family:'Arial'; font-size: 10pt;">Thanks!<br>
<br>
<span style=" font-family:'bitstream vera sans mono'; font-size: 9pt;">--<br>
<span style=" font-family:'arial'; font-size: 10pt; color: #666699;">Len Philpot<span style=" font-family:'bitstream vera sans mono';"> -<span style=" font-size: 9pt;"> l e n @ p h i l p o t . o r g   <i>(no spaces)<br>
</i>><>   http://philpot.org/ - http://lphilpot.zenfolio.com<br>
      <span style=" font-family:'arial';">Read my story:<span style=" font-family:'bitstream vera sans mono';"> http://www.mostimportantthing.org<span style=" font-family:'Arial'; font-size: 10pt; color: #000000;">  </body>