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.
With that said...
Geany 0.21 "Gromia", built Feb 25 2011, RHEL6, Xfce 4.6
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... ?
Template Saved as {filename} expansion
file.html x.html x.html.html
file.php x.php x.php.php
file.pl x.pl x.pl.pl
main.cpp x.cpp x.cpp.cpp
file.sh x.sh x.sh
main.c x.c x.c
file.html y y.html
file.php y y.php
file.pl y y.pl
main.cpp y y.cpp
file.sh y y
main.c y y
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.
Here are the actual templates, if that helps :
---------------------------------------------------------------------------
file.html
<!--
-- {filename}
-- {developer} ({mail})
-- {company}
-- Created {datetime}
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>{untitled}</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="{geanyversion}" />
</head>
<body>
</body>
</html>
---------------------------------------------------------------------------
---------------------------------------------------------------------------
file.php
<?php
/*
* {filename}
* {developer} ({mail})
* {company}
* Created {datetime}
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>{untitled}</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="{geanyversion}" />
</head>
<body>
</body>
</html>
---------------------------------------------------------------------------
---------------------------------------------------------------------------
file.pl
#!/usr/bin/perl
# {filename}
# {developer} ({mail})
# {company}
# Created {datetime}
=pod
=cut
use strict;
use warnings;
---------------------------------------------------------------------------
---------------------------------------------------------------------------
main.cpp
// {filename}
// {developer} ({mail})
// {company}
// Created {datetime}
#include <iostream>
int main(int argc, char *argv[])
{
return 0;
}
---------------------------------------------------------------------------
---------------------------------------------------------------------------
file.sh
#!/bin/bash
# {filename}
# {developer} ({mail})
# {company}
# Created {datetime}
---------------------------------------------------------------------------
---------------------------------------------------------------------------
main.c
/*
* {filename}
* {developer} ({mail})
* {company}
* Created {datetime}
*/
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
return EXIT_SUCCESS;
}
---------------------------------------------------------------------------
Thanks!
--
Len Philpot - l e n @ p h i l p o t . o r g (no spaces)
><> http://philpot.org/ - http://lphilpot.zenfolio.com
Read my story: http://www.mostimportantthing.org