all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Dyballa <Peter_Dyballa@web.de>
To: "Nazir " <elxsian@gmail.com>
Cc: emacs List <help-gnu-emacs@gnu.org>
Subject: Re: Compile mode in emacs!!
Date: Wed, 28 Mar 2007 13:17:12 +0200	[thread overview]
Message-ID: <D93EBF27-4AAD-4082-B85C-3779013E0A70@web.de> (raw)
In-Reply-To: <39262250703280328g1f53a9a0l2a5e490e8a52acad@mail.gmail.com>


Am 28.03.2007 um 12:28 schrieb Nazir:

> 1. PATH variable is showing the correct value in the terminal  
> ( tcsh ). From the same terminal I open emacs. In emacs, I execute  
> the shell command, echo $PATH, this shows an incorrect value.

What is your login shell? Without some basics nothing reasonable can  
be achieved.

What is your command to "open emacs?"
Do you have a file ~/.emacs_tcsh? This one sets values for GNU Emacs'  
*shell* buffer – but not for what is done via M-x. In case your login  
shell is tcsh, then ~/.cshrc is executed, when it exists. If it does  
not exist, then ~/.tcshrc is executed, if existing. And it is this  
order in which they are loaded, or not loaded (you can proof by  
creating a simple ~/.cshrc with only one line

	echo "Hi, it's me, your ~/.cshrc!"

). Do they manipulate path? The lower case word ``path´´ is the  
variable that sets PATH, which exists in (t)csh only for backward  
compatibility with Bourne shell look-alikes.

> 2. In the RC file (.cshrc), the PATH has already been set to  
> correct value(I guess thats how it is displayed properly in the  
> terminal). I just wonder where emacs gets the PATH from ?? Does it  
> take it from a different file??

If the GNU Emacs binary is launched from a shell as 'emacs &' than no  
other file is involved in setting PATH – except you have in some  
ELisp file a statement like

	(setenv "PATH" (concat "/some/directory" ":" (getenv "PATH")))

or such. This modulates GNU Emacs' internal private environment which  
is then copied into every new process, like for example the  
compilation process.

If the 'emacs' from 'emacs &' is a shell script, than this shell  
script can re-set PATH for the GNU Emacs launched later from this  
script.


This code in site-start.el can name in *Messages* buffer all ELisp  
files loaded:

	(defadvice load (before debug-log activate)
	  (message "(Tipp von Kai G) Now loading: %s" (ad-get-arg 0)))

You can use some for GNU Emacs options to make it not loading ELisp  
files, -q or -Q. Check with 'emacs --help' for the exact meaning! You  
might be able to find circumstances under which GNU Emacs'  
environment is correct.


In Mac OS X I have it very simple and comfortable: an XML file  
contains environment variables and their values and by a command like

	    set path=(`defaults read ~/.MacOSX/environment PATH | tr ':' ' '`)

I can use them in any shell ...

--
Greetings

   Pete

When you meet a master swordsman,
show him your sword.
When you meet a man who is not a poet,
do not show him your poem.
                 -- Rinzai, ninth century Zen master

  parent reply	other threads:[~2007-03-28 11:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-27  8:20 Compile mode in emacs!! elxsian
2007-03-27 12:10 ` Peter Dyballa
2007-03-28  5:10   ` Nazir 
2007-03-28  8:29     ` Peter Dyballa
2007-03-28  8:56       ` Nazir 
2007-03-28  9:17         ` Peter Dyballa
     [not found]           ` <39262250703280328g1f53a9a0l2a5e490e8a52acad@mail.gmail.com>
2007-03-28 11:17             ` Peter Dyballa [this message]
     [not found]               ` <39262250703280551md8bdc54u5b9c31e59d207018@mail.gmail.com>
2007-03-28 15:20                 ` Peter Dyballa
     [not found] <mailman.1487.1174994711.7795.help-gnu-emacs@gnu.org>
2007-03-28 13:18 ` Ken Goldman
2007-03-29  0:30 ` "Wilfred Zegwaard (privé)"
  -- strict thread matches above, loose matches on Subject: below --
2007-03-27  8:18 elxsian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D93EBF27-4AAD-4082-B85C-3779013E0A70@web.de \
    --to=peter_dyballa@web.de \
    --cc=elxsian@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.