its a new-file save feature, and it does not appear to be documented, can you raise an issue so its not forgotten.
Done; see https://github.com/geany/geany/issues/753
Indeed 0.21 is very old
So am I
But now at least Geany is rejuvenated; with thanks to http://askubuntu.com/questions/88327/how-do-i-keep-geanys-versions-updated-a...
R
On 11/11/2015 08:36 AM, Lex Trotman wrote:
On 11 November 2015 at 15:04, Little Girl littlergirl@gmail.com wrote:
Hey there,
rch wrote:
That does seem to be part of the problem. Did that and I've now got a template which works almost but not quite. Template and output below the line at (a), (b)
The following wildcards work nicely {fileheader}, {datetime} and {geanyversion} See lines 3, 4, 5
The following wild cards do not work {untitled} and (trying to get the full path) {command:readlink -f {ob}{untitled}{cb}} See lines 2, 6
I'm not sure what's up with this. It might be because there's already one untitled in the template, so the second one isn't expanded on save. It might also be that untitled has to be within the first X number of rows in the file (although there's nothing about that in the manual).
Yes untitled.xxx (where xxx is the file extension) has to be in the first three lines and only the first occurrence is replaced. This has nothing to do with templates, its a new-file save feature, and it does not appear to be documented, can you raise an issue so its not forgotten.
Notice that the first one does expand perfectly when you save the file. As for the opening and closing brace wildcards in {ob}{untitled}{cb}, that could be because the command wildcard literally runs a command in the shell and then sends its output back into Geany. Since the Geany wildcards are unknown to the shell, it either ignores them or has an error (not sure).
There are no substitutes in the command, and the command stops at the first } so its going to be hard to include } in the command.
I tried it without the {ob} and {cb}, with quotes around it with and without the {ob} and {cb}, and with $GEANY_FILENAME with and without quotes around it. I couldn't get any of them to work. The shell isn't getting the data it needs to finish the command. Maybe someone who's reading along will jump in and suggest a better approach. (:
What is curious is that {fileheader} → «foobar.pl» ; good (line 3 ) {untitled} → «untitled» ; bad (line 2)
The $GEANY_FILENAME and friends are only given values if they are known, but the filename isn't known for a new file so the variable is set but to nothing. That may be your problem.
Line 2 actually isn't bad. Remember that you have to add something to the file - either just a press of the Enter key or some typing and a press of the Enter key. Once you do that and save the file, untitled in line 2 will be replaced with the saved file name.
Using Geany ver 0.21 running under Ubuntu 12.04
I'm using Geany version 1.25 under Linux Mint MATE 17.1 'Rebecca'. You might want to upgrade to the latest version of Geany. (:
Indeed 0.21 is very old and no longer supported.
Cheers Lex
... snip ...