         TeX-view-program-list)
   (push '(output-pdf "skim") TeX-view-program-selection)
   (server-start)
-  (setq TeX-command "xelatexmk"
-        TeX-auto-save t
+  (setq TeX-auto-save t
         TeX-parse-self t)
   (use-package latex-preview-pane)
   (use-package cdlatex)

         ("<C-M-right>" . windmove-right)
         ("<C-M-up>" . windmove-up)
         ("<C-M-down>" . windmove-down)))

(use-package popwin
  :config (popwin-mode 1)
  (setq popwin:popup-window-position 'right
        popwin:popup-window-width 81)
  (push '("\\*.*[Dd]oc.*\\*" :regexp t) popwin:special-display-config)
  (push '("*Buffer List*" :dedicated t) popwin:special-display-config))

(use-package projectile :demand
  :bind ("H-m p" . projectile-mode)

                   #'LaTeX-math-mode
                   #'latex-preview-pane-enable
                   #'turn-on-cdlatex
                   #'turn-on-reftex
                   (lambda () (setq TeX-command-default "xelatexmk")))
  :config
  (push '("xelatexmk"
          "latexmk -pdf -pdflatex=\"xelatex -interaction=nonstopmode -shell-escape -synctex=1\" %s"
