From: Charles Berry <ccberry@ucsd.edu>
To: emacs-orgmode@gnu.org
Subject: [new-exporter] org-export-before-parsing-hook GOTCHA
Date: Fri, 15 Mar 2013 21:43:36 +0000 (UTC) [thread overview]
Message-ID: <loom.20130315T223032-590@post.gmane.org> (raw)
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.
next reply other threads:[~2013-03-15 21:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 21:43 Charles Berry [this message]
2013-03-19 17:09 ` [new-exporter] org-export-before-parsing-hook GOTCHA Bastien
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=loom.20130315T223032-590@post.gmane.org \
--to=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
/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).