From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Possible to use src block to generate org headlines for export? Date: Wed, 23 Jul 2014 15:42:03 -0500 Message-ID: <87tx67x0x0.fsf@fastmail.fm> References: <87zjg1gddd.fsf@fastmail.fm> <87wqb4amqb.fsf@gmail.com> <8738dshkdw.fsf@fastmail.fm> <8761io2jnz.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XA3MZ-000667-Cq for emacs-orgmode@gnu.org; Wed, 23 Jul 2014 16:42:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XA3MT-0001kH-Aa for emacs-orgmode@gnu.org; Wed, 23 Jul 2014 16:42:11 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:36509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XA3MS-0001k9-Ug for emacs-orgmode@gnu.org; Wed, 23 Jul 2014 16:42:05 -0400 In-Reply-To: (Brett Viren's message of "Wed, 23 Jul 2014 15:53:22 -0400") 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: Brett Viren Cc: emacs-orgmode@gnu.org Brett Viren writes: > Matt Lundin writes: > >> Brett Viren writes: >>> >>> Maybe it would be more convenient to add the "meta-ness" you want as >>> part of a new exporter process? >> >> To change the "meta" wrappers for code block results, we would have to >> modify org babel (ob-core.el). > > Just to be clear (hopefully) I actually meant something different. I > was suggesting to *not* use org babel to produce your extra headlines. > Rather, have whatever logic produces them reside in some new exporter. > > I'm may be making incorrect guesses as to what you are actually going > for with these extra headlines. You mentioning this is for a blog made > me think they are some kind of "standard augmentation" for every blog > post or something. If not then I'm probably barking up the wrong tree. > But if so, putting them into an exporter seems apt. I am using org-babel (+ perl) to gather a page containing the content of the most recent posts. I also export this page to rss via ox-rss.el. I could simply use a perl script to generate the file during the export process, but a babel source block makes it convenient to modify the text before and after the dynamic content and to test modifications to the code. To generate dynamic content for just one page, babel works fine. However, if I wanted to update every page with such content, it would make *much* more sense (as you suggest) to create an exporter. > This is an approach I'm taking in a JSON+HTML exporter (analogous to > the latex+pdf one) that I'm working on. For example, I'd like to have > a "tag cloud" generated from tags on org headlines. This tag cloud > won't explicitly exist on the org side. Rather it will be implicitly > produced and updated by some (Python) code that runs as part of the > JSON->HTML stage of the exporter. That sounds interesting. I look forward to hearing more! Thanks for the clarification! Best, Matt