[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: $EDITOR and “guix edit”
From: |
Ludovic Courtès |
Subject: |
Re: $EDITOR and “guix edit” |
Date: |
Thu, 16 Nov 2023 16:25:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Liliana Marie Prikler <liliana.prikler@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’.