[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] How to include comments on export? org-exp-blocks.el?
From: |
Nick Dokos |
Subject: |
Re: [O] How to include comments on export? org-exp-blocks.el? |
Date: |
Mon, 24 Oct 2011 18:52:32 -0400 |
Herbert Sitz <address@hidden> wrote:
> Herbert Sitz <hesitz <at> gmail.com> writes:
>
> >
> > Can someone give an example of how org-exp-blocks (or anything else) could
> > be
> > used to export comment blocks as graphic notes in the text?
> >
>
> Just to add a bit. I do have the following line in my .emacs:
>
> (require 'org-exp-blocks)
>
> and I have a comment like this in my document:
>
> --- sample text below ----------
> * Heading one
> text here
> #+begin_comment
> some comment text here
> #+end_comment
> * Heading two
> --- sample text above ----------
>
>
> When I export it the headings and text print out but the comment doesn't. I
> assume I need to do something more than have the 'require' for org-exp-blocks
> in
> my .emacs but I can't figure out what it is.
>
The only documentation there is seems to be in the file itself (and that is
not very complete). If you get it working, you might want to submit a patch
to improve the documentation.
Two hints from org-exp-blocks.el:
,----
| ;; This is a utility for pre-processing blocks in org files before
| ;; export using the `org-export-preprocess-hook'. It can be used for
`----
,----
| (defun org-export-blocks-preprocess ()
| "Export all blocks according to the `org-export-blocks' block export alist.
| Does not export block types specified in specified in BLOCKS
| which defaults to the value of `org-export-blocks-witheld'."
`----
So I tried
--8<---------------cut here---------------start------------->8---
(add-hook 'org-export-preprocess-hook (function org-export-blocks-preprocess))
--8<---------------cut here---------------end--------------->8---
and I get the comment in the HTML output.
Nick