GNU bug report logs - #68180
[PATCH 0/4] Add emacs-pde

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Sun, 31 Dec 2023 16:50:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #50 received at 68180 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Tropin <andrew <at> trop.in>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 68180 <at> debbugs.gnu.org, Katherine Cox-Buday <cox.katherine.e+guix <at> gmail.com>,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Subject: Re: [bug#68180] [PATCH 1/4] gnu: emacs: Add awk, find, sed and sh
 to PATH wrapper.
Date: Tue, 02 Jan 2024 10:00:58 +0300
[Message part 1 (text/plain, inline)]
On 2024-01-01 21:07, Maxim Cournoyer wrote:

> Hi Andrew,
>
> Andrew Tropin <andrew <at> trop.in> writes:
>
> [...]
>
>>>> We already have a phase to patch in the real path of /bin/sh where it's
>>>> used.  This appears to be an odd case that's missed.
>>>
>>> I appreciate exactness, but it seems fragile to rely on nobody adding
>>> new references or someone catching them as new Emacs modules get added
>>> or changed :-).
>>>
>>> My reasoning was that since Emacs already depends on bash, why not
>>> ensure it'll always be found on PATH, by wrapping instead of
>>> substituting.
>>>
>>> Does it make sense?
>>
>> Yep, make sense to me. I also find cases from time to time, when some
>> binary or another isn't found by some elisp code.
>>
>> However, providing those binaries via PATH can make some code or
>> programs to work, when executed from inside Emacs and not to work in the
>> environment outside, which can be really confusing in some cases.
>>
>> A simple example, imaging we have a script: 1.sh, which contains:
>> sh --version
>>
>> This one will work:
>> guix shell emacs-with-bash --pure -- emacs --eval '(shell-command "./1.sh")'
>>
>> This one will not:
>> guix shell emacs-with-bash --pure -- ./1.sh
>>
>> That said, the idea of patching all the pathes to binaries seems better
>> to me.
>
> I'm not sure if I got you correctly: do you prefer to wrap Emacs with
> the tools it needs in PATH, or patch the references exactly in its
> source, as Liliana suggested?

I'm more on the "patching the references exactly" side to avoid the
problem mentioned above.

>
> I've tried the "exact" patch suggested by Liliana in v2.  I tested that
> reading a manual page was possible in a containerized environment still
> worked.

👍

-- 
Best regards,
Andrew Tropin
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 1 year and 122 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.