0

At one point, in an attempt to make parsing of *Compilation* faster, I customized compilation-error-regexp-alist to a set of symbols: '(cargo rustc-colon rustc rustc-refs bash python-tracebacks-and-caml java maven perl weblint scala gradle-kotlin)

However, cargo is not in compilation-error-regexp-alist-alist until I load a file that is in rust-mode.

If I start a compile with rust-mode not loaded, parsing the *Compilation* buffer attempts to look up the cargo symbol, gets nil and then raises an error trying to search for nil as a regex. It in fact does this dozens of times in a few seconds on a typical build, which is quite loud, annoying and effectively locks emacs until it is done having errors. I think it also prevents if from finding the actual errors in the buffer.

I see where this is happening, and I could patch my local copy of compile.el, which would work until I updated emacs.

I could also add a hook to push the Rust-related tags onto the list after rust-mode is loaded. That should work until I customize the error alist again, at which point I would need to remember to remove them from the saved value if I have loaded rust-mode.

Is there a way to do this which does not require hacking the standard modules or remembering to take extra steps when customizing?

I am using GNU Emacs 27.2 (build 1, x86_64-apple-darwin20.6.0, NS appkit-2022.60 Version 11.6.4 (Build 20G417)) of 2022-03-02

1 Answer 1

1

You should report this as a bug. It should just silently skip anything that it cannot find in the alist-alist, or maybe issue a warning once. You can run M-x report-emacs-bug to send an email to the mailing list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.