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 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: <3F1E9317 DOT 9040204 AT hekimian DOT com> From: Mark Evenson Date: 24 Jul 2003 08:04:41 -0400 In-Reply-To: <3F1E9317.9040204@hekimian.com> Message-ID: Lines: 47 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 "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/