emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: modular block exportation was patch [Feature Addition] exporting comments on org files to html
Date: Wed, 12 Nov 2008 07:50:26 +0100	[thread overview]
Message-ID: <C2448D52-C518-41D5-991C-89A1FC72028F@uva.nl> (raw)
In-Reply-To: <873ahxsntl.fsf@gmail.com>


On Nov 12, 2008, at 3:03 AM, Eric Schulte wrote:

> Carsten Dominik <dominik@science.uva.nl> 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.

Hi Eric,

since this hook is called early on, you are free to
implement your own processing of other blocks like
example or src as well - maybe in a customizable way, so
that users can opt how they want to do things, of if they
would like to use the formatting built into the Org core.

You might wat to think about the LaTeX side as
well - certainly the ditaa thing could be implemented
for the LaTeX backend - for the ASCII backend it would be
trivial :-)

Thanks for yet another great contribution.

- Carsten

>
>
> 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

      reply	other threads:[~2008-11-12  6:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-05  6:50 patch [Feature Addition] exporting comments on org files to html Eric Schulte
2008-11-06  7:05 ` Carsten Dominik
2008-11-07  5:40   ` Eric Schulte
2008-11-07 19:02     ` modular block exportation was " Eric Schulte
2008-11-10  8:26       ` Carsten Dominik
2008-11-10 15:49         ` Eric Schulte
2008-11-12  2:03         ` Eric Schulte
2008-11-12  6:50           ` Carsten Dominik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C2448D52-C518-41D5-991C-89A1FC72028F@uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulte.eric@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).