From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: Composing letters using Org mode and the LaTeX isodoc class Date: Wed, 08 Sep 2010 10:09:33 +0530 Message-ID: <81lj7cyhkq.fsf@gmail.com> References: <87zkvtn5u7.fsf@mundaneum.com> <81wrqxv1bq.fsf@gmail.com> <87r5h5gwxo.fsf@mundaneum.com> <87iq2huk7u.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=36021 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtCRs-0001b8-RS for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 00:39:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtCRp-0005My-Ng for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 00:39:50 -0400 Received: from mail-px0-f169.google.com ([209.85.212.169]:43449) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtCRo-0005Mg-K5 for emacs-orgmode@gnu.org; Wed, 08 Sep 2010 00:39:49 -0400 Received: by pxi5 with SMTP id 5so3176133pxi.0 for ; Tue, 07 Sep 2010 21:39:47 -0700 (PDT) In-Reply-To: <87iq2huk7u.fsf@gmail.com> (Eric Schulte's message of "Tue, 07 Sep 2010 18:56:05 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: =?iso-8859-1?Q?S=E9bastien?= Vauban , emacs-orgmode@gnu.org Eric Thanks for the changes. I believe I need not work (or for all practical purposes set aside) working on letter writing support. Jambu>>> Btw, your approach set me thinking. I think there is a strong Jambu>>> case for making headlines act as babel srcnames with their body Jambu>>> providing content for noweb expansion [3]. This behaviour could Jambu>>> be controlled by a buffer local variable. Is this suggestion considered and set aside or overlooked? Read on down below. Jambu>>> Wondering how babel treats srcnames? Can there be spaces? Is Jambu>>> upper and lower cases treated one and the same ... Eric> Spaces are now allowed, I'm honestly not sure that it will Eric> successfully distinguish between upper and lower cases in code Eric> block names (all of mine are lower-case) Good. Honoring spaces would be a pre-requisite if one were to allow org's headlines as implicit srcnames. Question on case-handling was intended not as a feature request but more on clarity of the behaviour. Eric> I've just implemented export of org code blocks to ascii, latex or html, Eric> so the following should now (if I understood) allow the tangling Eric> behavior you've described Eric> Eric> ** tangle org-mode block Eric> #+source: org-list Eric> #+begin_src org :results latex Eric> - one Eric> - two Eric> - three Eric> #+end_src Eric> Eric> #+begin_src emacs-lisp :tangle yes :noweb yes Eric> " Eric> <> Eric> " Eric> #+end_src Eric> Eric> tangles to Eric> Eric> Eric> " Eric> \begin{itemize} Eric> \item two Eric> \item three Eric> \end{itemize} Eric> Eric> Eric> " Eric> Eric> note that the () on the end of the code block name in the noweb syntax Eric> means to insert the results of evaluating the code block (in this case Eric> latex) rather than the body of the code block itself. If babel supports headlines as srcnames, without requiring additional begin/end directives one could just write, * org-list - one - two - three #+begin_src emacs-lisp :tangle yes :noweb yes " <> " #+end_src and achieve similar results. Based on my earlier efforts at letter-writing, I have the following observation. Letters have a To address and they could be pulled from bbdb. So one could say, * To [[a bbdb link]] #+begin_src emacs-lisp :tangle yes :noweb yes " <> " #+end_src The string custom could be a elisp form or a function pointer that takes the body of the headline as an argument and does the needful. Specifically in the above example, 'custom' handler would visit the bbdb record, fetch the address and return the formatted address (with line breaks etc etc) as the noweb expansion. [Custom handler would be implemented by the user himself] Any thoughts on how this could be achieved ... Jambunathan K.