auctex
[Top][All Lists]
Advanced

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

[AUCTeX] Adding custom "make" command to TeX-command-list


From: J . Burton
Subject: [AUCTeX] Adding custom "make" command to TeX-command-list
Date: Tue, 20 Apr 2010 15:17:40 +0100
User-agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Goj┼Ź) APEL/10.7 Emacs/23.1.50 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Hi, I want to add a command to TeX-command-list that will do a dumb
version of the usual LaTeX make thing, calling latex/pdflatex twice,
then bibtex, then latex/pdflatex again. The problem is that
TeX-command creates an asynchronous process and I can't work out how
to wait for it. I started with this:

(add-to-list  'TeX-command-list ("make" "" jb/TeX-make nil t))

(defun jb/TeX-make (cmd cmdstr file)
  (progn 
    (TeX-command "LaTeX" 'TeX-master-file)
    (TeX-command "LaTeX" 'TeX-master-file)
    (TeX-command "BibTeX" 'TeX-master-file)
    (TeX-command "LaTeX" 'TeX-master-file)))

where I want to run the TeX-commands in sequence. I tried various ways
of attaching a sentinel to the process returned by each call of
TeX-command then using accept-process-output to wait, but that
function returns whenever it receives some input, so I don't get the
chance to wait til the process is ended -- how is that done?

I could call an external script with TeX-run-command but I thought it
would be nicer to do it emacs...has someone already done this? Thanks,

Jim




reply via email to

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