auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] Re: Preview-latex temporaty files


From: Ralf Angeli
Subject: [AUCTeX-devel] Re: Preview-latex temporaty files
Date: Sun, 15 Mar 2009 16:38:51 +0100

* David Kastrup (2009-03-12) writes:

> Ralf Angeli <address@hidden> writes:
>
>> Perhaps we should be more agressive when cleaning (and removing) the
>> directory when exiting Emacs.  Does anybody know why the file
>> <master>.prv/.../preview.ps is kept on exit?
>
> If it is, this is likely a bug.  The idea is complete cleanup unless
> errors occured.

Then this might be intentional, I'm not sure.  It happens only for
circ.tex in my case which contains two intentional errors.

When the buffer is closed, all overlays are processed and the associated
files are deleted by `preview-delete-file'.  A file is only deleted if
the caar of the `filename' overlay property is not a cons or if the
number in the cdr of the cons is 1.  (This is probably a reference
counter.)

Now if you examine the overlays in the circ.tex buffer and only look at
the ones with a cons as caar, then you get something like this (paths
truncated):

(((("/.../circ.prv/tmp19577gKh/preview.ps" . 3)
   "/.../circ.prv/tmp19577gKh" "/.../circ.prv" 3)
  ("/.../circ.prv/tmp19577gKh/pr2-1.png" "/.../circ.prv/tmp19577gKh"
   "/.../circ.prv" 3))
 ((("/.../circ.prv/tmp19577gKh/preview.ps" . 3)
   "/.../circ.prv/tmp19577gKh" "/.../circ.prv" 3)
  ("/.../circ.prv/tmp19577gKh/pr1-1.png" "/.../circ.prv/tmp19577gKh"
   "/.../circ.prv" 3)))

If somebody wants to reproduce the output, I used the following snippet
to generate it:

(let (list files)
  (dolist (ov (overlays-in (point-min) (point-max)))
    (setq files (overlay-get ov 'filenames))
    (when (consp (caar files))
      (add-to-list 'list files t)))
  list)

Anyway, there are two references to preview.ps coming from the
intentional errors in the file but the reference counter is 3, so this
could be an off-by-one error.

Crosspost & Followup-To: gmane.emacs.auctex.devel
-- 
Ralf





reply via email to

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