[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

exec-path and PATH

From: Christoph Scholtes
Subject: exec-path and PATH
Date: Fri, 18 Mar 2011 21:19:55 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt)

I was troubleshooting a problem with Emacs not being able to find
certain external programs on Windows, e.g. grep or find.

I noticed that there seem to be two ways that external programs are

1. directly, via start-process
2. indirectly, through the shell

It was a little confusing that it was not enough to add the path to
grep.exe to exec-path for Emacs to find it. The same would work fine for
svn.exe when invoked by the vc backend. 

I add the paths to certain programs in my init.el, e.g. GnuWin32 for
grep. For them to work in every situation I have to remember to add them
to exec-path and the Windows PATH environment variable. This seems
somewhat redundant, no? I would prefer only manipulating the exec-path
to tell Emacs where to find the programs.

Maybe this is a silly question, but why are some of the programs invoked
different than others? 


PS: Here is a small docfix patch for process.c for review:

=== modified file 'src/ChangeLog'
--- src/ChangeLog       2011-03-17 19:55:40 +0000
+++ src/ChangeLog       2011-03-19 02:30:14 +0000
@@ -1,3 +1,7 @@
+2011-03-19  Christoph Scholtes  <address@hidden>
+       * process.c (Fstart_process): Doc fix.
 2011-03-17  Eli Zaretskii  <address@hidden>
        * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.

=== modified file 'src/process.c'
--- src/process.c       2011-03-17 05:18:33 +0000
+++ src/process.c       2011-03-19 02:26:39 +0000
@@ -1510,7 +1510,7 @@
 function to handle the output.  BUFFER may also be nil, meaning that
 this process is not associated with any buffer.
-PROGRAM is the program file name.  It is searched for in PATH.  If
+PROGRAM is the program file name.  It is searched for in EXEC-PATH.  If
 nil, just associate a pty with the buffer.  Remaining arguments are
 strings to give program as arguments.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]