unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* using gnudoit as external DreamWeaver editor
@ 2003-06-13 20:17 Jonathan Epstein
  2003-06-13 20:54 ` Kai Großjohann
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Epstein @ 2003-06-13 20:17 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-06-16 14:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-13 20:17 using gnudoit as external DreamWeaver editor Jonathan Epstein
2003-06-13 20:54 ` Kai Großjohann
2003-06-16 14:11   ` Jonathan Epstein

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).