[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] pdfopen not returning

From: David Kastrup
Subject: Re: [AUCTeX-devel] pdfopen not returning
Date: Fri, 18 Aug 2006 21:39:43 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Ralf Angeli <address@hidden> writes:

> 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,

Use TeX-run-discard or the equivalent
(call-process TeX-shell nil 0 nil
              "pdfopen --file c:/path/to/some.pdf")

It's what we do with all viewers.  The equivalent from a command shell
would be something like

nohup viewer >/dev/null

Our command shells are a mess, anyway.

Oh, in the line of TeXify and company:

    texi2dvi -l LaTeX

is also a possibility.  We really need something more universal than
the current mess in order to specify processors.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

[Prev in Thread] Current Thread [Next in Thread]