GNU bug report logs -
#1541
23.0.60; Emacs don't see $PATH
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1541 in the body.
You can then email your comments to 1541 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1541
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Dmitry Galinsky <dima.exe <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
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")
In GNU Emacs 23.0.60.1 (i386-apple-darwin9.5.0, NS apple-appkit-949.35)
of 2008-12-10 on neutron.local
Windowing system distributor `Apple', version
97.112.112.108.101.45.97.112.112.107.105.116.45.57.52.57.46.51.53
configured using `configure '--with-ns''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: ru_RU.UTF8
value of $XMODIFIERS: nil
locale-coding-system: nil
default-enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
diff-auto-refine-mode: t
shell-dirtrack-mode: t
yas/minor-mode: t
recentf-mode: t
show-paren-mode: t
global-auto-revert-mode: t
delete-selection-mode: t
pc-selection-mode: t
tooltip-mode: t
ns-extended-platform-support-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
hs-minor-mode: t
Recent input:
<up> <up> <up> <up> <up> <up> <up> <up> <up> <down>
<down> <down> <down> <down> <down> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <menu-bar> <help-menu> <s
end-emacs-bug-report>
Recent messages:
Mark set
Entering debugger...
git version 1.6.0.5
Mark set
Wrote /Users/dima/.emacs.d/rails-reloaded/rails-resources.el
Making completion list...
line-move-visual: End of buffer
Open /Users/dima/.emacs.d/rails-reloaded/rails-resources.el
Quit [2 times]
Open /Users/dima/.emacs.d/rails-reloaded/rails-resources.el
--
Best regards,
Dmitry Galinsky
http://dima-exe.ru
Tags added: notabug
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Fri, 12 Dec 2008 04:05:07 GMT)
Full text and
rfc822 format available.
Reply sent to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
Full text and
rfc822 format available.
Notification sent to
Dmitry Galinsky <dima.exe <at> gmail.com>
:
bug acknowledged by developer.
Full text and
rfc822 format available.
Message #12 received at 1541-done <at> emacsbugs.donarmstrong.com (full text, mbox):
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.)
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1541
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #17 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
> 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".
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1541
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1541
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Eli Zaretskii <eliz <at> gnu.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Fri, 09 Jan 2009 15:24:03 GMT)
Full text and
rfc822 format available.
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.