unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrew Tropin via Guix-patches via <guix-patches@gnu.org>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 68180@debbugs.gnu.org,
	Katherine Cox-Buday <cox.katherine.e+guix@gmail.com>,
	Liliana Marie Prikler <liliana.prikler@gmail.com>
Subject: [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	[thread overview]
Message-ID: <87a5pofcd1.fsf@trop.in> (raw)
In-Reply-To: <87y1d8o5cn.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1832 bytes --]

On 2024-01-01 21:07, Maxim Cournoyer wrote:

> Hi Andrew,
>
> Andrew Tropin <andrew@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2024-01-02  7:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1704041948.git.maxim.cournoyer@gmail.com>
2023-12-31 16:59 ` [bug#68180] [PATCH 1/4] gnu: emacs: Add awk, find, sed and sh to PATH wrapper Maxim Cournoyer
2023-12-31 19:13   ` Liliana Marie Prikler
2023-12-31 21:10     ` Maxim Cournoyer
2024-01-01  7:33       ` Andrew Tropin via Guix-patches via
2024-01-02  2:07         ` Maxim Cournoyer
2024-01-02  7:00           ` Andrew Tropin via Guix-patches via [this message]
2024-01-02 16:34             ` Maxim Cournoyer
2024-01-19  3:17               ` bug#68180: " Maxim Cournoyer
2023-12-31 16:59 ` [bug#68180] [PATCH 2/4] build: perl: Accept Gexps for #:module-build-flags Maxim Cournoyer
2023-12-31 16:59 ` [bug#68180] [PATCH 3/4] gnu: perl-b-keywords: Update to 1.26 Maxim Cournoyer
2023-12-31 16:59 ` [bug#68180] [PATCH 4/4] gnu: Add emacs-pde Maxim Cournoyer

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=87a5pofcd1.fsf@trop.in \
    --to=guix-patches@gnu.org \
    --cc=68180@debbugs.gnu.org \
    --cc=andrew@trop.in \
    --cc=cox.katherine.e+guix@gmail.com \
    --cc=liliana.prikler@gmail.com \
    --cc=maxim.cournoyer@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).