* [new-exporter] org-export-before-parsing-hook GOTCHA
@ 2013-03-15 21:43 Charles Berry
2013-03-19 17:09 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: Charles Berry @ 2013-03-15 21:43 UTC (permalink / raw)
To: emacs-orgmode
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-19 18:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-15 21:43 [new-exporter] org-export-before-parsing-hook GOTCHA Charles Berry
2013-03-19 17:09 ` Bastien
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).