Nicolas Goaziou <m...@nicolasgoaziou.fr> writes:

>> I think something like SUBJECT in ox-koma-letter makes sense.
>
> It seems we are failing to communicate. 

Probably I'm just slower :)

> I have nothing against SUBJECT being parsed in "ox-koma-letter".
> However, `org-element-document-properties' are keywords expected to be
> parsed in _every_ export back-end. This is not for SUBJECT.

Yep.  That was why I asked if it was possible to add it on backend basis.
But the oe-parse-secondary-string is fin.  Now I know.


> I mean to use `parsed' at the BEHAVIOR position in
> `org-export-options-alist' entries. So, obviously, this is triggered per
> keyword.

I /think/ that is what I would like.  But I don't understand the what you
mean concretely: would you have something like:

     (:subject "SUBJECT" nil nil space parsed)

I don't understand how it could replace the behavior parameter.  Would it
be a cons?


> If you map over a parse tree, e.g., looking for bold objects, it is
> a bit tricky to tell `org-element-map' that SUBJECT is no longer
> a regular keyword but now possibly contains objects.
> 
> OTOH, we can consider that SUBJECT is still a regular keyword, and that
> the property the keyword sets (e.g., :koma-letter-subject) contains the
> objects.
>
> In this case, it is no longer ambiguous for `org-element-map' and al.,
> and `parsed' becomes an interesting shortcut.

I agree this is a difficult problem.  Personally, I think it is fine to
consider a keyword as a keyword and nothing more, and not consider content
within a keyword.  However, as I recall, John had a post a while back
about mapping over bold in CAPTIONS or something like that.

I think it may be a mess to interpret content of a keyword at
org-element-map level.  Consider if #+SUBJECT is interpreted with in
ox-koma-letter but not in an imaginary ox-new-letter.  Would it not be
confusing?

—Rasmus

-- 
Dung makes an excellent fertilizer


Reply via email to