delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/07/24/10:15:59

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
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
From: Joe Buehler <jbuehler AT hekimian DOT com>
Subject: Re: [BUG] emacs cygwin compile.el next-error fails with Ant
Date: Thu, 24 Jul 2003 10:05:34 -0400
Organization: Spirent Communications, Inc.
Lines: 34
Message-ID: <3F1FE7AE.6080707@hekimian.com>
References: <a0he5dd5yv DOT fsf AT panix3 DOT panix DOT com> <3F1E9317 DOT 9040204 AT hekimian DOT com> <a0n0f4yvty.fsf__37396.9968794428$1059048238 AT panix3 DOT panix DOT com>
Reply-To: jbuehler AT hekimian DOT com
Mime-Version: 1.0
X-Complaints-To: usenet AT main DOT gmane DOT org
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.4) Gecko/20030624
X-Accept-Language: en-us, en
In-Reply-To: <a0n0f4yvty.fsf__37396.9968794428$1059048238@panix3.panix.com>
X-Enigmail-Version: 0.76.1.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Cc: bug-gnu-emacs AT gnu DOT org

Mark Evenson wrote:

> /^[A-Z]:/ {
>       command = "tr \\\\\\\\\ / | xargs cygpath "; 
>       printf "%s", $1 | command;  
>       close(command); 
>       for (i = 2; i < NF; i++) {
>         printf " %s", $i;
>       };
>       printf "\n";
> 
>       next;
> }
> {print}

I think I see now why you said that my posted command would not work.
The problem is that I have not yet fixed emacs to recognize drive letters.
The workaround is to use the /cygdrive/DRIVELETTER syntax.

So try something like this:

ant whatever 2>&1 | sed 's=\\=/=g;s=\([a-zA-Z]\):/=/cygdrive/\1/=g;s/\r//g'

This:

1. changes \ to /
2. changes X:/ to /cygdrive/X/
3. removes carriage returns

I saw you used some GNU sed feature for 3, so correct it if I got it wrong.
I don't think it's portable to other platforms so I never use it.
-- 
Joe Buehler



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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