Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Paul Derbyshire" To: cygwin AT cygwin DOT com Date: Tue, 6 Aug 2002 00:11:08 -0400 MIME-Version: 1.0 Subject: Re: Windows Editor problem Reply-to: derbyshire AT globalserve DOT net Message-ID: <3D4F141C.16829.8080EBA2@localhost> References: In-reply-to: Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body On 3 Aug 2002 at 12:02, Michael Hoffman wrote: > On Sat, 3 Aug 2002, Raphael wrote: > > > EDITOR=c:/Textpad/TextPad.exe > > > > [...] > > It starts ok, but any file passed through by cygwin misses the first > > two characters. An example /tmp/crontab.1188 would become mp/crontab.1188 > > TextPad appears to be processing /tmp/crontab.1188 as the /t option > followed by the file name. Non-Cygwin programs generally don't support > Cygwin paths. Use cygpath. Here's an example for use with Emacs, a > non-Cygwin program: > > emacs () > { > command emacs "`cygpath -w \"$@\"`" & > } > > If you want to set EDITOR perhaps you could make a shell script which does > the cygpathing. I have a shell script that I use to edit files with PFE (a Winblows programmer's editor that I prefer to unix editors, as the controls are more what I'm used to and there's no esc-meta-alt-control-shift chaos. Here it is: #!/bin/sh touch "$1" fixed=$(cygpath -sw "$1") C:PFE/PFE32.EXE "$fixed"& Give it a nonexistent filename and it makes it a zero length file, so it can be used to start working on uncreated files, the way unix expects. (Without the "touch" command trying to create and work on foo.c with pfe.sh foo.c makes PFE complain about the file not being found.) I actually have nano set as EDITOR though, and use PFE mainly for editing source code. I've seen some queer glitches using this, however -- some cases where the PFE edit buffer has been totally scrogged for no apparent reason, only if I've been launching files with that script. Not very common, and PFE keeps backups of files so it hasn't caused much data loss. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/