AnthonyDiGirolamo / airline-themes

vim-airline themes https://github.com/vim-airline/vim-airline-themes for emacs powerline https://github.com/milkypostman/powerline
MIT License
123 stars 20 forks source link

Focus Lost upon LaTeX compiling via C-c C-a #35

Open Davidj361 opened 5 years ago

Davidj361 commented 5 years ago

When I have a split screen of working on a LaTeX file, where the preview of the PDF is in another emacs window already, and if I compile it again via C-c C-a, airline changes focus to the PDF preview and while I am still able to scroll around and type in the LaTeX source window which is indicated as unfocused. This doesn't happen when airline is disabled.

I am using the auctex and pdf-tools packages, here are my settings for LaTeX in emacs:

(pdf-tools-install)

(setq TeX-PDF-mode t)
(setq TeX-source-correlate-method 'synctex)
(setq TeX-source-correlate-mode t)
(setq TeX-source-correlate-start-server t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)

(setq TeX-view-program-selection '((output-pdf "pdf-tools"))
    TeX-view-program-list '(("pdf-tools" TeX-pdf-tools-sync-view))
    TeX-source-correlate-start-server t)

;; revert pdf-view after compilation
(add-hook 'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer)
(add-hook 'LaTeX-mode-hook (lambda () (local-set-key (kbd "C-c a") 'pdf-sync-forward-search)))