[ESS] [Solved] Re: pdfLaTeX from ESS/Noweb opens shell window (XP)
Nick Bell
mail at nickbell.org
Fri Mar 26 19:18:38 CET 2010
On 25/03/2010 08:57, Martin Maechler wrote:
> Well, I'm not Windozer but M-n P calls (ess-swv-PDF ..) and that is
> defined in lisp/ess-swv.el, and on line 173 has (call-process
> "pdflatex" nil tex-buf 1 latex-filename))
>
> where call-process is an Emacs-internal function { C-h f
> call-process explains the arguments (call-process
> program&optional infile buffer display&rest args) and more } Could
> you try changing the 'display' argument to call-process,i.e.,
> replace (call-process "pdflatex" nil tex-buf 1 latex-filename)) by
> (call-process "pdflatex" nil tex-buf nil latex-filename))
>
> (and *remove* the ess-swv.elc file {or remake it}) and see if that
> helps under Windoze?
>
> In general (i.e. under reasonable OS es) I'd still prefer to *see*
> the pdflatex happening, i.e., keep display set to non-nil, but we
> could set it to nil for Windows.
Thanks Martin. The problem was actually a few lines down: shell-command
was calling pdfviewer which by default is "open.exe" which appears to
open a shell. In any case, I don't want any viewer to open when I
compile to PDF, so all I did was modify ess-swv.el thus:
(if (not (= 0 pdf-status))
(message "** OOPS: error in 'pdflatex' (%d)!" pdf-status)
;; else: pdflatex probably ok
(message "PDF %s%s generated." namestem ".pdf"))
;; (shell-command (concat
;; (if (and ess-microsoft-p (w32-shell-dos-semantics))
;; "start \"" pdfviewer "\" \"" namestem ".pdf\""
;; "\"" pdfviewer "\" \"" namestem ".pdf\" &"))))
... to print a reassuring message if all goes well. I then use
SumatraPDF to view the PDF, as it updates itself.
On my Macs I use the beautiful Skim.app, but my work laptop
unfortunately runs Windows.
Thanks again.
Nick
--
Nick Bell
mail at nickbell.org
More information about the ESS-help
mailing list