[Geany-devel] [PATCH] Behavior of opening filenames with colons from the command line

Colomban Wendling lists.ban at xxxxx
Mon Aug 16 01:57:25 UTC 2010

Hi Lex!

Le 16/08/2010 03:25, Lex Trotman a écrit :
> Hi Colomban,
> I am not criticising your attempt at improving this, instead I think
> the whole idea of trying to have the line and column info on the
> filename is wrong and will NEVER always be right until we make Geany a
> mind reader (although if its reading my mind it will probably still be
> wrong :-) because we can't think of all the ways "inventive"
> programmers will come up with to structure filenames with :nn on the
> end.
> The +line --line and --column options are there to give an unambiguous
> position and the :line:col capability should be removed.
Even though I totally agree that the :line:column filename-suffix cannot
be guessed right in all cases, and will never can, I think it is really
Why? because many tools (compilers, grep, etc.) outputs the line/column
information this way. This means that to open the correct file at the
correct line after a `rgrep -n` the only thing I have to do is to copy
the whole string (which generally can be selected in a single operation
since it is considered as a single "word") and pass it as an argument to
geany, and, how wonderful, it does exactly what I expect!
The other syntax are good and ways stricter, but aren't as useful IMO
because (I speak for me) we generally don't want to open a file on a
specific line unless we got that line information from somewhere else --
which is often gcc or grep.

This said, again, I don't (want to) believe that people create /real/
files that ends with :nn. I played with this kind of suffixes only after
seeing the bug report, and only for the sake of it. Then I'd totally
understand that you -- or anybody reasonable, not me ;) -- don't want to
waste more time on this "issue" :)

> Just in case it was common I checked vim and emacs documentation and
> AFAICT neither does it.  Emacs supports +line:col as an arg but not
> part of the filename.
I don't believe that this should prevent Geany to do so if it is a good
idea :) But perhaps it means it isn't a good idea...


More information about the Devel mailing list