GNU bug report logs - #1541
23.0.60; Emacs don't see $PATH

Previous Next

Package: emacs;

Reported by: Dmitry Galinsky <dima.exe <at> gmail.com>

Date: Thu, 11 Dec 2008 23:05:05 UTC

Severity: normal

Tags: notabug

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #12 received at 1541-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 1541-done <at> debbugs.gnu.org
Subject: Re: bug#1541: 23.0.60; Emacs don't see $PATH
Date: Fri, 12 Dec 2008 02:33:38 -0500
Dmitry Galinsky wrote:

> (setenv "PATH" (concat "/opt/local/bin:" (getenv "PATH")))

> (shell-command-to-string "which git") ;; > /opt/local/bin/git

> "No such file or directory" "git")
>   call-process("git" nil t nil "rev-parse" "--show-cdup")

It doesn't work like that. call-process uses the Lisp variable
exec-path, which is set at startup based on the value of $PATH.
So you should be adding /opt/local/bin to exec-path, or to PATH before
you start Emacs. Changing PATH after Emacs has started will not affect
call-process and similar things.

(There may be a separate issue with --with-ns and environment, bug#1333.)




This bug report was last modified 16 years and 163 days ago.

Previous Next


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