* How to invoke org-export externally from outside Emacs
@ 2014-09-25 8:56 Miguel Telleria de Esteban
2014-09-25 9:01 ` Russell Adams
0 siblings, 1 reply; 4+ messages in thread
From: Miguel Telleria de Esteban @ 2014-09-25 8:56 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1134 bytes --]
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
<generation_command_here>
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
--
(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
¿Usuario captivo o libre? http://www.whylinuxisbetter.net/index_es.php
Free or captive user? http://www.whylinuxisbetter.net
-------------------------------------------------------------------------
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to invoke org-export externally from outside Emacs
2014-09-25 8:56 How to invoke org-export externally from outside Emacs Miguel Telleria de Esteban
@ 2014-09-25 9:01 ` Russell Adams
2014-09-25 10:40 ` Miguel Telleria de Esteban
2014-09-25 11:32 ` Fabrice Niessen
0 siblings, 2 replies; 4+ messages in thread
From: Russell Adams @ 2014-09-25 9:01 UTC (permalink / raw)
To: emacs-orgmode
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
> <generation_command_here>
>
> 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
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.
This also launches my pdf viewer (xpdf), and works for every .org file
in the directory.
Makefile:
----------------------------------------------------------------------
.PHONY: all clean
OBJS := $(patsubst %.org, %.pdf, $(wildcard *.org))
CRAP := $(patsubst %.org, %.pdf, $(wildcard *.org))
CRAP += $(patsubst %.org, %.aux, $(wildcard *.org))
CRAP += $(patsubst %.org, %.log, $(wildcard *.org))
CRAP += $(patsubst %.org, %.out, $(wildcard *.org))
CRAP += $(patsubst %.org, %.toc, $(wildcard *.org))
all: $(OBJS)
clean:
rm -f $(CRAP)
%.tex: %.org
emacs -batch \
-load ~/.emacs \
--eval '(setq enable-local-variables :all)' \
--visit=$< \
-f org-export-as-latex \
%.pdf: %.tex
pdflatex "\\def\\Revision {`bzr version-info --custom --template=\"{revno}\" $<`}" "\\input{$<}"
pdflatex "\\def\\Revision {`bzr version-info --custom --template=\"{revno}\" $<`}" "\\input{$<}"
xpdf $@
----------------------------------------------------------------------
------------------------------------------------------------------
Russell Adams RLAdams@AdamsInfoServ.com
PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to invoke org-export externally from outside Emacs
2014-09-25 9:01 ` Russell Adams
@ 2014-09-25 10:40 ` Miguel Telleria de Esteban
2014-09-25 11:32 ` Fabrice Niessen
1 sibling, 0 replies; 4+ messages in thread
From: Miguel Telleria de Esteban @ 2014-09-25 10:40 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2990 bytes --]
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
> > <generation_command_here>
> >
> > 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
>
> 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.
>
> This also launches my pdf viewer (xpdf), and works for every .org file
> in the directory.
>
> Makefile:
> ----------------------------------------------------------------------
> .PHONY: all clean
>
> OBJS := $(patsubst %.org, %.pdf, $(wildcard *.org))
>
> CRAP := $(patsubst %.org, %.pdf, $(wildcard *.org))
> CRAP += $(patsubst %.org, %.aux, $(wildcard *.org))
> CRAP += $(patsubst %.org, %.log, $(wildcard *.org))
> CRAP += $(patsubst %.org, %.out, $(wildcard *.org))
> CRAP += $(patsubst %.org, %.toc, $(wildcard *.org))
>
> all: $(OBJS)
>
> clean:
> rm -f $(CRAP)
>
> %.tex: %.org
> emacs -batch \
> -load ~/.emacs \
> --eval '(setq enable-local-variables :all)' \
> --visit=$< \
> -f org-export-as-latex \
>
> %.pdf: %.tex
> pdflatex "\\def\\Revision {`bzr version-info --custom
> --template=\"{revno}\" $<`}" "\\input{$<}" pdflatex "\\def\\Revision
> {`bzr version-info --custom --template=\"{revno}\" $<`}" "\\input{$<}"
> xpdf $@
> ----------------------------------------------------------------------
>
> ------------------------------------------------------------------
> Russell Adams RLAdams@AdamsInfoServ.com
>
> PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
>
> Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
>
--
(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
¿Usuario captivo o libre? http://www.whylinuxisbetter.net/index_es.php
Free or captive user? http://www.whylinuxisbetter.net
-------------------------------------------------------------------------
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to invoke org-export externally from outside Emacs
2014-09-25 9:01 ` Russell Adams
2014-09-25 10:40 ` Miguel Telleria de Esteban
@ 2014-09-25 11:32 ` Fabrice Niessen
1 sibling, 0 replies; 4+ messages in thread
From: Fabrice Niessen @ 2014-09-25 11:32 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Russell Adams wrote:
> On Thu, Sep 25, 2014 at 10:56:26AM +0200, Miguel Telleria de Esteban wrote:
>> 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
>> <generation_command_here>
>>
>> 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.
>
> 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.
>
> This also launches my pdf viewer (xpdf), and works for every .org file
> in the directory.
FWIW, I've written small standalone scripts (such as org2pdf, org2html,
org2odt, etc.) to automate such tasks.
If you're interested, have a look at https://github.com/fniessen/orgmk.
Best regards,
Fabrice
--
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-25 11:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-25 8:56 How to invoke org-export externally from outside Emacs Miguel Telleria de Esteban
2014-09-25 9:01 ` Russell Adams
2014-09-25 10:40 ` Miguel Telleria de Esteban
2014-09-25 11:32 ` Fabrice Niessen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).