[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-AUCTeX] Re: 11.85; PDF file deleted when generating previews
From: |
Ralf Angeli |
Subject: |
[Bug-AUCTeX] Re: 11.85; PDF file deleted when generating previews |
Date: |
Sat, 14 Feb 2009 19:54:55 +0100 |
* David Reitter (2009-02-09) writes:
> - In AUCTeX (latest release) with PDF mode on, using the command bound
> to the menu item "(or toggle) at point", the .pdf file associated with
> the master file for the current .tex source is deleted. This is
> annoying; among the problems it causes is the reported one quoted below.
>
> It appears that the .pdf file is deleted towards the end of the
> preview generation; this is noticeable when running the slower
> "generate previews for buffer".
>
> Further investigation shows that the .pdf file is deleted by preview-
> gs-sentinel because it is the car of `preview-ps-file'.
AFAICS there might be two problems:
1) The car of `preview-ps-file' should likely point to _region_.pdf
because that's the intermediate store for previews before they are
being extracted to become PNG files.
2) The file given in the car of `preview-ps-file' should likely not be
deleted in `preview-gs-sentinel'. The deletion is carried out in
case there is no associated overlay or the process was killed by a
signal. In principle there is an overlay but the information about
it was deleted in `preview-gs-transact' via `preview-gs-filter'. So
it could be intentional that the information about the overlay does
not survive untill `preview-gs-sentinel'. If this is the case,
setting the file to be deleted to _region_.pdf should still help, but
why bother deleting the file if _region_.tex and the cruft from the
LaTeX run on it is still lying around?
I'm not sure about either point, so I hope somebody can shed some more
light on this. In order to make this a bit easier here is a transcript
of the tool chain I've written up during my investigations:
1) Preview-LaTeX on _region_.tex
Produces: _region_.pdf
preview-TeX-inline-sentinel --> (preview-call-hook 'open) -->
preview-gs-open --> preview-dvipng-process-setup -->
preview-pdf2dsc-process-setup --> preview-start-pdf2dsc (sets car of
`preview-ps-file' to master file)
2) Preview-PDF2DSC on _region_.pdf
Produces: _region_.prv/.../preview.dsc
preview-pdf2dsc-sentinel --> preview-gs-restart (produces PNG files;
uses `preview-gs-filter' as process filter which pops stuff from
`preview-gs-outstanding' via `preview-gs-transact')
3) Preview-Ghostscript
Produces: pr1-1.png
preview-gs-sentinel (tries to get overlay with
`preview-gs-behead-outstanding' by popping the car from
`preview-gs-outstanding' but there is none; deletes file given in car
of `preview-ps-file' if overlay is nil or the process was killed by a
signal)
--
Ralf