Closed allefeld closed 4 years ago
Do you have steps to reproduce? I use this for LaTeX with no issue.
Steps:
1) open a PDF file in pdf-view-plus 2) delete the PDF file 3) recreate the PDF file
The error message above above appears upon step 2), and does not go away upon step 3)
The same does not happen with pdf-view. But I think the reason is that autoreload doesn't work in that package anyway. Because of that, after recreating the PDF, I trigger a reload explicitly:
pv = await atom.workspace.open(pdfPathname)
pv.updatePdf()
I realize that deleting a file does not mix well with file watching. Is there a way to disable autoreload in your package and to reload programmatically?
It appears that additionally, after that error appears, the underlying item view object becomes defunct.
atom.workspace.open(pdfPathname)
does not focus the existing pane item, but makes a new one.
On further reflection, it is unreasonable to expect pdf-view-plus to watch a file beyond deletion, even though technically that would be possible using fs.watchFile
. I fixed the problem on my end. Closing.
When a (generated) PDF is open in a tab, and that PDF is regenerated, this is what happens:
The same does not happen with
pdf-view
.In my application, the PDF file is actually deleted before being regenerated.