reddit / emacs

Auto-jump to first error in compilation-shell-minor-mode

gammarray · 2022-10-29 14:33
I'd like to configure my shell to automatically jump to the first error, so that I can easily visit the file at the line number where the error occurred. However, I'm coming up short when looking for hooks, functions, or filters to make use of. Essentially, I want to run `compilation-next-error` whenever a compilation finishes with errors. ​ In case you haven't tried `compilation-shell-minor-mode` inside an inferior shell, please give it a try. You won't regret it. It also works with vterm, but you need to do a little extra work to make sure the key bindings don't conflict with each other.
hkjels · 2022-10-29 20:40
I’m on my phone here, but look more thoroughly at the customization of compilation-mode. I know there’s an option there for this that I’ve set to true
gammarray · 2022-10-29 20:47
There is a variable for this functionality in compilation mode, but I don’t think it works in the shell minor mode. (Also on phone at the moment, thx for your reply!)