| delorie.com/archives/browse.cgi | search |
| 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 |
| To: | cygwin AT cygwin DOT com, bug-gnu-emacs AT mail DOT gnu DOT org, user AT ant DOT apache DOT org |
| Subject: | Re: [BUG] emacs cygwin compile.el next-error fails with Ant |
| References: | <a0he5dd5yv DOT fsf AT panix3 DOT panix DOT com> <3F1E9317 DOT 9040204 AT hekimian DOT com> |
| From: | Mark Evenson <evenson AT panix DOT com> |
| Date: | 24 Jul 2003 08:04:41 -0400 |
| In-Reply-To: | <3F1E9317.9040204@hekimian.com> |
| Message-ID: | <a0n0f4yvty.fsf@panix3.panix.com> |
| Lines: | 47 |
| User-Agent: | Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
| MIME-Version: | 1.0 |
Following the suggestion of Joe Buehler the following scripts placed in
$HOME/bin, with ant-emacs chmod'd to execute
ant-emacs
----------------------------------------------------------------------
#!/bin/sh
ANT_ARGS="$ANT_ARGS -emacs"
ANT_OPTS="$ANT_OPTS -Dbuild.compiler.emacs=true"
export ANT_ARGS ANT_OPTS
ant $* 2>&1 | gawk -f $HOME/bin/transform.gawk 2>&1 | sed s/\\r//g | sed s/^gawk.*$//
----------------------------------------------------------------------
and the following gawk script
transform.gawk
----------------------------------------------------------------------
/^[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}
----------------------------------------------------------------------
will make next-error work in compile.el with Emacs running under cygwin.
This is not perfect, as it changes the output slightly (I have a extra
newline emitted somehow), but it might help someone else.
After some investigation and further reflection, I think this can be
classified as a problem with Ant, and not with cygwin and/or Emacs as Ant
should emit "UNIX normalized" pathnames if it is running under
cygwin/Emacs. The problem with implementing this is that Ant is merely
passing back the output from a native win32 javac which necessarily needs
the platform dependent path.separator variable. Maybe I will have time his
weekend to look into this.
--
Mark Evenson <evenson AT panix DOT com>
"A screaming comes across the sky. It has happened before, but there is
nothing to compare to it now."
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |