Le 16/08/2010 04:50, Lex Trotman a écrit :
On 16 August 2010 11:57, Colomban Wendling lists.ban@herbesfolles.org wrote:
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.
But Geany parses the output of compiles/greps etc run from within it where it knows that the :line:col will always be added and then you can just click on the line in the message window. Perfect for Lazy Programmers (TM), ie me
Yeah, but needs to have thought of calling grep from Geany, which is not always the case for me :-/
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...
I think its not a good idea as the default since Geany can be used by other software (eg filemanagers) to open/create files with any name.
If the file exists, that's not a problem, neither now nor with my patch, since Geany will detect that it exists and open it as-is, without trying to strip the line/columns.
And with my patch it's even better, since if the file to be opened at a given line/column doesn't exist, it forgets the line and columns and opens the full path as given -- no line/column stripping. I think that the only problem users can see with the behavior of the patch is if they have the files "foo:0" and "foo:0:1" and they want to open "foo:0" at line 1 with the :nn syntax.
I mean, with the patch, Geany can be used transparently with files that have :nn suffixes -- apart using the :nn suffix to open at a given line/column that doesn't always do magic (but almost).
But maybe add a command line option to specify that the filename IS suffixed with :line:col so you can still paste terminal output. Perhaps -a and --at.
Perhaps it's a possibility, yes -- even though I'd prefer to be able to set it as the default.
Cheers, Colomban