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 19:58:56 +0200 Message-ID: <874nrzdbq7.fsf@gnu.org> References: <87aa1sw78b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPHKq-0006nR-Py for emacs-orgmode@gnu.org; Tue, 01 May 2012 13:58:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPHKo-00039r-UX for emacs-orgmode@gnu.org; Tue, 01 May 2012 13:58:00 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:52734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPHKo-00039Q-LR for emacs-orgmode@gnu.org; Tue, 01 May 2012 13:57:58 -0400 Received: by werj55 with SMTP id j55so3367341wer.0 for ; Tue, 01 May 2012 10:57:56 -0700 (PDT) In-Reply-To: (Bill Wishon's message of "Tue, 1 May 2012 07:46:56 -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, Bill Wishon writes: > 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. Well, you can implement such checks within the same function :) We would need to rename `org-export-format-drawer-function' to suggest it can be a list of functions -- I don't want to go into this direction right now, I need to double-check what the new exporter (contrib/lisp/org-export.el) does wrt this. Nicolas, how the new exporter handle this? > 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. Yes, `org-export-format-drawer-function' supports only one function. -- Bastien