GNU bug report logs -
#70794
30.0.50; Add Rust compilation regex
Previous Next
Reported by: Ergus <spacibba <at> aol.com>
Date: Mon, 6 May 2024 01:31:01 UTC
Severity: normal
Found in version 30.0.50
Done: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>
Full log
Message #8 received at 70794 <at> debbugs.gnu.org (full text, mbox):
> Date: Mon, 06 May 2024 03:28:43 +0200
> From: Ergus via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> Recently working with rust I have noticed that emacs does not recognizes
> the rust/cargo error patterns.
>
> Considering that emacs has now the rust-ts-mode, it may worth adding
> the rust/cargo error patterns to compile when using that mode
>
> In my system so far I have this:
>
> ```
> (with-eval-after-load 'rust-ts-mode
> (with-eval-after-load 'compile
> (add-to-list
> 'compilation-error-regexp-alist-alist
> `(cargo
> "\\(?:\\(?4:error\\)\\|\\(?5:warning\\)\\):[^\0]+?--> \\(?1:[^:]+\\):\\(?2:[[:digit:]]+\\):\\(?3:[[:digit:]]+\\)"
> 1 2 3 (5)
> nil
> (5 compilation-warning-face)
> (4 compilation-error-face)))
>
> (add-to-list 'compilation-error-regexp-alist 'cargo)))
>
> ```
>
> Maybe a more frequent rust user has a more general regex to
> recommend. But this one works for me.
>
> WDYT?
Thanks, but could you please also send the examples of Rust messages,
because we need to add them to etc/compilation.txt?
This bug report was last modified 23 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.