Article View: gnu.emacs.help
Article #188943Processes and directories
From: David Smith
Date: Thu, 06 Jun 1991 10:10
Date: Thu, 06 Jun 1991 10:10
44 lines
2471 bytes
2471 bytes
I'm currently using S.el to run the S package as an inferior process (which works great, by the way) but I want to customize it so that the S program has a directory of my choice as its initial directory; that is I want the behaviour to be the same as if I had done in Unix cd <dir> S As things stand at the moment, the directory S is invoked from is *always* the directory I invoked Emacs from. My best (but, alas, unsuccessful) attempts so far have been: - Inserting the following into the defun for S: (set-buffer (get-buffer-create "*S*")) (setq default-directory (read-file-name ...)) - Writing a shell script to do exactly as outlined above passing the <dir> as an argument to the process. This is a terrible kludge, and worse, it doesn't work! According to (v 1.03 of) the Lispref manual: "The subprocess gets its current directory from the value of `default-directory' ... " so I can't see why my first attempt wouldn't work. It might have something to do with the fact that S.el is built on top of comint, but as comint uses the standard process creation routines from elisp, I don't understand why it should make a difference. Does anyone know a fool-proof method of setting the current directory of a process? I'm at my wit's end, and any help would be most appreciated. P.S. I have noticed that S.el works under V 18.52, but breaks under 18.57. The problem seems to lie in the change of the definition of 'yank' in simple.el -- if the old version of simple.el is installed then things work fine. Has anyone else noticed this? Thanks, David. ------------------------------------------------------------------- |David Smith <dsmith@spam.ua.oz.au>| |Department of Statistics, University of Adelaide, South Australia| -------------------------------------------------------------------
Technical Details
Message-ID:
<DSMITH.91Jun6194023@spam.ua.oz.au>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!spool.mu.edu!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!spam!spam.ua.oz.au!dsmithShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103b8b,ad2238d667026d80,start X-Google-Attributes: gid103b8b,public X-Google-ArrivalTime: 1991-06-06 11:18:37 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!spool.mu.edu!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!spam!spam.ua.oz.au!dsmith From: dsmith@spam.ua.oz.au (David Smith) Newsgroups: gnu.emacs.help Subject: Processes and directories Message-ID: <DSMITH.91Jun6194023@spam.ua.oz.au> Date: 6 Jun 91 10:10:23 GMT Sender: dsmith@spam.ua.oz Distribution: gnu Organization: Adelaide University. Lines: 44