[Top][All Lists]

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

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

From: Mark Evenson
Subject: [BUG] emacs cygwin compile.el next-error fails with Ant
Date: 23 Jul 2003 03:54:35 -0400

Using the cygwin port of of GNU Emacs 21.2.1 (running on a Windows 2000
pre-SP4host ), I have a bad interaction between Ant 1.5.3-1 and next-error
of compile mode that results in Emacs being unable to "automatically" visit
the source of errors.

To wit:

With M-x compile invoked with "ant -emacs" one gets errors like:

cd ~/work/cs9/
ant -find build.xml
Searching for build.xml ...
Buildfile: C:\cygwin\home\evenson\work\cs9\build.xml


Compiling 2 source files to C:\cygwin\home\evenson\work\cs9\classes
';' expected
  protected BaseQueryCommand(String databaseURL, String username, String
'class' or 'interface' expected
'class' or 'interface' expected
illegal start of expression

When 'next-error' is invoked, the appropiate string
is correctly parsed by the regexp within compile.el, but it is not a valid
argument for "find-file" and its ilk, as the cygwin environment provides
POSIX emulation of filesystem mountpoints (i.e. forward slashes, mount
points syntactically grafted to root).

cygwin has a commandline utility in "cygpath" that will translate back and
forth from these conventions.  So no problem, I thought, as the 
compile.el variable "compilation-parse-errors-filename-function" will make
a transformational pass, so I whipped up a function like:

      (defun filepath-transform-win32-to-cygwin (filepath)
             (shell-command-to-string (concat "cygpath -u " filepath)))

and then 

       (setq compilation-parse-errors-filename-function 

But now the default choice that pops up in the minibuffer is the filepath
stripped of all filepath separators

This is where I have to stop hacking Emacs and go back to work for a while,
so would appreciate advice on how to proceed further if anyone can offer
it, as the use of backslash "\" in Emacs string types has always confused
my meagre elisp skills.

Attachment: cygcheck.out
Description: output of cygcheck

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]