* exporting "flattened" tagged subtrees
@ 2017-11-30 11:06 Michel Damiens
2017-12-01 14:26 ` Rasmus
0 siblings, 1 reply; 2+ messages in thread
From: Michel Damiens @ 2017-11-30 11:06 UTC (permalink / raw)
To: emacs-orgmode
Hello,
I would like to export and org file in such a way that :
- only tagged subtrees are exported (for a specific tag)
- the tree structure is "flattened"
for example a file example.org containing :
* heading 1 :tag:
** subheading 1.1
content 1.1
** subheading 1.2 :tag:
content 1.2
*heading 2
** subheading 2.1 :tag:
content 2.1
** subheading 2.1.1 :tag:
** subheading 2.1.2 :tag:
content 2.1.2
** subheading 2.2
content 2.2
would be exported to the file example.org.org containing :
* heading 1
* subheading 1.2
content 1.2
* subheading 2.1
content 2.1
* subheading 2.1.1
* subheading 2.1.2
content 2.1.2
(which in turn would be exported to latex, beamer or html for example)
Thanks for your help
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: exporting "flattened" tagged subtrees
2017-11-30 11:06 exporting "flattened" tagged subtrees Michel Damiens
@ 2017-12-01 14:26 ` Rasmus
0 siblings, 0 replies; 2+ messages in thread
From: Rasmus @ 2017-12-01 14:26 UTC (permalink / raw)
To: emacs-orgmode
Michel Damiens <michel.damiens@gmail.com> writes:
> Hello,
>
> I would like to export and org file in such a way that :
> - only tagged subtrees are exported (for a specific tag)
> - the tree structure is "flattened"
>
> for example a file example.org containing :
> * heading 1 :tag:
> ** subheading 1.1
> content 1.1
> ** subheading 1.2 :tag:
> content 1.2
> *heading 2
> ** subheading 2.1 :tag:
> content 2.1
> ** subheading 2.1.1 :tag:
> ** subheading 2.1.2 :tag:
> content 2.1.2
> ** subheading 2.2
> content 2.2
>
> would be exported to the file example.org.org containing :
> * heading 1
> * subheading 1.2
> content 1.2
> * subheading 2.1
> content 2.1
> * subheading 2.1.1
> * subheading 2.1.2
> content 2.1.2
>
> (which in turn would be exported to latex, beamer or html for example)
The first part you can archive with these tags:
#+SELECT_TAGS:, #+EXCLUDE_TAGS:
These lines provide settings for exporting files. For more details see Export settings .
Flatting the file can be done by search and replace
(while (search-forward-regexp "^*+ " nil t)
(replace-match "* "))
Rasmus
--
ツ
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-01 15:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-30 11:06 exporting "flattened" tagged subtrees Michel Damiens
2017-12-01 14:26 ` Rasmus
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).