[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-devel] pdfopen not returning
From: |
Ralf Angeli |
Subject: |
[AUCTeX-devel] pdfopen not returning |
Date: |
Fri, 18 Aug 2006 21:11:34 +0200 |
Hi,
I'm trying to help people who have to use this poor excuse for a PDF
viewer called Adobe Reader on Windows. The viewer locks the PDF file,
i.e. one has to close the file before a PDFLaTeX run and open it
afterward again. Ideally at the same page which was displayed when
the file was closed. There are two programs being shipped with MiKTeX
2.5 which help doing this: pdfopen and pdfclose (produced from
arctrl.cpp if somebody wants to look at the source).
Now, the idea was to simply use these commands together with a call to
texify.exe in `TeX-command-list', i.e. something like
(eval-after-load "tex"
'(add-to-list 'TeX-command-list
'("Texify+View"
"pdfclose --file=%o & texify --pdf %t && pdfopen --file=%o"
TeX-run-TeX nil nil)))
Note that this is just a naive version not properly integrated with
something like TeX PDF mode.
I am proposing to use texify.exe because this takes care of running
latex, bibtex and makeindex multiple times if necessary and therefore
the PDF file is reopened only after all steps to produce the final
output are done.
The problem with this approach is that pdfopen does not seem to return
leaving Emacs in a frozen state as long as the viewer is open. Once
the viewer is closed one can work with Emacs again. I get the same
effect with something like
(call-process TeX-shell nil "foo" nil
TeX-shell-command-option
"pdfopen --file c:/path/to/some.pdf")
If this command is called in a MinGW shell, it returns.
Does anybody have an idea what the problem might be or how to debug
it? Workarounds are welcome, too,
--
Ralf
- [AUCTeX-devel] pdfopen not returning,
Ralf Angeli <=