doom-modeline icon indicating copy to clipboard operation
doom-modeline copied to clipboard

Indicate LaTeX compilation Errors in Modeline

Open Sk4zz opened this issue 3 years ago • 2 comments

Is it feasible to implement an indicator for comilation Errors (and maybe Warnings) when compiling LaTeX documents using auctex? Something like the flycheck segment but instead calling TeX-error-overview or a similar function?

Thank you!

Sk4zz avatar Nov 02 '20 20:11 Sk4zz

It's easy to define a new segment and integrate into doom-modeline. I'm pleasure to do that, but I am not using LaTeX. Another option is using flycheck to check latex buffers. I think it's enabled by default?

Anyway, PRs are welcome!

seagle0128 avatar Nov 03 '20 11:11 seagle0128

Thank you for the answer and the hint to flycheck! I must admit I have never considered flycheck for LaTeX. I just gave it a try and it works nicely together with doom-modeline.

Unfortunately, flycheck seems not to differentiate between Warnings and Errors that would cause the compilation to fail. Furthermore, it seems like flycheck does not detect undefined control sequences.

I am learning elisp but I will try to write a segment for doom-modeline that works as desired. I might ask some follow-up questions here.

This is an example of a *TeX errors* buffer that I would use to extract the information from:

File                     Line   Type        Message
Thema_2.tex                 83 Warning Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
Thema_2.tex                 83 Warning Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
content02.tex              304 Error   Undefined control sequence.
Thema_2.vrb                 13 Bad box Overfull \hbox (22.80315pt too wide) in paragraph at lines 13--34
Thema_2.vrb                 13 Bad box Overfull \hbox (22.80315pt too wide) in paragraph at lines 13--34

Sk4zz avatar Nov 03 '20 16:11 Sk4zz

@Sk4zz, see my package procress for a possible solution.

haji-ali avatar Aug 23 '22 08:08 haji-ali

Hey @haji-ali, thanks for your reply! In fact I discovered the procress package through a reddit post some time ago and it is indeed the perfect solution. I totally forgot about this issue.

Sk4zz avatar Aug 23 '22 14:08 Sk4zz