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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Galinsky <dima.exe <at> gmail.com>, 1541 <at> debbugs.gnu.org
Cc: emacs-pretest-bug <at> gnu.org, bug-gnu-emacs <at> gnu.org
Subject: bug#1541: 23.0.60; Emacs don't see $PATH
Date: Fri, 12 Dec 2008 07:15:31 -0500
> From: Dmitry Galinsky <dima.exe <at> gmail.com>
> Date: Fri, 12 Dec 2008 01:54:51 +0300
> Cc: 
> Reply-To: Dmitry Galinsky <dima.exe <at> gmail.com>, 1541 <at> emacsbugs.donarmstrong.com
> 
> Emacs don't see $PATH environment variable.
> 
> Step to reproduce bug:
> 
> (setenv "PATH" (concat "/opt/local/bin:" (getenv "PATH")))
> (getenv "PATH") ;; => "/opt/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
> (shell-command-to-string "which git") ;; > /opt/local/bin/git
> (git-status) ;; produced the error
> 
> backtrace:
>    Debugger entered--Lisp error: (file-error "Searching for program"  
> "No such file or directory" "git")
>    call-process("git" nil t nil "rev-parse" "--show-cdup")

This is not a bug: setenv changes the value of PATH passed to the
child processes, but not the value Emacs itself uses to search for
executable programs.  In your case, had Emacs found and invoked `git',
it would have passed `git' the value of PATH that included
"/opt/local/bin".



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

Previous Next


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