From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: Simon Tournier <zimon.toutoune@gmail.com>,
Guix Devel <guix-devel@gnu.org>
Subject: Re: $EDITOR and “guix edit”
Date: Thu, 02 Nov 2023 11:24:56 +0100 [thread overview]
Message-ID: <416a6472edf6d2123c47ea5b555bedd005f6ac6f.camel@gmail.com> (raw)
In-Reply-To: <86wmv0o5gi.fsf@gmail.com>
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. Since less used +N,
many other tools inherited it from it; POSIX requires -p for more since
2008 instead (ironically, it laments the incompatibility with vi and
ex, which use -c).
> 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
>
> This had been raised in #44272 [1]. The current fix is to wrap
> $EDITOR and then make the current correct call.
>
> The question is:
>
> do we tweak “guix edit” for behaving differently depending on
> $EDITOR?
>
> or
>
> do we provide some wrappers for the issues that already popped up?
I think we should at least document our behaviour, so that there's
"less surprise" (at the very least, we can point surprised folk towards
the manual/cookbook then). Going forward, we might want to call upon
some standards committee to finally have +LINE:COL or similar
standardized behaviour for $EDITOR and $VISUAL and then use that.
Cheers
next prev parent reply other threads:[~2023-11-02 10:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 9:43 $EDITOR and “guix edit” Simon Tournier
2023-11-02 10:24 ` Liliana Marie Prikler [this message]
2023-11-16 15:25 ` Ludovic Courtès
2023-11-16 16:04 ` Liliana Marie Prikler
2023-11-20 9:40 ` Simon Tournier
2023-11-20 19:33 ` Liliana Marie Prikler
2024-01-12 9:35 ` Simon Tournier
2024-01-12 17:39 ` Liliana Marie Prikler
2024-01-12 18:49 ` Simon Tournier
2024-01-12 19:46 ` Liliana Marie Prikler
2024-01-12 21:27 ` Simon Tournier
2023-11-22 18:21 ` Ludovic Courtès
2023-11-22 19:24 ` Liliana Marie Prikler
2023-12-09 9:24 ` Ludovic Courtès
2023-12-09 9:55 ` Liliana Marie Prikler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=416a6472edf6d2123c47ea5b555bedd005f6ac6f.camel@gmail.com \
--to=liliana.prikler@gmail.com \
--cc=guix-devel@gnu.org \
--cc=zimon.toutoune@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).