From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: is it possible to pass shell variables to emacs? Date: Fri, 07 Dec 2007 18:18:34 +0100 Organization: Organization?!? Message-ID: <85k5nql8yd.fsf@lola.goethe.zz> References: <44a8858b-32d1-4b14-803f-4cded782b968@a39g2000pre.googlegroups.com> <85lk87o3i9.fsf@lola.goethe.zz> <05d07222-2a31-4399-90eb-63a0230a386a@s12g2000prg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1197049290 14395 80.91.229.12 (7 Dec 2007 17:41:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Dec 2007 17:41:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 07 18:41:41 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J0hCe-0001Ik-RZ for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Dec 2007 18:41:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J0hCN-0006EW-Jj for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Dec 2007 12:41:15 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) Cancel-Lock: sha1:7M2gWjhXcOiEj/TrpotoFyzfl4c= Original-Lines: 26 Original-NNTP-Posting-Date: 07 Dec 2007 18:18:06 CET Original-NNTP-Posting-Host: 5fb1280a.newsspool3.arcor-online.net Original-X-Trace: DXC=Mo^n0EURQUVPU8j_I0DN6_McF=Q^Z^V3X4Fo<]lROoRQ4nDHegD_]RUT9c^N:UWK`XCV`H8_`hhQT^9QSCVg3dOVOIC5DBZVJ9[XHfdU_KdIjX0JHR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:49915 Archived-At: "stuart.tett@gmail.com" writes: > On Dec 6, 2:35 pm, David Kastrup wrote: >> "stuart.t...@gmail.com" writes: >> > is there any possible way to do this? I would like to avoid making >> > them environment variables. I have a command-line script that when >> > called, sets all of these variables. I would like to use these >> > variables for example when finding a file. >> >> > Maybe there's some custom code I could put in my .emacs file. or I >> > could write a wrapper around emacs. >> >> emacs -eval '(setq a (pop argv) b (pop argv))' "$a" "$b" >> >> If your Emacs version is not a more recent developer version, you need >> to write command-line-args-left instead of argv. > > Great thanks. Question: some of these variables that I am passing in > refer to directories and I want to use them in the C-x C-f interface. > How do I access them? I don't think they work with $myvar Huh? Emacs never gets to see the names of the shell variables. It just gets to see their values. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum