unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Michael Hoffman" <emacs-hoffman@snkmail.com>
Cc: 68160@debbugs.gnu.org
Subject: bug#68160: 29.1; Windows installer: add Emacs bin directory to PATH
Date: Sun, 31 Dec 2023 09:29:46 +0200	[thread overview]
Message-ID: <83il4e3k45.fsf@gnu.org> (raw)
In-Reply-To: <20602-1703980796-86809@sneakemail.com> (emacs-hoffman@snkmail.com)

> Date: Sat, 30 Dec 2023 23:59:55 +0000
> From: "Michael Hoffman" <emacs-hoffman@snkmail.com>
> 
> Could the Windows installer add $INSTDIR\emacs-${VERSION_BRANCH}\bin to
> PATH?
> 
> I've started installing Emacs on Windows via WinGet, which is very nice,
> and so much works out of the box, but Emacs commands are not added to
> PATH like they are with Chocolatey. Currently, WinGet does not support
> adding to PATH for packages with an installer, like Emacs.
> 
> If not, would it be possible to add an option to the installer to do
> this? A WinGet package could include that as a custom installer option
> <https://github.com/microsoft/winget-pkgs/blob/master/doc/manifest/schema/1.5.0/installer.md>.

This is up to the person who maintains the Windows install kit for
Emacs, but IMO this should be an optional feature.  On many Windows
systems, changing the environment variables is a privileged operation,
dictated by policy, and will be rejected.  Moreover, modern Windows
systems maintain two lists of Path values: one for the current user
and another that is system-wide, and there are various limitations
about changing each one.

When I install software via an installer, I generally don't want it to
modify my PATH, because those installers have no idea how I manage my
PATH.  For starters, should the Emacs's bin directory be prepended or
appended to the existing PATH value?  That is not a trivial question
to answer, since the Emacs installer comes with DLLs and executables
other than Emacs, and those might interfere with other software
installed on the system.

There be dragons!

OTOH, manually adding the bin directory to your PATH, if you have that
privilege, is easy enough.





  reply	other threads:[~2023-12-31  7:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-30 23:59 bug#68160: 29.1; Windows installer: add Emacs bin directory to PATH Michael Hoffman
2023-12-31  7:29 ` Eli Zaretskii [this message]
2024-01-11 20:58   ` Stefan Kangas
2024-01-12  5:53     ` Corwin Brust

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://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83il4e3k45.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=68160@debbugs.gnu.org \
    --cc=emacs-hoffman@snkmail.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/emacs.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).