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

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

Re: compilation mode highlighting wrong for filenames with spaces


From: Juri Linkov
Subject: Re: compilation mode highlighting wrong for filenames with spaces
Date: Sun, 21 Nov 2004 04:46:08 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

"Drew Adams" <address@hidden> writes:
> This is either a bug report or an enhancement request, depending on
> how you look at it.
>
> emacs -q
>
> `M-x grep' in a directory that has files with names containing
> spaces. Here's a sample output line:
>
> Copy (3) of info+.el:45:;;     foobar...
>
> The file name is "Copy (3) of info+.el" (this is very common in
> Windows, BTW). The highlighted "file name" according to grep/compile
> is just "Copy". The number "3" is highlighted as if it were the
> grep-hit line number. Nothing else on the line is highlighted. So,
> both the file name and the line number are incorrectly highlighted.
>
> The culpable code is in the defvar of
> compilation-mode-font-lock-keywords in file compile.el:
>
>      ;; Command output lines.  Recognize `make[n]:' lines too.
>      ("^\\([[:alnum:]_/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:"
>       (1 font-lock-function-name-face) (3 compilation-line-face nil t))

No, the culprit is an open paren ( at the beginning of `grep-regexp-alist':

^\\(.+?\\)[:( \t]+\\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)? ...
            ^--- this

But perhaps it is here not without reason.  Some grep might use (3)
syntax to report a line number.  I don't know such grep programs, but
someone who can find such, might add an example of output lines from it
to etc/compilation.txt.

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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