[OS X Emacs] Re: Can't Make Doc-View Work

Peter Dyballa Peter_Dyballa at Web.DE
Sun Mar 21 15:56:23 EDT 2010


Am 12.03.2010 um 09:05 schrieb Axel E. Retif:

> How about this?


(defun split-for-tikz2pdf ()
   (interactive)
   (TeX-run-style-hooks "tikz")
   (TeX-run-style-hooks "tkz-berge")
   (let ((file-path (buffer-file-name)))
     (when file-path
;; The following call saves the whole output from tikz2pdf in the  
*Messages* buffer
;      (call-process-shell-command (format "tikz2pdf -v %S " file- 
path) nil "*Messages*" t nil)
;; The following call saves the whole output from tikz2pdf in the  
variable TikZ/PGF-output
;      (setq TikZ/PGF-output (shell-command-to-string (format  
"tikz2pdf -v %S" file-path)))
;; The following call does not save anything... (aren't there LOG  
files?)
       (shell-command-to-string (format "tikz2pdf -v %S" file-path))
   ))
   (other-window 1)
   (split-window-vertically 15)
   (find-file "tikz2pdf_temp.pdf")
   (auto-revert-mode 1)
   (doc-view-mode)
)

It took some time until I finally understood that the tikz2pdf script  
never finishes! (Which explains why the *shell* buffers stopped  
functioning.) So I added a *HACK* to the Python script:

			sys.exit(0)	# let it quit!

*I* added it as line #132. The disadvantage is that now the script's  
"temporary" files are not removed when it finishes. Before the user  
had to interactively send it a ^C which made the script clean up the  
directory.

Axel, could you test it extensively and maybe report to the original  
author? (I could as well. Just don't have enough code to test.)

--
Greetings

   Pete

Clovis' Consideration of an Atmospheric Anomaly:
         The perversity of nature is nowhere better demonstrated than  
by the fact that, when exposed to the same atmosphere, bread becomes  
hard while crackers become soft




More information about the MacOSX-Emacs mailing list