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

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

using gnudoit as external DreamWeaver editor


From: Jonathan Epstein
Subject: using gnudoit as external DreamWeaver editor
Date: 13 Jun 2003 13:17:20 -0700

DreamWeaver MX 6.1 permits one to configure an external code editor,
but unfortunately apparently doesn't support the %s syntax which is
common elsewhere in Windows.  It passes the filename in an
unadulterated form on the command-line.  Thus, if you're editing
c:\users\epstein\foo.pl, by the time you get to Emacs it will be
c:usersepsteinfoo.pl .  And of course this doesn't address embedded
spaces.

So, I'm trying to come up with a little program (Perl, in this case)
to be used as the external editor for DreamWeaver, and in turn have
that invoke gnudoit, with which I've had some success in the past.

>From a plain-old bash command line, the following works fine:
  gnudoit -q '(find-file "c:/users/epstein/Alligator.pl")'

But when I try to put this into a little Perl program, I run into a
variety of problems.  BTW, I'm using Perl because the ".pl" suffix
will cause Perl to run, i.e. I can fill in the Perl script's name into
DreamWeaver's external code editor preference.  But I'm open to other
options.

Anyhow, the following Perl program:

#!/usr/bin/perl
$_ = $ARGV[0];
s/\\/\//g;
$lastarg = "'(find-file " . '"' . $_ . '")' . "'";
@list = ("gnudoit", "-q",$lastarg);
print join(" ",@list) . "\n";
exec @list;

When run from a bash command line yields the following:
bash-2.05b$ perl cfgnudoit.pl c:\\users\\epstein\\Alligator.pl
gnudoit -q '(find-file "c:/users/epstein/Alligator.pl")'

But over in Emacs (20.6), the file doesn't open, and I get the error:
error in process filter: Invalid read syntax: ")" 

I have seen references to related problems at:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=99cvch%24s0i%241%40sunsite.dk
I have fiddled with various other quoting mechanisms, but no luck so
far.

Thanks in advance for any guidance.

Jonathan


reply via email to

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