emacs-orgmode
[Top][All Lists]
Advanced

[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: Jambunathan K
Subject: Re: [O] How to include comments on export? org-exp-blocks.el?
Date: Tue, 25 Oct 2011 10:02:18 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (windows-nt)

>> I think the comment blocks are better handled as special blocks instead
>> of org-exp-blocks.

> That may very well be true.

If only -

,---- From org-export-preprocess-string
|       ;; Call the hook
|       (run-hooks 'org-export-preprocess-hook)
| 
|       ;; Remove comment environment and comment subtrees
|       (org-export-remove-comment-blocks-and-subtrees)
| 
|       ;; Blockquotes, verse, and center
|       (org-export-mark-blockquote-verse-center)
|       (run-hooks 'org-export-preprocess-after-blockquote-hook)
`----

Before it hits the blockquote hook the comment block gets removed. Now
there is a reason why the hook is hooking up to
org-export-preprocess-hook. 

While complaining of plethora of hooks, I was mainly complaining from
this standpoint. This example also illustrates my frustration as an
implementer well. Apart from other things, there is this - Oh! yet
another hook that I need to take care of and cater to in org-odt.el.

Also software behaviour is counter-intuitive. This prevents one from
 asserting a mental model with any confidence without diving in to the
 code.

>> ps: I think number of blocks and hooks in Org reflect number of people
>> that worked on it :-)
>> -- 
>> 
>
> Well, I don't mind a plethora of hooks: they enable things that wouldn't
> be possible otherwise (and they are even documented and easily findable
> because of uniform naming: either the M-x org--hook trick which works
> because of the uniform naming [fn:1] or the Worg (?)  page that Carsten
> pointed to some time ago[fn:2]).

org-exp.el is a sequential assembly line. If one rearranges logic in it
even a bit - with no regard to the hook boundaries for example - the
whole export process goes for a toss. And when you name a hook
afterblockquote hook you can't move it before the blockquote can you?

> As for org-exp-blocks, two out of the three areas of its application, as
> discussed in the commentary, are deprecated: only comment remains. But
> contrary to your (tongue-in-cheek) remark, Eric Schulte seems to be
> single-handedly responsible for all of the block stuff :-)

I do see some aspects of current day babel in the deprecated blocks.

May be Carsten and various users from the distant past had a hand in
various "standard but useful" hooks like verse, quote, center, comments
etc.

> Nick
>
> Footnotes:
>
> [fn:1] Note to future maintainers: don't ever name a hook anything other than
> org-foo-bar-hook or else :-)
>
> [fn:2] I prefer the first to the second because I can do it right in emacs: no
> need to go look up URLs and use inferior tools.
>
>

-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]