The previous string was a bit confusing what the placeholders could mean. There was an error in the German translation where the second placeholder was interpreted as template name instead of the error message. This change should make it more clear and also put the error message to the end of the string. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1166
-- Commit Summary --
* Improve template command error message
-- File Changes --
M src/templates.c (4)
-- Patch Links --
https://github.com/geany/geany/pull/1166.patch https://github.com/geany/geany/pull/1166.diff
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/1166
@elextr any wording improvements or the like?
@eht16 my question would be why is the "Check the path" part there if the error message is being printed right after it? I think there have been previous discussions about such suggestions conflicting with the error message.
If it is worthwhile keeping it, for example if we know that path errors are the most likely, then have it say something like "Hint: errors in the template path are a common cause of problems".
Or (at least on *ix) check for ENOENT before printing the suggestion.
I'd like to keep the notice because the command path in the template is the user input and so rather likely to be the cause. However, there is no "template path" here. The context is a custom command (http://geany.org/manual/#special-command-wildcard) in a template has failed.
So maybe rather: "Hint: errors in the command path in the template are a common cause of problems" ?
Checking for `ENOENT` probably causes more problems because we first had to parse and somewhat interpret the command. In an ideal world, the error message from the subsystem would properly describe what went wrong and so we would not need to guess. But at least on Windows, error messages are sometimes rather random text than helpful, IMHO.
Oh, path IN the template, of course it is, but I had been reading it path OF the template as you realised :)
In fact more specifically isn't it a path in the command, which is printed out immediately before the hint?
In which case the hint could be "Hint: incorrect paths in the command are a common cause of errors."
@eht16 pushed 1 commit.
9d50343 Further improve template command error message
Thanks, I added your sugestion in the last commit (to be squashed before merging). Here is an example: ``` 23:21:08: Geany WARNING : Cannot execute template command "unae -a". Hint: incorrect paths in the command are a common cause of errors. Error: No such file or directory. ``` Here the command was "unae -a" instead of "uname -a".
LGTM
Merged #1166.
github-comments@lists.geany.org