From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: modular block exportation was patch [Feature Addition] exporting comments on org files to html Date: Tue, 11 Nov 2008 18:03:18 -0800 Message-ID: <873ahxsntl.fsf@gmail.com> References: <87wsfihdjr.fsf@gmail.com> <9AF18490-D824-4083-90A0-F616E213DB89@uva.nl> <87wsfgccv6.fsf@gmail.com> <878wrvwe9f.fsf_-_@gmail.com> <026208AB-35E7-4D5B-8EFB-FCD2B31AFAB3@uva.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L054g-0006WH-3o for emacs-orgmode@gnu.org; Tue, 11 Nov 2008 21:03:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L054d-0006Ve-M0 for emacs-orgmode@gnu.org; Tue, 11 Nov 2008 21:03:16 -0500 Received: from [199.232.76.173] (port=33526 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L054d-0006Vb-GV for emacs-orgmode@gnu.org; Tue, 11 Nov 2008 21:03:15 -0500 Received: from rv-out-0708.google.com ([209.85.198.243]:12766) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L054d-0000jb-AY for emacs-orgmode@gnu.org; Tue, 11 Nov 2008 21:03:15 -0500 Received: by rv-out-0708.google.com with SMTP id k29so210696rvb.6 for ; Tue, 11 Nov 2008 18:03:13 -0800 (PST) In-Reply-To: <026208AB-35E7-4D5B-8EFB-FCD2B31AFAB3@uva.nl> (Carsten Dominik's message of "Mon, 10 Nov 2008 09:26:02 +0100") 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: Carsten Dominik Cc: Org-mode Carsten Dominik writes: > Hi Eric, > > I think this interesting functionality could at least initially > be implemented as a add-on, hooking into `org-export-preprocess-hook'. > This hook is called before Org looks at any of the blocks, so the hook > could remove blocks or format them and replace them with finished > HTML (in the case of HTML export....) in a BEGIN_HTML ... END_HTML > block. > Hi Carsten, Thanks for the pointer. I was able to implement generic block pre-processing on export using the `org-export-preprocess-hook' you mentioned. The resulting org-mode add-on is hosted at http://github.com/eschulte/org-contrib/tree/master/org-exp-blocks.el Currently it implements the comment processing I was after, and ditaa image creation. I think that it could also be used to implement the src-code, block-quote, and verse exportation currently implemented in org-exp.el. Thanks for the advice, I think this is much better than my initial comment exportation utility. -- Eric > > - Carsten > > > On Nov 7, 2008, at 8:02 PM, Eric Schulte wrote: > >> Hi, >> >> This has had me thinking about the exportation of blocks in general. >> I >> think it makes sense to pull block exportation out into it's own >> component both for simplicity and for ease of code-reading, hacking, >> and >> customization. >> >> with a set of blocks of forms like... >> >> #+begin_html >> >> #+begin_src >> >> #+begin_comment >> >> #+begin_example >> >> etc... >> >> We could have an alist in which we look up the type of the block, and >> call the appropriate function to handle exportation. Users could then >> add their own custom block export functions to this list. >> >> The optional exportation of these blocks could then be controlled by a >> single #+option variable which takes a list of blocks not to export. >> For example >> >> #+OPTION hidden_blocks:comment,src >> >> I'd be interested to hear anyone's thoughts on this. If it sounds >> like >> a good idea I'd be happy to take a stab at implementation. >> >> Cheers -- Eric