diff --git a/webpage/docs/faq.html b/webpage/docs/faq.html index 557315e30..a130cfe0b 100644 --- a/webpage/docs/faq.html +++ b/webpage/docs/faq.html @@ -172,8 +172,8 @@ Is Ant supported by my IDE/Editor?
  • - Why doesn't (X)Emacs parse the error messages generated - by Ant correctly? + Why doesn't (X)Emacs/vi/MacOS X's project builder + parse the error messages generated by Ant correctly?
  • @@ -706,8 +706,8 @@ shell-prompt> cat < foo - Why doesn't (X)Emacs parse the error messages generated - by Ant correctly? + Why doesn't (X)Emacs/vi/MacOS X's project builder + parse the error messages generated by Ant correctly? @@ -715,7 +715,8 @@ shell-prompt> cat < foo

    Ant adds a "banner" with the name of the current task in front of all messages - and there are no built-in - regular expressions in Emacs that would account for this.

    + regular expressions in your Editor that would account for + this.

    You can disable this banner by invoking Ant with the -emacs switch. Alternatively you can add the following snippet to your .emacs to make Emacs @@ -738,6 +739,48 @@ shell-prompt> cat < foo ;; works for javac '("^\\s-*\\[[^]]*\\]\\s-*\\(.+\\):\\([0-9]+\\):" 1 2)) compilation-error-regexp-alist)) + + + + + + + + + + +

    Yet another alternative that preserves most of Ant's + formatting is to pipe Ant's output through the following Perl + script by Dirk-Willem van Gulik:

    +
    + + + + + + + + + diff --git a/webpage/xdocs/faq.xml b/webpage/xdocs/faq.xml index b884c7158..932b30aeb 100644 --- a/webpage/xdocs/faq.xml +++ b/webpage/xdocs/faq.xml @@ -258,13 +258,14 @@ shell-prompt> cat < foo - Why doesn't (X)Emacs parse the error messages generated - by Ant correctly? + Why doesn't (X)Emacs/vi/MacOS X's project builder + parse the error messages generated by Ant correctly?

    Ant adds a "banner" with the name of the current task in front of all messages - and there are no built-in - regular expressions in Emacs that would account for this.

    + regular expressions in your Editor that would account for + this.

    You can disable this banner by invoking Ant with the -emacs switch. Alternatively you can add the @@ -282,6 +283,32 @@ shell-prompt> cat < foo compilation-error-regexp-alist)) ]]> +

    Yet another alternative that preserves most of Ant's + formatting is to pipe Ant's output through the following Perl + script by Dirk-Willem van Gulik:

    + + ) { + if (s/^(\s+)\[(\w+)\]//) { + if ($2 ne $last) { + print "$1\[$2\]"; + $s = ' ' x length($2); + } else { + print "$1 $s "; + }; + $last = $2; + }; + print; +}; +]]> +
    +#!/usr/bin/perl
    +#
    +# May 2001 dirkx@apache.org - remove any
    +# [foo] lines from the output; keeping
    +# spacing more or less there.
    +#
    +$|=1;
    +while(<STDIN>) {
    +	if (s/^(\s+)\[(\w+)\]//) {
    +		if ($2 ne $last) {
    +			print "$1\[$2\]";
    +			$s = ' ' x length($2);
    +		} else {
    +			print "$1 $s ";
    +		};
    +		$last = $2;
    +	};
    +	print;
    +};