[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: |
Sat, 09 Dec 2023 10:55:23 +0100 |
User-agent: |
Evolution 3.46.4 |
Am Samstag, dem 09.12.2023 um 10:24 +0100 schrieb Ludovic Courtès:
> Hi Liliana,
>
> Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:
>
> > > > Maybe we can check for a guix_editor shell function and invoke
> > > > that
> > > > rather than EDITOR if defined?
> > >
> > > ‘guix edit’ cannot “invoke” a shell function though.
> > >
> > > I was thinking of something more gross, like checking whether the
> > > basename of $EDITOR is ‘kate’ or ‘vscode’ and in that case do
> > > whatever is relevant for those editors.
> > >
> > > WDYT?
> > I see your gross "checking whether the basename of $EDITOR is
> > ‘kate’…" and I raise my "use $GUIX_EDITOR which uses substring
> > replacements for ${LINE} and ${FILE} implemented in pure Guile
> > code"
>
> I’m not sure I understand your proposal. Are you suggesting that
> ‘GUIX_EDITOR’ would contain arbitrary Scheme code that ‘guix edit’
> would evaluate?
No, it'd contain the shell-esque "${LINE}" and "${FILE}" that would get
replaced by Scheme code looking for those strings.
Cheers