From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Hook request and patch Date: Thu, 1 Jan 2009 10:04:58 +0100 Message-ID: <39E81FE5-01C6-4EC1-8377-BD243EE336B5@uva.nl> References: <5483.66.30.178.137.1230610952.squirrel@mail.panix.com> <45C5E5C5-76B5-40C8-B836-07E1E80C704F@uva.nl> <1036.66.30.178.137.1230749645.squirrel@mail.panix.com> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LIJUK-0003oH-F0 for emacs-orgmode@gnu.org; Thu, 01 Jan 2009 04:05:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LIJUJ-0003o5-Q4 for emacs-orgmode@gnu.org; Thu, 01 Jan 2009 04:05:08 -0500 Received: from [199.232.76.173] (port=37139 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LIJUJ-0003o2-MM for emacs-orgmode@gnu.org; Thu, 01 Jan 2009 04:05:07 -0500 Received: from mail-ew0-f13.google.com ([209.85.219.13]:50753) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LIJUJ-0006Pj-3E for emacs-orgmode@gnu.org; Thu, 01 Jan 2009 04:05:07 -0500 Received: by ewy6 with SMTP id 6so6640819ewy.18 for ; Thu, 01 Jan 2009 01:05:05 -0800 (PST) In-Reply-To: <1036.66.30.178.137.1230749645.squirrel@mail.panix.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Tom Breton (Tehom)" Cc: emacs-orgmode@gnu.org On Dec 31, 2008, at 7:54 PM, Tom Breton (Tehom) wrote: >> Hi Tom, >> >> is there a reason why you did not put the hook right after >> the include file moment? >> >> - Carsten > > Yes, two. But of course your judgement should take precedence. > > In order to make my change slightly less severe, I put it just before > operations of a similar nature, and it seemed to me that the various > "find > links" operations were most like it - but perhaps that reflects on the > particular purpose I was using it for. > > And it seemed to me that putting it after the various "protect" > operations > was better than putting it before them. Hi Tom, I had to change the name of the hook, "midprocess" does not do it justice. I'm not sure if you really want to do this after the protection stuff, because it will limit the processing of your include files. I have now added a few more hooks at strategic locations in the preprocessing code, please take your pick from the hooks I am listing below. If you do need the hook in the position where you put it, let me know and I will add another one. (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-preprocess-after-include-files-hook nil "Hook for preprocessing an export buffer. This is run after the contents of included files have been inserted.") (defvar org-export-preprocess-after-tree-selection-hook nil "Hook for preprocessing an export buffer. This is run after selection of trees to be exported has happened. This selection includes tags-based selection, as well as removal of commented and archived trees.") (defvar org-export-preprocess-before-backend-specifics-hook nil "Hook run before backend-specific functions are called during preprocessing.") (defvar org-export-preprocess-final-hook nil "Hook for preprocessing an export buffer. This is run as the last thing in the preprocessing buffer, just before returning the buffer string to the backend.") - Carsten