aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2025-07-24 14:49:52 -0700
committerPaul Eggert2025-07-24 22:13:47 -0700
commiteb9ec79c13f17d610fcb6de49628b8a7686fbab7 (patch)
tree65229f340d83d020275e5f28b640d7b4d2722827 /doc
parent6a08a9a54d4ff5aafe795c7a079709993c08dff3 (diff)
downloademacs-eb9ec79c13f17d610fcb6de49628b8a7686fbab7.tar.gz
emacs-eb9ec79c13f17d610fcb6de49628b8a7686fbab7.zip
PATH defaults now act more like GNU and POSIX
When PATH is unset or empty, use the system default, to be consistent with GNU/Linux and with POSIX. If there is no system default do not default to "." as that can be dangerous. * src/callproc.c (init_callproc_1, init_callproc): Default PATH to the null pointer, not the empty string. * src/emacs.c (default_PATH): New function. (find_emacs_executable, decode_env_path): Be consistent with POSIX and with glibc about what to do when PATH is unset or empty.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/cmdargs.texi1
-rw-r--r--doc/emacs/misc.texi4
2 files changed, 3 insertions, 2 deletions
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi
index 00167056be1..79ae2d064d1 100644
--- a/doc/emacs/cmdargs.texi
+++ b/doc/emacs/cmdargs.texi
@@ -695,6 +695,7 @@ The name of the organization to which you belong. Used for setting the
695A colon-separated list of directories containing executable files. 695A colon-separated list of directories containing executable files.
696This is used to initialize the variable @code{exec-path} 696This is used to initialize the variable @code{exec-path}
697(@pxref{Shell}). 697(@pxref{Shell}).
698If unset or empty, an implementation-dependent default is used.
698@item PWD 699@item PWD
699@vindex PWD@r{, environment variable} 700@vindex PWD@r{, environment variable}
700If set, this should be the default directory when Emacs was started. 701If set, this should be the default directory when Emacs was started.
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 88b7bfc7049..2c2c710eea4 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -753,8 +753,8 @@ available.
753(either in the @var{cmd} argument to one of the above commands, or in 753(either in the @var{cmd} argument to one of the above commands, or in
754other contexts), Emacs searches for the program in the directories 754other contexts), Emacs searches for the program in the directories
755specified by the variable @code{exec-path}. The value of this 755specified by the variable @code{exec-path}. The value of this
756variable must be a list of directories; the default value is 756variable must be a list of directories; the default value
757initialized from the environment variable @env{PATH} when Emacs is 757depends on the environment variable @env{PATH} when Emacs is
758started (@pxref{General Variables}). 758started (@pxref{General Variables}).
759 759
760 @kbd{M-x eshell} invokes a shell implemented entirely in Emacs. It 760 @kbd{M-x eshell} invokes a shell implemented entirely in Emacs. It