Add support for some #+OPTIONS toggles

see https://orgmode.org/manual/Export-settings.html
This commit is contained in:
Niklas Fasching 2018-12-26 16:58:16 +01:00
parent 5c51067b59
commit d036ddea4d
5 changed files with 120 additions and 9 deletions

45
org/testdata/options.html vendored Normal file
View file

@ -0,0 +1,45 @@
<h1 id="headline-1">
<code class="verbatim">#+OPTIONS:</code> toggles supported by <code class="verbatim">go-org</code>
</h1>
<p>
<code class="verbatim">go-org</code> supports multiple export toggles as described in the <a href="https://orgmode.org/manual/Export-settings.html">export settings</a> Org mode manual.
By default those toggles are enabled. This files starts with <code class="verbatim">#+OPTIONS:</code> (empty options) and thus
disables all settings.
That means, entities like <code class="verbatim">---</code> --- (mdash) will be left untouched, footnotes like <code class="verbatim">[fn:1]</code> will
not be exported and there won&#39;t be a table of contents at the top.
Also, the above headline will be exported without priority, todo status &amp; tags.
</p>
<table>
<thead>
<tr>
<th>key</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>f</td>
<td>Include footnotes (definitions &amp; links)</td>
</tr>
<tr>
<td>e</td>
<td>Include entities</td>
</tr>
<tr>
<td>toc</td>
<td>Include table of contents (outline)</td>
</tr>
<tr>
<td>pri</td>
<td>Include priority <code class="verbatim">[#A]</code>, <code class="verbatim">[#B]</code>, <code class="verbatim">[#C]</code> in headline title</td>
</tr>
<tr>
<td>todo</td>
<td>Include todo status in headline title</td>
</tr>
<tr>
<td>tags</td>
<td>Include tags in headline title</td>
</tr>
</tbody>
</table>

22
org/testdata/options.org vendored Normal file
View file

@ -0,0 +1,22 @@
#+OPTIONS:
* DONE [#A] =#+OPTIONS:= toggles supported by =go-org= :tag1:tag2:
=go-org= supports multiple export toggles as described in the [[https://orgmode.org/manual/Export-settings.html][export settings]] Org mode manual.
By default those toggles are enabled. This files starts with =#+OPTIONS:= (empty options) and thus
disables all settings.
That means, entities like =---= --- (mdash) will be left untouched, footnotes like =[fn:1]= [fn:1] will
not be exported and there won't be a table of contents at the top.
Also, the above headline will be exported without priority, todo status & tags.
| key | description |
|------+-----------------------------------------------------------|
| f | Include footnotes (definitions & links) |
| e | Include entities |
| toc | Include table of contents (outline) |
|------+-----------------------------------------------------------|
| pri | Include priority =[#A]=, =[#B]=, =[#C]= in headline title |
| todo | Include todo status in headline title |
| tags | Include tags in headline title |
[fn:1] This footnote definition won't be printed

22
org/testdata/options.pretty_org vendored Normal file
View file

@ -0,0 +1,22 @@
#+OPTIONS:
* DONE [#A] =#+OPTIONS:= toggles supported by =go-org= :tag1:tag2:
=go-org= supports multiple export toggles as described in the [[https://orgmode.org/manual/Export-settings.html][export settings]] Org mode manual.
By default those toggles are enabled. This files starts with =#+OPTIONS:= (empty options) and thus
disables all settings.
That means, entities like =---= --- (mdash) will be left untouched, footnotes like =[fn:1]= [fn:1] will
not be exported and there won't be a table of contents at the top.
Also, the above headline will be exported without priority, todo status & tags.
| key | description |
|------+-----------------------------------------------------------|
| f | Include footnotes (definitions & links) |
| e | Include entities |
| toc | Include table of contents (outline) |
|------+-----------------------------------------------------------|
| pri | Include priority =[#A]=, =[#B]=, =[#C]= in headline title |
| todo | Include todo status in headline title |
| tags | Include tags in headline title |
[fn:1] This footnote definition won't be printed