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: Bourgneuf Francois
Subject: RE : running emacs in perl script
Date: Mon, 9 Feb 2004 13:42:53 +0100

Sorry for being off topic but :
Once I have tried to use the CDDB Perl Module and never managed to make it work 
properly.
Could you send us a sample of perl program code that calls CDDB ?
Thanks.
Bour9

-----Message d'origine-----
De : help-gnu-emacs-bounces+francois.bourgneuf=groupe-mma.fr@gnu.org 
[mailto:help-gnu-emacs-bounces+francois.bourgneuf=groupe-mma.fr@gnu.org] 
Envoyé : dimanche 8 février 2004 22:14
Cc : help-gnu-emacs@gnu.org
Objet : Re: running emacs in perl script


On 02/08/2004 05:34 PM Barry Margolin 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.
> 
> 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,
you're right. It works fine now on the command line or in x, with that 
adjustment.

I'm a total non-perl programmer. The use of 'print' as opposed to 
system() was completely arbitrary. Thanks alot.

Adam
-- 
GNU Emacs 21.3.1 on Linux 2.4.20 Debian



_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org http://mail.gnu.org/mailman/listinfo/help-gnu-emacs




reply via email to

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