fix(org-latex): macOS PDF export - open async + latexmk nonstopmode

- org-file-apps: use 'open %s' for PDF on darwin → async launch, no beachball
- org-latex-pdf-process: explicit latexmk -f -interaction=nonstopmode
  (belt+suspenders; Doom module sets this but not always loaded early enough)
This commit is contained in:
2026-02-23 14:34:39 +01:00
parent 9bf41c045a
commit 26ac9082dd

View File

@@ -369,6 +369,22 @@ Bound to cmd+v in org-mode and markdown-mode."
;; Optional: enable booktabs style (horizontal rules in tables)
;; (setq org-latex-tables-booktabs t)
;; macOS: open exported PDF with system 'open' (async → no beachball)
;; Without this, org-open-file may call open synchronously or fail silently.
(when (eq system-type 'darwin)
(setq org-file-apps
'((auto-mode . emacs)
(directory . emacs)
("\\.mm\\'" . default)
("\\.x?html?\\'" . default)
("\\.pdf\\'" . "open %s"))))
;; Ensure latexmk doesn't hang on errors (nonstopmode + force-continue)
;; Doom latex module usually sets this, but belt+suspenders for macOS.
(after! org
(setq org-latex-pdf-process
'("latexmk -f -pdf -%latex -interaction=nonstopmode -output-directory=%o %f")))
;;; ============================================================
;;; ORG MODE — CUSTOM BEHAVIOR