[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "source" shell commands

From: Tim X
Subject: Re: "source" shell commands
Date: Sun, 25 Mar 2007 12:32:54 +1000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux)

Matthew Flaschen <address@hidden> writes:

> Is there an elisp function to "source" a shell file; i.e. an alternative
>  to:
> (shell-command (concat "source \"" (expand-file-name "~/.rc") "\""))
> Matthew Flaschen

Hi Matt,

just wondering why you would want this? The point of sourcing a shell file is
to allow for the file to execute in the current (callers) shell environment.
For example, to allow all subsequent sub-shells to inherit from that parent -
useful for setting envrionment variables etc. 

However, I cannot see this being of any real use from inside emacs. No matter
what way you call it, emacs will spawn a sub process to execute the command.
Once it exits, everything is lost. However, I'll readily admit I may be missing
some application/reason and am just curious. 

To answer your question, there are no existing commands that I know of which
will do what you want. However, it wold only take about 5 lines of elisp to
create your own. 


tcross (at) rapttech dot com dot au

reply via email to

[Prev in Thread] Current Thread [Next in Thread]