unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1541: 23.0.60; Emacs don't see $PATH
@ 2008-12-11 22:54 ` Dmitry Galinsky
  2008-12-12  7:40   ` bug#1541: marked as done (23.0.60; Emacs don't see $PATH) Emacs bug Tracking System
  2008-12-12 12:15   ` bug#1541: 23.0.60; Emacs don't see $PATH Eli Zaretskii
  0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Galinsky @ 2008-12-11 22:54 UTC (permalink / raw)
  To: emacs-pretest-bug

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







^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#1541: marked as done (23.0.60; Emacs don't see $PATH)
  2008-12-11 22:54 ` bug#1541: 23.0.60; Emacs don't see $PATH Dmitry Galinsky
@ 2008-12-12  7:40   ` Emacs bug Tracking System
  2008-12-12 12:15   ` bug#1541: 23.0.60; Emacs don't see $PATH Eli Zaretskii
  1 sibling, 0 replies; 3+ messages in thread
From: Emacs bug Tracking System @ 2008-12-12  7:40 UTC (permalink / raw)
  To: Glenn Morris

[-- Attachment #1: Type: text/plain, Size: 837 bytes --]


Your message dated Fri, 12 Dec 2008 02:33:38 -0500
with message-id <tvdtpx2y5.fsf@fencepost.gnu.org>
and subject line Re: bug#1541: 23.0.60; Emacs don't see $PATH
has caused the Emacs bug report #1541,
regarding 23.0.60; Emacs don't see $PATH
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
1541: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1541
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 7293 bytes --]

From: Dmitry Galinsky <dima.exe@gmail.com>
To: emacs-pretest-bug@gnu.org
Subject: 23.0.60; Emacs don't see $PATH
Date: Fri, 12 Dec 2008 01:54:51 +0300
Message-ID: <3EF395A3-9A7A-42E7-B084-C65474AF2DE6@gmail.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")



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




[-- Attachment #3: Type: message/rfc822, Size: 2310 bytes --]

From: Glenn Morris <rgm@gnu.org>
To: 1541-done@emacsbugs.donarmstrong.com
Subject: Re: bug#1541: 23.0.60; Emacs don't see $PATH
Date: Fri, 12 Dec 2008 02:33:38 -0500
Message-ID: <tvdtpx2y5.fsf@fencepost.gnu.org>

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.)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#1541: 23.0.60; Emacs don't see $PATH
  2008-12-11 22:54 ` bug#1541: 23.0.60; Emacs don't see $PATH Dmitry Galinsky
  2008-12-12  7:40   ` bug#1541: marked as done (23.0.60; Emacs don't see $PATH) Emacs bug Tracking System
@ 2008-12-12 12:15   ` Eli Zaretskii
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2008-12-12 12:15 UTC (permalink / raw)
  To: Dmitry Galinsky, 1541; +Cc: emacs-pretest-bug, bug-gnu-emacs

> From: Dmitry Galinsky <dima.exe@gmail.com>
> Date: Fri, 12 Dec 2008 01:54:51 +0300
> Cc: 
> Reply-To: Dmitry Galinsky <dima.exe@gmail.com>, 1541@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".







^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-12 12:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <tvdtpx2y5.fsf@fencepost.gnu.org>
2008-12-11 22:54 ` bug#1541: 23.0.60; Emacs don't see $PATH Dmitry Galinsky
2008-12-12  7:40   ` bug#1541: marked as done (23.0.60; Emacs don't see $PATH) Emacs bug Tracking System
2008-12-12 12:15   ` bug#1541: 23.0.60; Emacs don't see $PATH Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).