Liliana Marie Prikler <liliana.prik...@gmail.com> skribis:

> Am Donnerstag, dem 02.11.2023 um 10:43 +0100 schrieb Simon Tournier:
>> Hi,
>> 
>> The command “guix edit” returns “+N path/to/file” that is then passed
>> to $EDITOR.  Therefore $EDITOR needs the command line:
>> 
>>     $ $EDITOR +N /path/to/file
>> 
>> Well, that is accepted by many $EDITOR, to my knowledge.  At least,
>> Emacs, Vi or less are fine with it.
> This appears to be a somewhat archaic convention.

“Archaic” is one way to describe it; I’d have said “standard”.  :-)
(Implemented by Vi(m), Emacs, Nano, less, more, etc.)

>> However, some other $EDITOR does not.  I have in mind “kate” or
>> “VSCode“,
>> 
>>     $ kate -l N path/to/file
>>     $ code --goto path/to/file:N

It’d be nice to support these as well.  However, how do we know we’re
dealing with kate or VSCode?  By checking the basename of $EDITOR?
Kinda ugly and brittle, but probably better than nothing.

Thanks,
Ludo’.

Reply via email to