From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Extending org-koma-letter.el (was: HowTo: Letter template method using yasnippet) Date: Fri, 27 Jul 2012 17:24:08 +0100 Message-ID: <87r4rxjhp3.fsf_-_@pank.eu> References: <8762a2l6f7.fsf@googlemail.com> <2012-07-06T20-54-34@devnull.Karl-Voit.at> <87zk7cplfv.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuqC0-0001hj-G7 for emacs-orgmode@gnu.org; Fri, 27 Jul 2012 15:27:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuqBz-0003hP-3W for emacs-orgmode@gnu.org; Fri, 27 Jul 2012 15:27:20 -0400 Received: from mailout-eu.gmx.com ([213.165.64.42]:47153) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SuqBy-0003Yu-Pk for emacs-orgmode@gnu.org; Fri, 27 Jul 2012 15:27:19 -0400 In-Reply-To: <87zk7cplfv.fsf@gmail.com> (Nicolas Goaziou's message of "Sat, 07 Jul 2012 00:35:32 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: n.goaziou@gmail.com Cc: emacs-orgmode@gnu.org Nicolas Goaziou writes: > Based on [Karl Voit's] work, I've put up the attached back-end: > org-koma-letter.el. Thanks. It's wonderful writing letters with the new latex exporter. You should consider adding it to org_contrib. > It's far from being complete. See it as a proof of concept. Feel free > to upgrade it. I need two further features to fully adopt org-koma-letter.el, but I am not sure how to proceed (I still haven't found too much [non-programmer] documentation on how to hack the new org-exporter). First, it should allow for contents after \closing{=C2=B7}, e.g. \ps{=C2=B7= } and \encl{=C2=B7}. Second, it should allow for arbitrary LaTeX command \end{letter}, e.g. \includepdf{=C2=B7}. Thus, I basically want to extend org-koma-letter-template to include to extra content-like elements. (defun org-koma-letter-template (contents info) ... ... (format "\n\\closing{%s}\n\n" (plist-get info :closing)) ;; appendix in letter appendix ;; Letter ends. "\\end{letter}\n" after-letter ;; Document ends. "\\end{document}" I am not sure how to implement this. I want it to operate on tags. So I want #+begin_src * my-encl :appendix: #+latex:\encl{ - doc 1 - doc 2 #+latex:} #+end_src to /not/ be part of contents, but be recognized as appendix inserted after the signature. Likewise headlines with tag :afterletter: should only be inserted after \end{letter}. Could anyone provide any hints as to how to archive this behavior. (I can't really understand all the details by just reading the API...). BTW: scrlttr2 supports sections with certain lco-files, see http://www.komascript.de/sections.lco. So perhaps the org-koma-letter-headline should contain this possibility. Thanks, Rasmus --=20 . . . Stallman was indeed the tallest possible mountain and by standing on his shoulders you could see forever. . .