guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: $EDITOR and “guix edit”


From: Liliana Marie Prikler
Subject: Re: $EDITOR and “guix edit”
Date: Fri, 12 Jan 2024 20:46:06 +0100
User-agent: Evolution 3.46.4

Am Freitag, dem 12.01.2024 um 19:49 +0100 schrieb Simon Tournier:
> Hi,
> 
> On Fri, 12 Jan 2024 at 18:39, Liliana Marie Prikler
> <liliana.prikler@gmail.com> wrote:
> 
> > > Well, I see how to write specific Scheme wrapper around $EDITOR;
> > > as I did in [1].
> > > 
> > > Or, I see how to tweak guix/scripts/edit.scm for running specific
> > > launcher depending on $EDITOR.
> > > 
> > > Liliana, could you provide a proof-of-concept about « the shell-
> > > esque "${LINE}" and "${FILE}" that would get replaced by Scheme
> > > code looking for those strings »?  Because I do not see what you
> > > mean.
> > 
> > (let* ((editor (getenv "GUIX_EDITOR"))
> >        (editor (string-replace-substring editor "${FILE}" the-
> > file))
> >        (editor (string-replace-substring editor "${LINE}" the-
> > line)))
> >   editor)
> > 
> > with the-file and the-line being placeholders for the actual
> > variable names.  You could obviously do smarter things with gash,
> > but let's not go there at the moment.
> 
> I do not understand how it is different from the wrapper I already
> did:
> 
> https://gitlab.com/zimoun/advanced-packages-2023/-/blob/main/vscode-wrapper?ref_type=heads#L70-99
Look at your wrapper, than back at my suggestion, then back at your
wrapper, then back at my suggestion.  Somehow, your wrapper isn't my
suggestion.  Instead, my suggestion is something else entirely, that
doesn't even mention the M$ editor.  Curious how that works.

Cheers

PS: I should probably just write the patch myself at this point, but I
feel like it'll be misunderstood either way.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]