Hi Rasmus,

Thanks.  Your snippet doesn't work on these two examples.

Can't promote from level 1:

    * h1                                                           :noexport:
      no export
    * h2                                                      :ignore_heading:
      export
I've added a simple (when (> (outline-level) 1) (org-promote)) safety check to make sure indentation does not fail on level 1 headlines. 
"export" becomes part of the noexport heading.

    * h0
    ** h1                                                                  :noexport:
       no export
    ** h2                                                            :ignore_heading:
       export
I have no idea how to get around this. It stems from the basic problem in Org mode that there are no entry closures AFAIK: To export the "export" it would have to be under a heading that does not have the :noexport: tag.
This is actually one of the reasons why ignoreheading is used in many cases, to separate entries without creating a real headline.

If this is often needed feature, ox.el and potentially backends should be
patched to support it.  I think it would be great if ox did support it.
Of course, Nicolas would have the final say in such a matter.
I'm ok with that too, but it should be easily accessible so that people don't end up using broken snippets from the Internet.
Therefore, such exporting functionality (I think it's mostly backend agnostic) would have to be well documented in the manual.
But I'm not sure so difficult hacks should be promoted in the manual.
It would indeed be better if the user only enabled some option documented in the manual instead of using code snippets.
Improving the example is fine, though.
Many of your comments actually touch on the already present sentences and code, I mostly added just several words to those.
It's great with better documentation for how to use org-map-entries!  But
the example is not very robust.  I think another, less complicated example
would be better.
I think it's still reasonably simple and clear for an example. It shows many useful things.
With the when check it's a bit more robust, but it might get uglier if we try to somehow deal with the noexport stuff.

Kind regards,
Ondřej Grover