CrispyBoye · 2022-09-06 00:14
I have the auctex package installed via the following command in my init.el
```emacs lisp
(use-package tex
:ensure auctex)
```
For some reason the C-c C-a command for compiling and viewing doesn't work properly. When i'm my main.tex file it will compile half of the times and the other half it will throw a specific error:
```
Unidentified control sequence
```
Complaining about backslashes in my preamble. I should note here that i haven't changed anything. But half of the times that it will compile it will not update the pdf when i add stuff to it.
On the other hand `C-c C-c` and typing LaTeX (which is what think `C-c C-a` does) works perfectly with no issues.
Btw, i have checked the major mode and it is LaTeX/P and not Plain tex mode.
I'm using fedora 36 with emacs 28.1
Any suggestions of what could be wrong? I've also tried to reinstall the package and clear any cache but it behaves the same.
Thanks for taking the time to read this poorly written rant.
n9lla · 2022-09-06 02:39
First of all, I'm not familiar with auctex and really just trying to help.
I'm not sure if this is a problem in your configuration or a bug in auctex. I do see a few similar questions on TeX StackExchange that basically says "yeah this is a known issue with C-c C-a, use C-c C-c instead."
If you can't find solution anywhere else, I would go use edebug on `TeX-command` and friends to find out what actual command is passed to `call-process` and go from there.
alessandrobertulli · 2022-09-06 11:14
Actually, `C-c C-a` is not the same of `C-c C-c`. The latter allows you to issue a single compilation phase of the LaTeX workflow, for example calling `pdflatex` or `biber`. `C-c C-a`, on the other hand, uses some Elisp-fu to try to determine which commands are needed to be run to compile properly your document. Basically, it does a very similar job to `latexmk`.
I'd suggest you to search in your init file (`C-s`) for places where you may have overwritten the keybinding. Moreover, you can try `C-h k C-c C-a` and see if the function is called
CrispyBoye · 2022-09-06 15:52
I haven't overwritten the keybinding, giving that i haven't really set any bindings except for major-mode specific ones. I have done `C-h k` `C-c C-a` and in LaTeX-mode the keybind is used to call the `TeX-command-run-all` which is found in `LaTeX-mode-map` so really confused as to why it's doing that.
I need to note that of course i have already a `texlive-full` install on my machine.
Thanks a lot for your input though, i really appreciate it!
CrispyBoye · 2022-09-06 15:57
That sounds like a deeper dive into this. I've searched myself also for this issue in Exchange type websites but i fould exactly what you said. That's why i went to ask here, in case there was an auctex dev in the subreddit or someone who uses it daily with no issues.
What you are saying sounds like a deeper dive into the issue and i will definitely give it a try once i find some free time.
Again, thanks a lot for your input, especially since you don't even use the package!