all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* elisp to run a new shell and insert commands?
@ 2007-03-05 15:02 gredner
  2007-03-05 16:35 ` Peter Dyballa
       [not found] ` <mailman.472.1173112709.7795.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: gredner @ 2007-03-05 15:02 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

I am writing a short elisp script to setup a workspace with a
particular configuration.  As part of the setup, I would like the
script to run a new shell (i.e. via M-x shell), and then insert a
command into the shell to setup some variables.  I feel like this
should be possible, but the documentation I have read does not mention
any such functionality.  Does it exist?

Thanks,
-Gabe

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

* Re: elisp to run a new shell and insert commands?
  2007-03-05 15:02 elisp to run a new shell and insert commands? gredner
@ 2007-03-05 16:35 ` Peter Dyballa
       [not found] ` <mailman.472.1173112709.7795.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Dyballa @ 2007-03-05 16:35 UTC (permalink / raw)
  To: gredner; +Cc: help-gnu-emacs


Am 05.03.2007 um 16:02 schrieb gredner@gmail.com:

> As part of the setup, I would like the
> script to run a new shell (i.e. via M-x shell), and then insert a
> command into the shell to setup some variables.  I feel like this
> should be possible, but the documentation I have read does not mention
> any such functionality.  Does it exist?

Yes, there is a way to achieve such things: ~/.emacs_<login shell>.

I have a similiar setup and included in ~/.emacs_tcsh, because tcsh  
is my login shell:

	echo "Hallöchen!"
	sleep 1
	if (-e ~/.emacs_tcsh-init) source ~/.emacs_tcsh-init && rm  
~/.emacs_tcsh-init

As you can imagine any (t)csh statement can be used. The same is true  
for sh, bash, ksh, ash ... The contents of ~/.emacs_tcsh-init is  
generated from Elisp.


Because this is documented: is it this that you are searching for?

--
Greetings

   Pete

   It's not the valleys in life I dread so much as the dips.
                     -- Garfield

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

* Re: elisp to run a new shell and insert commands?
       [not found] ` <mailman.472.1173112709.7795.help-gnu-emacs@gnu.org>
@ 2007-03-05 19:17   ` gredner
  0 siblings, 0 replies; 3+ messages in thread
From: gredner @ 2007-03-05 19:17 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Pete,

I was aware of this feature, but it did not occur to me to use it the
way you are:  emacs generates the file, the shell reads it and then
deletes it.  This is a pretty roundabout way of getting things to
work, but it will get the job done.

Thanks!
-Gabe

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

end of thread, other threads:[~2007-03-05 19:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-05 15:02 elisp to run a new shell and insert commands? gredner
2007-03-05 16:35 ` Peter Dyballa
     [not found] ` <mailman.472.1173112709.7795.help-gnu-emacs@gnu.org>
2007-03-05 19:17   ` gredner

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.