>> One way to resolve them is to match markup escape sequences that new >> GNU grep puts around file names and line numbers. You can see them in >> grep.txt under the title `GNU grep 2.5.1-cvs with default colors'. > > I'm aware of them, are you waiting for the 2.5.2 release to add the > corresponding element to grep-regexp-alist?
I am not sure it's good to recognize rare cases at the cost of the overhead of processing these additional escape sequences for file names and line numbers. But this is possible with GREP_COLORS='mt=01;31:fn=35:ln=32:bn=:se=:ml=36:cx=37:ne' and the regexp ("^\\(\033\\[35m\\(.+?\\)\033\\[m.*?\033\\[32m\\([0-9]+\\)\033\\[m.*?\033\\[36m\\).*?\ \\(\033\\[01;31m\\(?:\033\\[K\\)?\\)\\(.*?\\)\\(\033\\[[0-9]*m\\)" 2 3 ;; Calculate column positions (beg . end) of first grep match on a line ((lambda () (setq compilation-error-screen-columns nil) (- (match-beginning 4) (match-end 1))) . (lambda () (- (match-end 5) (match-end 1) (- (match-end 4) (match-beginning 4))))) nil 1) But it still doesn't fontifify grep matches correctly because other font-lock rules interfere. -- Juri Linkov http://www.jurta.org/emacs/ _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel