[Top][All Lists]

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

[Bug-AUCTeX] 11.85; PDF file deleted when generating previews

From: David Reitter
Subject: [Bug-AUCTeX] 11.85; PDF file deleted when generating previews
Date: Sun, 8 Feb 2009 18:20:02 -0500

Following a bug report that I received and my attempts to diagnose the issue, I'd like to report two issues with Preview mode:

- 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'.

- The user also reports that the PDF viewing application shows a lot of formulas for him (rather than the actual doc); I don't quite understand what's going on. I have verified that Preview generates _region_.pdf rather han anything else.

;; $Id: preview.el,v 1.282 2008/02/03 14:53:31 angeli Exp $

I hope this was sufficiently detailed; ask if I can supply more info.

Begin forwarded message:

From: Jan Rosinski <address@hidden>
Date: 8 February 2009 16:46:43 EST
To: Emacs on Mac OS X Mailing List <address@hidden>
Subject: Re: [OS X Emacs] sync with Skim
Reply-To: Emacs on Mac OS X Mailing List <address@hidden >

Maybe this will give more clues... (It may be messed up even more.)

I had  a pdf preview of a paper opened by Skim.
I toggled the preview of a formula in the file to its latex code (command-click) without making any change.
Then I run preview for the document (just to avoid preview at point).
Skim gave me all formulas from the paper, centered one under another,
in a very long file. No text.


On Feb 8, 2009, at 3:46 PM, David Reitter wrote:

On 8 Feb 2009, at 15:04, Peter Dyballa wrote:

Am 08.02.2009 um 17:50 schrieb David Reitter:

Maybe (!) Aquamacs/AUCTeX deletes the .pdf

'ls -li <PDF file>' will show the inode. If this changes, then you /have/ a new file.

Right. Turns out that "Toggle Preview at Point" actually deletes the main PDF file. That doesn't make sense to me.

Jan, do you want to take it up with the AUCTeX Help group then? It's their code.

On 8 Feb 2009, at 13:41, Enrico Franconi wrote:

I suspect (since it makes sense) that preview generates a new pdf file at each invocation - even if it has the same name. In this case, skim's behaviour is as expected.

On 8 Feb 2009, at 17:50, David Reitter wrote:

OK, I reproduce the behavior. I see that the .pdf is correctly generated with a new time stamp. I did get correct Skim behavior the first time around, but not after using "generate preview at point". It's unclear to me what the interaction with AUCTeX/preview is, but I would say that as soon as the PDF is regenerated, Skim should update. (After doing a "revert" in Skim, things work fine.)

I can imagine that Skim looses the handle on the file. Maybe (!) Aquamacs/AUCTeX deletes the .pdf or does something else to it, and the file system can't keep track of it. Something like that perhaps.

Thus, I defer to the Skim team for now!

PS., Christiaan, the Report Bug link on the Skim website links to the main Sourceforge homepage or their login screen.

http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and support the Aquamacs Project!

On 8 Feb 2009, at 11:24, Jan Rosinski wrote:

Aquamacs 1.6 build 0110 - Feb-07
Same behavior when starting without customization

On Feb 8, 2009, at 10:55 AM, David Reitter wrote:

Jan / Daniel,

If this did not change with a Skim version change, then please let us know which version of Aquamacs/Emacs you're using exactly, and make sure that this problem replicates when (in Aquamacs) you start without customizations (Help -> Diagnose -> Start without...).

If we can replicate the bug, we'll be happy to help of course.

http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and support the Aquamacs Project!

On 8 Feb 2009, at 09:48, Daniel Stegmueller wrote:


I observed the same behavior in the previous version of Skim, too.


On 8 Feb 2009, at 14:54, Jan Rosinski wrote:

I have noticed that if I use preview in line in latex mode,
update a formula and regenerate its preview (at point),
then Skim does not update the pdf, no matter how many
typesettings I run.
I have to close Skim's preview file and generate a new one.
I have observed this annoying behavior syncing with the newest Skim 1.2.1,
I do not know whether it was present in earlier versions.

To: address@hidden
Subject: 11.85; PDF file deleted when generating previews
--text follows this line--

Remember to cover the basics.  Including a minimal LaTeX example
file exhibiting the problem might help.

Emacs  : GNU Emacs 22.3.1 (i386-apple-darwin9.6.0, Carbon Version 1.6.0)
 of 2009-02-07 on plume.sr.unh.edu - Aquamacs Distribution 1.7CVS
Package: 11.85

Run buffer contents:

Running `Preview-LaTeX' on `_region_' with ``pdflatex "\nonstopmode \nofiles\PassOptionsToPackage{active,tightpage,auctex}{preview} \AtBeginDocument{\ifx\ifPreview\undefined \RequirePackage [displaymath,floats,graphics,textmath,sections,footnotes]{preview} [2004/11/05]\fi}" "\input" _region_.tex''
This is pdfTeXk, Version 3.1415926-1.40.9 (Web2C 7.5.7)
 %&-line parsing enabled.
entering extended mode
LaTeX2e <2005/12/01>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh yphenation, german-x-2008-06-18, ngerman-x-2008-06-18, ancientgreek, ibycus, ar abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danish, dutc h, esperanto, estonian, farsi, finnish, french, galician, german, ngerman, mono greek, greek, hungarian, icelandic, indonesian, interlingua, irish, italian, la tin, mongolian, mongolian2a, bokmal, nynorsk, polish, portuguese, romanian, rus sian, sanskrit, serbian, slovak, slovenian, spanish, swedish, turkish, ukenglis
h, ukrainian, uppersorbian, welsh, loaded.

No auxiliary output files.

(./_region_.tex  !name(model-article.tex) (./apa.cls
Document Class: apa 2006/01/31 American Psychological Association format v1.3.2

Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(_region_.fff) (_region_.ttt))

! LaTeX Error: \makeindex undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

l.687 \renewcommand\makeindex
) (./apasec.sty) (./avm.sty) (./parsetree.sty
Including style file `parsetree.sty'.
) (/usr/local/texlive/2008/texmf-dist/tex/latex/psnfss/times.sty)


(/Applications/Aquamacs Emacs.app/Contents/Resources/site-lisp/edit- modes/aucte
(/Applications/Aquamacs Emacs.app/Contents/Resources/site-lisp/edit- modes/aucte
(/Applications/Aquamacs Emacs.app/Contents/Resources/site-lisp/edit- modes/aucte
No auxiliary output files.

(/Applications/Aquamacs Emacs.app/Contents/Resources/site-lisp/edit- modes/aucte
(/Applications/Aquamacs Emacs.app/Contents/Resources/site-lisp/edit- modes/aucte
Preview: Fontsize 10.95pt
Preview: PDFoutput 1
) (/usr/local/texlive/2008/texmf-dist/tex/latex/apa/english.apa)
[Loading MPS to PDF converter (version 2006.09.02).]
)  !name(model.tex) !offset(-134)
! Preview: Snippet 1 started.

l.144 \sectionA{Introduction}

Preview: Tightpage -32891 -32891 32891 32891
! Preview: Snippet 1 ended.(2517654+0x28417720).

l.144 \sectionA{Introduction}

Non-PDF special ignored!
Non-PDF special ignored!
Non-PDF special ignored!
Non-PDF special ignored!{/usr/local/texlive/2008/texmf-var/fonts/map/ pdftex/upd

Package natbib Warning: Citation `Levelt:89' on page 1 undefined on input line

Package natbib Warning: Citation `bock1986syntactic' on page 1 undefined on inp
ut line 165.

 !name(model-article.tex) !offset(-26)
AED endfloat: Processing end Figures and Tables (./_region_.ttt)

Package natbib Warning: There were undefined citations.

(see the transcript file for additional information){/usr/local/ texlive/2008/te xmf-dist/fonts/enc/dvips/base/8r.enc}</usr/local/texlive/2008/texmf- dist/fonts/
Output written on _region_.pdf (1 page, 9083 bytes).
Transcript written on _region_.log.

Preview-LaTeX exited as expected with code 1 at Sun Feb  8 18:14:53
Running `Preview-PDF2DSC' with ``pdf2dsc _region_.pdf _region_.prv/ tmp4484YJK/preview.dsc''

Preview-PDF2DSC finished at Sun Feb  8 18:14:53
Running `Preview-Ghostscript' with ``gs -dOutputFile\=\(_region_.prv/ tmp4484YJK/pr1-\%d.png\) -q -dSAFER -dNOPAUSE -DNOPLATFONTS -dPrinted - dTextAlphaBits\=4 -dGraphicsAlphaBits\=4 -sDEVICE\=png16m - r111.342x113.082''

Preview-Ghostscript finished at Sun Feb  8 18:14:53

current state:
 AUCTeX-version "11.85"
 LaTeX-command-style '(("" "%(PDF)%(latex) %S%(PDFout)"))
 image-types '(png gif tiff jpeg xpm xbm pbm)
 preview-image-type 'png
 preview-image-creators '((dvipng
                           (open preview-gs-open preview-dvipng-process-setup)
                           (place preview-gs-place)
                           (close preview-dvipng-close))
                          (png (open preview-gs-open) (place preview-gs-place)
                           (close preview-gs-close))
                          (jpeg (open preview-gs-open)
                           (place preview-gs-place) (close preview-gs-close))
                          (pnm (open preview-gs-open) (place preview-gs-place)
                           (close preview-gs-close))
                          (tiff (open preview-gs-open)
                           (place preview-gs-place) (close preview-gs-close))
 preview-dvipng-image-type 'png
preview-dvipng-command "dvipng -picky -noghostscript %d -o \"%m/prev% %03d.png\""
 preview-pdf2dsc-command "pdf2dsc %s.pdf %m/preview.dsc"
 preview-gs-command "gs"
preview-gs-options '("-q" "-dSAFER" "-dNOPAUSE" "-DNOPLATFONTS" "- dPrinted"
                      "-dTextAlphaBits=4" "-dGraphicsAlphaBits=4")
 preview-gs-image-type-alist '((png png "-sDEVICE=png16m")
                               (dvipng png "-sDEVICE=png16m")
                               (jpeg jpeg "-sDEVICE=jpeg")
                               (pnm pbm "-sDEVICE=pnmraw")
                               (tiff tiff "-sDEVICE=tiff12nc"))
 preview-fast-conversion t
 preview-prefer-TeX-bb nil
 preview-dvips-command "dvips -Pwww -i -E %d -o %m/preview.000"
 preview-fast-dvips-command "dvips -Pwww %d -o %m/preview.ps"
 preview-scale-function 'preview-scale-from-face
preview-LaTeX-command '("%`%l \"\\nonstopmode\\nofiles\ \PassOptionsToPackage{"
                         ("," . preview-required-option-list)
"}{preview}\\AtBeginDocument{\\ifx\\ifPreview\\undefined" preview- default-preamble "\\fi}\"%' %t")
 preview-required-option-list '("active" "tightpage" "auctex"
                                (preview-preserve-counters "counters"))
 preview-preserve-counters nil
preview-default-option-list '("displaymath" "floats" "graphics" "textmath"
                               "sections" "footnotes")
 preview-default-preamble '("\\RequirePackage["
                            ("," . preview-default-option-list)
 preview-LaTeX-command-replacements nil
 preview-dump-replacements '(preview-LaTeX-command-replacements
("\\`\\([^ ]+\\)\\(\\( +-\\([^ \\\\\"]\\|\\\\\\.\\|\"[^\"]*\"\ \)*\\)*\\)\\(.*\\)\\'" "\\1 -ini -interaction=nonstopmode \"&\\1\" " preview-format-name ".ini \\5")
preview-undump-replacements '(("\\`\\([^ ]+\\) .*? \"\\\\input\" \\ (.*\\)\\'"
                                "\\1 -interaction=nonstopmode \"&"
                                preview-format-name "\" \\2")
 preview-auto-cache-preamble 'ask
preview-TeX-style-dir "/Applications/Aquamacs Emacs.app/Contents/ Resources/site-lisp/edit-modes/auctex/latex"

Output from running `gs -h':
GPL Ghostscript 8.60 (2007-08-01)
Copyright (C) 2007 Artifex Software, Inc.  All rights reserved.
Usage: gs [switches] [file1.ps file2.ps ...]
Most frequently used switches: (you can use # in place of =)
-dNOPAUSE no pause after page | -q `quiet', fewer messages -g<width>x<height> page size in pixels | -r<res> pixels/inch resolution -sDEVICE=<devname> select device | -dBATCH exit after last file -sOutputFile=<file> select output file: - for stdout, |command for pipe,
                                         embed %d or %ld for page #
Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PostScriptLevel3 PDF
Default output device: bbox
Available devices:
alc1900 alc2000 alc4000 alc4100 alc8500 alc8600 alc9100 ap3250 appledmp atx23 atx24 atx38 bbox bit bitcmyk bitrgb bitrgbtags bj10e bj10v bj10vh bj200 bjc600 bjc800 bjc880j bjccmyk bjccolor bjcgray bjcmono bmp16 bmp16m bmp256 bmp32b bmpgray bmpmono bmpsep1 bmpsep8 ccr cdeskjet cdj1600 cdj500 cdj550 cdj670 cdj850 cdj880 cdj890 cdj970 cdjcolor cdjmono cfax cgm24 cgm8 cgmmono chp2200 cif cljet5 cljet5c cljet5pr coslw2p coslwxl cp50 cups declj250 deskjet devicen dfaxhigh dfaxlow dj505j djet500 djet500c dl2100 dnj650c epl2050 epl2050p epl2120 epl2500 epl2750 epl5800 epl5900 epl6100 epl6200 eps9high eps9mid epson epsonc epswrite escp escpage faxg3 faxg32d faxg4 fmlbp fmpr fs600 gdi hl1240 hl1250 hl7x0 hpdj1120c hpdj310 hpdj320 hpdj340 hpdj400 hpdj500 hpdj500c hpdj510 hpdj520 hpdj540 hpdj550c hpdj560c hpdj600 hpdj660c hpdj670c hpdj680c hpdj690c hpdj850c hpdj855c hpdj870c hpdj890c hpdjplus hpdjportable ibmpro ijs imagen imdi inferno
   iwhi iwlo iwlq jetp3852 jj100 jpeg jpegcmyk jpeggray la50 la70 la75
   la75plus laserjet lbp310 lbp320 lbp8 lex2050 lex3200 lex5700 lex7000
lips2p lips3 lips4 lips4v lj250 lj3100sw lj4dith lj4dithp lj5gray lj5mono ljet2p ljet3 ljet3d ljet4 ljet4d ljet4pjl ljetplus ln03 lp1800 lp1900 lp2000 lp2200 lp2400 lp2500 lp2563 lp3000c lp7500 lp7700 lp7900 lp8000 lp8000c lp8100 lp8200c lp8300c lp8300f lp8400f lp8500c lp8600 lp8600f
   lp8700 lp8800c lp8900 lp9000b lp9000c lp9100 lp9200b lp9200c lp9300
   lp9400 lp9500c lp9600 lp9600s lp9800c lps4500 lps6500 lq850 lx5000
lxm3200 lxm5700m m8510 mag16 mag256 md1xMono md2k md50Eco md50Mono md5k
   mgr4 mgr8 mgrgray2 mgrgray4 mgrgray8 mgrmono miff24 mj500c mj6000c
mj700v2c mj8000c ml600 necp6 npdl nullpage oce9050 oki182 oki4w okiibm omni oprp opvp paintjet pam pbm pbmraw pcl3 pcx16 pcx24b pcx256 pcx2up pcxcmyk pcxgray pcxmono pdfwrite pgm pgmraw pgnm pgnmraw photoex picty180
   pj pjetxl pjxl pjxl300 pkm pkmraw pksm pksmraw plan9bm png16 png16m
   png256 png48 pngalpha pnggray pngmono pnm pnmraw ppm ppmraw pr1000
pr1000_4 pr150 pr201 ps2write psdcmyk psdrgb psgray psmono psrgb pswrite pxlcolor pxlmono r4081 rpdl samsunggdi sgirgb sj48 spotcmyk st800 stcolor
   sunhmono t4693d2 t4693d4 t4693d8 tek4696 tiff12nc tiff24nc tiff32nc
   tiffcrle tiffg3 tiffg32d tiffg4 tiffgray tifflzw tiffpack tiffsep
uniprint wtscmyk wtsimdi x11 x11alpha x11cmyk x11cmyk2 x11cmyk4 x11cmyk8
   x11gray2 x11gray4 x11mono x11rg16x x11rg32x xcf xes
Search path:
   . : %rom%lib/ : /opt/local/share/ghostscript/8.60/lib :
   /opt/local/share/ghostscript/8.60/Resource :
   /opt/local/share/ghostscript/fonts :
   /opt/local/share/fonts/default/ghostscript :
   /opt/local/share/fonts/default/Type1 :
/opt/local/share/fonts/default/TrueType : /usr/lib/DPS/outline/ base : /usr/openwin/lib/X11/fonts/Type1 : /usr/openwin/lib/X11/fonts/ TrueType
Initialization files are compiled into the executable.
For more information, see /opt/local/share/ghostscript/8.60/doc/Use.htm.
Please report bugs to bugs.ghostscript.com.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

reply via email to

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