From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: jaepstein_63@yahoo.com (Jonathan Epstein) Newsgroups: gmane.emacs.help Subject: using gnudoit as external DreamWeaver editor Date: 13 Jun 2003 13:17:20 -0700 Organization: http://groups.google.com/ Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <27e4d2e8.0306131217.5a5ed3bc@posting.google.com> NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1055535709 9343 80.91.224.249 (13 Jun 2003 20:21:49 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 13 Jun 2003 20:21:49 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 13 22:21:46 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19Qv1i-0002Jz-00 for ; Fri, 13 Jun 2003 22:19:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Qv2G-0001nM-EN for gnu-help-gnu-emacs@m.gmane.org; Fri, 13 Jun 2003 16:20:32 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 46 Original-NNTP-Posting-Host: 128.231.88.4 Original-X-Trace: posting.google.com 1055535441 24447 127.0.0.1 (13 Jun 2003 20:17:21 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 13 Jun 2003 20:17:21 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:114434 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:10927 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10927 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