<br><br><div class="gmail_quote">On 7 May 2010 22:56, Nick Treleaven <span dir="ltr"><<a href="mailto:nick.treleaven@btinternet.com">nick.treleaven@btinternet.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Fri, 7 May 2010 22:18:57 +1000<br>
<div class="im">Lex Trotman <<a href="mailto:elextr@gmail.com">elextr@gmail.com</a>> wrote:<br>
<br>
</div><div class="im">> Perhaps the {filename} could be left in the file until it is saved the first<br>
> time and all occurrences replaced.  But then, are there any languages where<br>
> that is a valid sequence? Looks vaguely like Perl or Ruby but its been a<br>
> while since I've used them??  </div></blockquote><div><br>Right near the beginning, my Ruby book has the example line :-)<br><br>puts "Can't open file #{filename}"<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Maybe templates are going to have to force<br>
> immediate saving so they can get a filename.<br>
<br>
</div>After the 0.19 release I think we could maybe do this:<br>
Replace {filename} with e.g. {GEANY_TEMPLATE_filename} and set a<br>
document flag. When first saving the new file, if the flag is set,<br>
replace {GEANY_TEMPLATE_filename} with the real filename.<br>
<br>
I think that string is unlikely to occur in a file, and much less in an<br>
unsaved document.<br></blockquote><div><br>Good solution, then also GEANY_TEMPLATE_filebase and I would request GEANY_TEMPLATE_filebasecaps for use in header guards where macros should be all caps.  <br><br>I don't think this uglification is needed for the substitutions that are made as the template is loaded, just those made at save time after the user has time to type any arbitrary text, but you might want to make them all consistent.<br>
<br>Cheers<br>Lex<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
> As for the scrambled screen, I'm not sure what that is, but it probably<br>
> isn't related to the template, does it happen with any other existing files?<br>
><br>
> I suggest that you post the tgz to the mailing list (taking out anything<br>
> that you don't want on a public forum of course) so that Nick/Enrico can<br>
> look at it.<br>
<br>
</div>Maybe post in a new thread.<br>
<br>
Regards,<br>
<font color="#888888">Nick<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Geany mailing list<br>
<a href="mailto:Geany@uvena.de">Geany@uvena.de</a><br>
<a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany</a><br>
</div></div></blockquote></div><br>