From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: [PATCH] fix hook calling in org-export-remove-or-extract-drawers Date: Tue, 01 May 2012 12:01:08 +0200 Message-ID: <87aa1sw78b.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SP9sR-0000L2-1x for emacs-orgmode@gnu.org; Tue, 01 May 2012 06:00:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SP9sP-0006v5-5Z for emacs-orgmode@gnu.org; Tue, 01 May 2012 06:00:10 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:39034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SP9sO-0006tV-SI for emacs-orgmode@gnu.org; Tue, 01 May 2012 06:00:09 -0400 Received: by wibhj13 with SMTP id hj13so2649891wib.12 for ; Tue, 01 May 2012 03:00:06 -0700 (PDT) In-Reply-To: (Bill Wishon's message of "Mon, 30 Apr 2012 18:20:54 -0700") 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: Bill Wishon Cc: emacs-orgmode@gnu.org Hi Bill, Thanks for the patch. Please don't attach patches using application/octet-stream, patchwork don't catch those -- see http://orgmode.org/worg/org-contribute.html#sec-4-3 Bill Wishon writes: > * lisp/org-exp.el (org-export-remove-or-extract-drawers): Changed > funcall to run-hook-with-args-until-success to properly run the > org-export-format-drawer-function hook. > > The problem was that funcall was being executed on the hook (list of > functions) instead of running the hook with > run-hook-with-args-until-success, which tries to run potentially a > list of hooks until one returns non-nil. 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'. Maybe I miss something? -- Bastien