Hello,
Rasmus <[email protected]> writes:
> I want to change the subject inference in ox-koma-letter to only happen on
> top-level headlines.
>
> Thus, in the following example the opening would be "opening" and not "h1"
> as it is currently.
>
> * opening
> ** h1
>
> Typically, "h1" is just there to help me organize the letter.
>
> Any objections?
This is a bug indeed.
However, I don't think :opening setting belongs to
`org-koma-letter-headline', as it means it is potentially set each time
a headline is being processed.
The (when ...) could be moved within `org-koma-letter-template', where
"\opening{...}" is filled and the first headline without a special tag
in the parse tree could be used (assuming there's no special
keyword...). That headline can be found using `org-element-map'.
Another (smallish) advantage is that the following case would be
allowed:
***** Dear myself,
* Part 1
WDYT?
Regards,
--
Nicolas Goaziou