delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/06/00:10:03

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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" <derbyshire AT globalserve DOT net>
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: <Pine DOT CYG DOT 4 DOT 44 DOT 0208031632170 DOT 1264-100000 AT toos>
In-reply-to: <Pine.WNT.4.44.0208031155450.1604-100000@barbecueworld>

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019