reddit / emacs

Some question about Flycheck and Compilation

konrad1977 · 2022-04-02 09:02
1. Is it possible to parse a buffer and add the errors / warnings to flycheck without writing a backend/linter/? (why? see 2.) 2. I'm using async-shell-command instead of 'compile'-command because of reasons, I managed to enable c`ompilation-minor-mode` but it doesn't go to the first error - even if set `compilation-auto-jump-to-first-error` to true. Invoking (first-error) in the buffer goes to the first error though. 3. Can compilation-mode/minor-mode list errors and warnings in a good readable format like flycheck does without much customization? *Reasons why I am not using* `M-x compile:` I am using xcodebuild (for iOS development), when its done I check for errors or if the build succeeded. If its succeeded it will install the binary and launch the simulator and then parse the logs. If you have a connected iPhone/iPad it will install and launch it on device and start the lldb. I wanted it to be very automatic (like Xcode)
quote-only-eeee · 2022-04-02 09:49
As for your second point, I don't think you need to use async-shell-command. Just use M-x compile with a shell command that does the things you described. For example, if you use M-x compile with make, you could add an extra command at the end of the `all` target which launches the built app etc. (To avoid blocking Emacs, you may use the shell construct `&` in your Makefile, which launches a background process.)