From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bill Wishon Subject: Re: [PATCH] fix hook calling in org-export-remove-or-extract-drawers Date: Tue, 1 May 2012 07:46:56 -0700 Message-ID: References: <87aa1sw78b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8f6433a0685ba404befaa44e Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPEM1-00067f-30 for emacs-orgmode@gnu.org; Tue, 01 May 2012 10:47:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPELy-0001Jw-3x for emacs-orgmode@gnu.org; Tue, 01 May 2012 10:47:00 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:62773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPELx-0001JW-VI for emacs-orgmode@gnu.org; Tue, 01 May 2012 10:46:58 -0400 Received: by obbwd18 with SMTP id wd18so3151725obb.0 for ; Tue, 01 May 2012 07:46:56 -0700 (PDT) In-Reply-To: <87aa1sw78b.fsf@gnu.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org --e89a8f6433a0685ba404befaa44e Content-Type: text/plain; charset=ISO-8859-1 Hi Bastien, I'll try to find a different mail client next time. On Tue, May 1, 2012 at 3:01 AM, Bastien wrote: > I don't really understand why `run-hook-with-args-until-success' is > needed here. Or `org-export-format-drawer-function' returns a string, > or it returns nil, in case we fall back on `org-export-format-drawer'. > My thought was that you could have multiple hooks in org-export-format-drawer-function and each one could be checking for things like "is this html export", "is the drawer name == PROPERTIES" and could decide to take action and return a string, or perhaps take no action, return nil, and let another hook have a shot at the drawer. The other thing with funcall here is that if you use add-hook to add your function to that hook it creates a list of functions, and when funcall is called on a list of functions instead of an individual function it is an error. Best, ~>Bill --e89a8f6433a0685ba404befaa44e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Bastien,

I'll try to find a different mail client next time.<= br>
On Tue, May 1, 2012 at 3:01 AM, Bastien <= span dir=3D"ltr"><bzg@g= nu.org> wrote:
I don't really understa= nd why `run-hook-with-args-until-success' is
needed here. =A0Or `org-export-format-drawer-function' returns a string= ,
or it returns nil, in case we fall back on `org-export-format-drawer'.<= /div>

My thought was that you could have multiple hoo= ks in org-export-format-drawer-function and each one could be checking for = things like "is this html export", "is the drawer name =3D= =3D PROPERTIES" and could decide to take action and return a string, o= r perhaps take no action, return nil, and let another hook have a shot at t= he drawer.=A0 The other thing with funcall here is that if you use add-hook= to add your function to that hook it creates a list of functions, and when= funcall is called on a list of functions instead of an individual function= it is an error.

Best,
~>Bill
--e89a8f6433a0685ba404befaa44e--