[Top][All Lists]

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

Re: [O] How would you export one headline every time that you tangle the

From: John Kitchin
Subject: Re: [O] How would you export one headline every time that you tangle the file?
Date: Thu, 13 Aug 2015 10:14:18 -0400

I also do something like this for scientific manuscripts, but I usually put it 
in a heading at the
end and tag the heading :noexport:. that gives me some more flexibility
to have multiple steps, some notes, etc...


* build  :noexport:

#+BEGIN_SRC emacs-lisp :tangle no :exports none
(require 'ox-gfm)
(org-export-to-file 'gfm "README.md" nil t)

Charles C. Berry writes:

> On Wed, 12 Aug 2015, Grant Rettke wrote:
>> Good afternoon,
>> I've got an org file. It has a bunch of headlines. There is on
>> headline names README.
>> I want to do something every time I tangle the file. I want to:
>> - Go to that headline
>> - Select set the region to the contents of that headline (org-mark-subtree)
>> - Export the contents using the Github Flavored Markup to the file README.md.
> If this is a one-off, I'd write a babel block like this and put it under
> the headline of that subtree:
> #+NAME: tangle-and-export-readme
> #+BEGIN_SRC emacs-lisp :tangle no :exports none
> (org-babel-tangle)
> (require 'ox-gfm)
> (org-export-to-file 'gfm "README.md" nil t)
> Then when you want to tangle,
> C-c C-v g tangle-and-export-readme RET C-c C-c y
> will do it. (Assuming contrib is on the load path, of course.)
> You can use TAB completion with `C-c C-v g'.
> HTH,
> Chuck

Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213

reply via email to

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