emacs-orgmode
[Top][All Lists]
Advanced

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

Re: keeping subtree heading on export


From: Ihor Radchenko
Subject: Re: keeping subtree heading on export
Date: Tue, 30 Apr 2024 12:10:28 +0000

Matt Price <moptop99@gmail.com> writes:

> The real problem I have is that, when exporting a subtree, I want to set
> org-md-toplevel-hlevel to "2" and add the title; when exporting a whole
> file, I want to set org-md-toplevel-hlevel to "1" and ignore the title.

You can examine :export-options value in the INFO plist.
The value is a list with up to 3 elements: 'subtree, 'visible-only, and
'body-only.

In your backend :filters-alist, you can define a :filter-options filter
that will set :md-toplevel-hlevel option as needed, before the export
starts.

The :filter-options filter is there to pre-process export options
programatically, just as you describe.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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