emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [new-exporter] org-export-before-parsing-hook GOTCHA


From: Charles Berry
Subject: [O] [new-exporter] org-export-before-parsing-hook GOTCHA
Date: Fri, 15 Mar 2013 21:43:36 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Is this a feature or a bug?

in org-export-as, there are these lines

,----
| (goto-char (point-min))
| (run-hook-with-args 'org-export-before-parsing-hook backend)
`----

For some time, I used hook functions that usually reset the position 
of *point*. They worked fine.

Recently, they produced strange results in subtree exports - a later 
headline was used as the title even when :EXPORT_TITLE: was set. Other
properties like :EXPORT_FILE_NAME: seemed unaffected (OK).
 
I have put `save-excursion' in my code, and all seems to be well.

But I wonder if it is understood in defun'ing hooks that it is up to 
the coder to make sure that *point* gets put back where it needs to be.

Or should there be another (goto-char (point-min)) after the lines above.




reply via email to

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