emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: "Tom Breton (Tehom)" <tehom@panix.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Hook request and patch
Date: Wed, 31 Dec 2008 09:45:35 +0100	[thread overview]
Message-ID: <45C5E5C5-76B5-40C8-B836-07E1E80C704F@uva.nl> (raw)
In-Reply-To: <5483.66.30.178.137.1230610952.squirrel@mail.panix.com>

Hi Tom,

is there a reason why you did not put the hook right after
the include file moment?

- Carsten

On Dec 30, 2008, at 5:22 AM, Tom Breton (Tehom) wrote:

> Motivating incident: I was exporting some files and I wanted to
> process a file after I included it.  Using "#+INCLUDE" I could include
> it and I could tell it to use "BEGIN_XXX" "END_XXX" so my code could
> find it.
>
> But I couldn't process it, because org-export-preprocess-string calls
> `org-export-preprocess-hook' before it handles "#+INCLUDE".
>
> I didn't want to move org-export-preprocess-hook because for all I
> know there's a good reason it comes first.  Similarly for the timing
> of "#+INCLUDE".
>
> So I ask for a hook that is called after includes are handled.  Diffs
> appended.
>
> Another advantage: `org-update-all-dblocks' didn't seem to work in
> org-export-preprocess-hook because the working buffer isn't yet in
> org-mode when it's called, but works in the new hook.
>
> Tom Breton (Tehom)
>
> *** old-org-exp.el	2008-12-18 18:26:05.000000000 -0500
> --- org-exp.el	2008-12-29 23:10:46.000000000 -0500
> ***************
> *** 297,302 ****
> --- 297,305 ----
>  (defvar org-export-preprocess-hook nil
>    "Hook for preprocessing an export buffer.
>  Pretty much the first thing when exporting is running this hook.")
> + (defvar org-export-midprocess-hook nil
> +   "Hook for processing an export buffer after file inclusions.
> + Run after file inclusions and tree exclusions.")
>
>  (defgroup org-export-translation nil
>    "Options for translating special ascii sequences for the export
> backends."
> ***************
> *** 1522,1527 ****
> --- 1525,1532 ----
>        ;; Find matches for radio targets and turn them into internal  
> links
>        (org-export-mark-radio-links)
>
> +       (run-hooks 'org-export-midprocess-hook)
> +
>        ;; Find all links that contain a newline and put them into a
> single line
>        (org-export-concatenate-multiline-links)
>
>
>
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2008-12-31  8:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-30  4:22 Hook request and patch Tom Breton (Tehom)
2008-12-31  8:45 ` Carsten Dominik [this message]
2008-12-31 18:54   ` Tom Breton (Tehom)
2009-01-01  9:04     ` Carsten Dominik

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=45C5E5C5-76B5-40C8-B836-07E1E80C704F@uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=tehom@panix.com \
    /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).