all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs shell support
@ 2010-10-26  6:31 Raju Tatti
  2010-10-26 22:31 ` Peter Dyballa
  2010-10-27  2:47 ` Kevin Rodgers
  0 siblings, 2 replies; 4+ messages in thread
From: Raju Tatti @ 2010-10-26  6:31 UTC (permalink / raw
  To: help-gnu-emacs

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

Hi,

I use Emacs extensivelly. When we inovke the emacs from terminal, emacs will
get the all environment variable of parent terminal.
If we inovke shell in emacs and set some environment variables locally by
sourcing scripts or alias command, the opening a file using these
environment varialbe using $ doesn't work.

What needs to be done to make emacs to see this locally set env.

Thanks in Advance.

Thanks
-Regards
-Raju

[-- Attachment #2: Type: text/html, Size: 580 bytes --]

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

* Re: Emacs shell support
  2010-10-26  6:31 Emacs shell support Raju Tatti
@ 2010-10-26 22:31 ` Peter Dyballa
  2010-10-27  2:47 ` Kevin Rodgers
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2010-10-26 22:31 UTC (permalink / raw
  To: Raju Tatti; +Cc: help-gnu-emacs


Am 26.10.2010 um 08:31 schrieb Raju Tatti:

> What needs to be done to make emacs to see this locally set env.


Either use csh or tcsh or learn bash. There is also documentation  
about ~/.emacs_<shell name>.

In a terminal I have 74 shell aliases active, in GNU Emacs' *shell*  
buffer it's even 75. But maybe you are using eshell. Then you need to  
learn it from documentation. I did not complete my studies and so I  
have there only 42 aliases – and to me some seem to be the wrong ones  
(producing colourful ls output). I also do not have so much experience  
in this shell...

--
Greetings

   Pete

A designer knows he has arrived at perfection not when there is no  
longer anything to add, but when there is no longer anything to take  
away.
				– Antoine de Saint-Exupéry




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

* Re: Emacs shell support
  2010-10-26  6:31 Emacs shell support Raju Tatti
  2010-10-26 22:31 ` Peter Dyballa
@ 2010-10-27  2:47 ` Kevin Rodgers
  2010-10-27  6:55   ` Oleksandr Gavenko
  1 sibling, 1 reply; 4+ messages in thread
From: Kevin Rodgers @ 2010-10-27  2:47 UTC (permalink / raw
  To: help-gnu-emacs

On 10/26/10 12:31 AM, Raju Tatti wrote:
> Hi,
> I use Emacs extensivelly. When we inovke the emacs from terminal, emacs will get
> the all environment variable of parent terminal.
> If we inovke shell in emacs and set some environment variables locally by
> sourcing scripts or alias command, the opening a file using these environment
> varialbe using $ doesn't work.
> What needs to be done to make emacs to see this locally set env.

The shell invoked by M-x shell is a child process than the emacs process,
and modifying the environment of a child process will not affect the parent
process.

If you want to modify the environment of the emacs process, use setenv
in ~/.emacs.

That will also affect any child processes, including shells, invoked after
the environment variable was set.

-- 
Kevin Rodgers
Denver, Colorado, USA




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

* Re: Emacs shell support
  2010-10-27  2:47 ` Kevin Rodgers
@ 2010-10-27  6:55   ` Oleksandr Gavenko
  0 siblings, 0 replies; 4+ messages in thread
From: Oleksandr Gavenko @ 2010-10-27  6:55 UTC (permalink / raw
  To: help-gnu-emacs

On 27.10.2010 5:47, Kevin Rodgers wrote:
> On 10/26/10 12:31 AM, Raju Tatti wrote:
>> Hi,
>> I use Emacs extensivelly. When we inovke the emacs from terminal,
>> emacs will get
>> the all environment variable of parent terminal.
>> If we inovke shell in emacs and set some environment variables locally by
>> sourcing scripts or alias command, the opening a file using these
>> environment
>> varialbe using $ doesn't work.
>> What needs to be done to make emacs to see this locally set env.
>
> The shell invoked by M-x shell is a child process than the emacs process,
> and modifying the environment of a child process will not affect the parent
> process.
>
> If you want to modify the environment of the emacs process, use setenv
> in ~/.emacs.
>
> That will also affect any child processes, including shells, invoked after
> the environment variable was set.
>
Really you can not transfer env variable from subprocess to parent.

But if you really want you can invoke 'set' command in shell and save output
in file which can be accessed by Emacs.




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

end of thread, other threads:[~2010-10-27  6:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-26  6:31 Emacs shell support Raju Tatti
2010-10-26 22:31 ` Peter Dyballa
2010-10-27  2:47 ` Kevin Rodgers
2010-10-27  6:55   ` Oleksandr Gavenko

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.