From: Barry Margolin <barmar@alum.mit.edu>
Subject: Re: running emacs in perl script
Date: Sun, 08 Feb 2004 16:34:55 GMT [thread overview]
Message-ID: <barmar-7A2DB3.11345408022004@netnews.comcast.net> (raw)
In-Reply-To: mailman.2085.1076244892.928.help-gnu-emacs@gnu.org
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 ***
next parent reply other threads:[~2004-02-08 16:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.2085.1076244892.928.help-gnu-emacs@gnu.org>
2004-02-08 16:34 ` Barry Margolin [this message]
2004-02-08 21:14 ` running emacs in perl script Adam Hardy
2004-02-08 12:52 Adam Hardy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=barmar-7A2DB3.11345408022004@netnews.comcast.net \
--to=barmar@alum.mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).