help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: running emacs in perl script


From: Barry Margolin
Subject: Re: running emacs in perl script
Date: Sun, 08 Feb 2004 16:34:55 GMT
User-agent: MT-NewsWatcher/3.3b1 (PPC Mac OS X)

In article <mailman.2085.1076244892.928.help-gnu-emacs@gnu.org>,
 Adam Hardy <emacs@cyberspaceroad.com> wrote:

> I've got a perl script which I use for ripping CDs. It gets the CDDB 
> entry off the net, saves the entry in a file and then asks if I want to 
> edit it with this command:
> 
> print `emacs \"/tmp/xmcd/$files[2]\"`;
> 
> This launches emacs with the file nicely in x-windows. However I often 
> want to run the script on an old box which runs x so slowly I never 
> bother and do everything on the command line.
> 
> But on the command line, this command above launches emacs in the 
> background I think. I'm not sure. I never see emacs, the script just 
> sits there with the cursor blinking, hanging below the command line.
> 
> If I do 'ps -eaf' I see an emacs process. But I can't get to it.
> 
> It makes no difference if I put the '-nw' flags on the emacs command.
> 
> Does anybody know what to do?

I think the problem is the backticks.  That causes emacs to be run with 
its stdout piped to the script.  I'm not sure why you're doing that -- 
do you really want to print all of the output that emacs generates?  
Something like this should be more appropriate:

system('emacs', "/tmp/xmcd/$files[2]");

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

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