[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [patch][ox-koma-letter] set opening via headline
From: |
Rasmus |
Subject: |
Re: [O] [patch][ox-koma-letter] set opening via headline |
Date: |
Sat, 17 Aug 2013 22:07:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Hi,
Nicolas Goaziou <address@hidden> writes:
>> With the following patch one can set the opening via a headline.
>> Currently, it's pretty conservative and will only set opening if it
>> isn't set already. I'm open to discussion on that point.
>
> Here are some comments about its internals.
Thanks! I appreciate the feedback. It should be fixed in the new
version. I'll post another patch that adhere to this everywhere in
the file.
>> (defcustom org-koma-letter-opening nil
>> - "Letter's opening, as a string."
>> + "Letter's opening, as a string. If (1) this value is nil; (2)
>
> Please start a new line after the first sentence.
>
>> +(defcustom org-koma-letter-headline-is-opening-maybe t
>> + "Whether a headline may be used as an opening. A headline is
>
> Ditto.
>
>> + (unless (or (plist-get info :opening)
>> + (not org-koma-letter-headline-is-opening-maybe))
>> + (plist-put info :opening (org-element-property :raw-value headline)))
>
> I suggest to use
>
> (org-export-data (org-element-property :title headline) info)
>
> instead, so you can correctly export Org syntax included in the
> headline, if any.
Good point.
See attached.
0001-Set-opening-via-headline.patch
Description: Text Data
--
Summon the Mothership!