Closed
Description
What I'm doing usually: open emacs and eaf to write latex and view pdf. It works pretty well. Every time I change the .tex file and recompile, the eaf buffer refresh the pdf.
But I'm on a zoom meeting today. I'm sharing the screen with others to show my editing and recompling. During zoom meeting, every time I compile the .tex, the eaf buffer crashes with "python crashes unexpectedly". I have to re-open the pdf with eaf. Every time.
I did a test after the meeting. Without zoom, it works pretty good. With zoom sharing screen, it failed to refresh the buffer.
The *eaf*
buffer is:
mupdf: bad page number(s)
Failed to watch callback
Traceback (most recent call last):
File "/Users/isaac/.doom.d/emacs-application-framework/app/pdf-viewer/buffer.py", line 1100, in paintEvent
qpixmap = self.get_page_pixmap(index, self.scale * hidpi_scale_factor, self.rotation)
File "/Users/isaac/.doom.d/emacs-application-framework/app/pdf-viewer/buffer.py", line 1021, in get_page_pixmap
page = self.document[index]
File "/Users/isaac/.doom.d/emacs-application-framework/app/pdf-viewer/buffer.py", line 475, in __getitem__
page = PdfPage(self.document[index], index, self.document.isPDF)
File "/Users/isaac/envs/py386/lib/python3.8/site-packages/fitz/fitz.py", line 5135, in __getitem__
raise IndexError("page not in document")
IndexError: page not in document
System: MacOS 11.6.
Emacs: emacs-plus@28, Doom Emacs.
Configuration:
(use-package! eaf
:load-path "~/.doom.d/emacs-application-framework/" ;; I downloaded the eaf package into the .doom.d folder
:commands (eaf-open)
:config
(require 'eaf-pdf-viewer)
(require 'eaf-markdown-previewer)
(setq eaf-pdf-dark-mode nil))
(after! latex
(add-to-list 'TeX-view-program-list '("eaf" eaf-pdf-synctex-forward-view)
)
(add-to-list 'TeX-view-program-selection '(output-pdf "eaf"))
)