bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] emacs cygwin compile.el next-error fails with Ant


From: Mark Evenson
Subject: Re: [BUG] emacs cygwin compile.el next-error fails with Ant
Date: 24 Jul 2003 08:04:41 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

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 <address@hidden>

"A screaming comes across the sky.  It has happened before, but there is
nothing to compare to it now."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]