From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miguel Telleria de Esteban Subject: Re: How to invoke org-export externally from outside Emacs Date: Thu, 25 Sep 2014 12:40:35 +0200 Message-ID: <20140925124035.1b5ebb34@patti> References: <20140925105626.14caee18@patti> <20140925090124.GB4563@cardamom.adamsinfoserv.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/cyjbcYdoQpcl2RrI/5P4T4C"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XX6Tl-0004Dl-DN for emacs-orgmode@gnu.org; Thu, 25 Sep 2014 06:40:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XX6Tg-0001zT-Kz for emacs-orgmode@gnu.org; Thu, 25 Sep 2014 06:40:53 -0400 Received: from smtpauth-vit.online.net ([88.190.253.76]:60489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XX6Tg-0001xs-BX for emacs-orgmode@gnu.org; Thu, 25 Sep 2014 06:40:48 -0400 Received: from [62.42.150.250] (helo=patti) by smtpauth-vit.online.net with esmtpsa (SSL3.0:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XX6TZ-00014D-Oi for emacs-orgmode@gnu.org; Thu, 25 Sep 2014 12:40:41 +0200 In-Reply-To: <20140925090124.GB4563@cardamom.adamsinfoserv.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --Sig_/cyjbcYdoQpcl2RrI/5P4T4C Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks Russel, this is exactly what I was looking for!! Miguel On Thu, 25 Sep 2014 04:01:24 -0500 Russell Adams wrote: > On Thu, Sep 25, 2014 at 10:56:26AM +0200, Miguel Telleria de Esteban > wrote: > > Dear list, > > > > I am using org-mode more and more everyday, congrats to the community > > for such a great program!! > > > > I would like to automate the generation of PDF/HTML/ODT... thorough a > > command line with a makefile. Something like: > > > > file.pdf: file.org > > > > > > Is there a way to externally launch, let's say org-latex-export-to-pdf > > from outside Emacs?. Maybe through a script. > > > > Probably this is more an Emacs-list question than an org-mode one but > > any suggestion here will be welcome. > > > > Cheers and thanks in advance for any suggestion. > > > > Miguel >=20 > I use a Makefile to export to latex, then I use pdflatex to compile > the final version. Org does the same thing if you ask it to go > straight to PDF, but this lets me include my revision number. >=20 > This also launches my pdf viewer (xpdf), and works for every .org file > in the directory. >=20 > Makefile: > ---------------------------------------------------------------------- > .PHONY: all clean >=20 > OBJS :=3D $(patsubst %.org, %.pdf, $(wildcard *.org)) >=20 > CRAP :=3D $(patsubst %.org, %.pdf, $(wildcard *.org)) > CRAP +=3D $(patsubst %.org, %.aux, $(wildcard *.org)) > CRAP +=3D $(patsubst %.org, %.log, $(wildcard *.org)) > CRAP +=3D $(patsubst %.org, %.out, $(wildcard *.org)) > CRAP +=3D $(patsubst %.org, %.toc, $(wildcard *.org)) >=20 > all: $(OBJS) >=20 > clean: > rm -f $(CRAP) >=20 > %.tex: %.org > emacs -batch \ > -load ~/.emacs \ > --eval '(setq enable-local-variables :all)' \ > --visit=3D$< \ > -f org-export-as-latex \ >=20 > %.pdf: %.tex > pdflatex "\\def\\Revision {`bzr version-info --custom > --template=3D\"{revno}\" $<`}" "\\input{$<}" pdflatex "\\def\\Revision > {`bzr version-info --custom --template=3D\"{revno}\" $<`}" "\\input{$<}" > xpdf $@ > ---------------------------------------------------------------------- >=20 > ------------------------------------------------------------------ > Russell Adams RLAdams@AdamsInfoServ.com >=20 > PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ >=20 > Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 >=20 --=20 (O-O) ---oOO-(_)-OOo----------------------------------------------------------- Miguel TELLERIA DE ESTEBAN http://www.mtelleria.com Email: miguel at mtelleria.com Miembro de: http://www.linuca.org Membre du: http://www.bxlug.be =C2=BFUsuario captivo o libre? http://www.whylinuxisbetter.net/index_es.= php Free or captive user? http://www.whylinuxisbetter.net ------------------------------------------------------------------------- --Sig_/cyjbcYdoQpcl2RrI/5P4T4C Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlQj8SgACgkQFZSFLxwXZdKqtwCgvC0DyEYAavN0laQlxzHQdmBL DRQAn3fvs5hd9vGMHzOZlREx/62HnkVq =6CLN -----END PGP SIGNATURE----- --Sig_/cyjbcYdoQpcl2RrI/5P4T4C--