From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: inconsistency in backend export functions? Date: Thu, 12 Dec 2013 17:44:14 +0100 Message-ID: <871u1ixbmp.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr9Mn-0002em-73 for emacs-orgmode@gnu.org; Thu, 12 Dec 2013 11:44:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vr9Mi-0003gA-7A for emacs-orgmode@gnu.org; Thu, 12 Dec 2013 11:44:00 -0500 Received: from mail-ee0-x22c.google.com ([2a00:1450:4013:c00::22c]:39381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr9Mi-0003g5-01 for emacs-orgmode@gnu.org; Thu, 12 Dec 2013 11:43:56 -0500 Received: by mail-ee0-f44.google.com with SMTP id b57so363288eek.17 for ; Thu, 12 Dec 2013 08:43:54 -0800 (PST) In-Reply-To: (John Kitchin's message of "Thu, 12 Dec 2013 09:27:54 -0500") 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: John Kitchin Cc: "emacs-orgmode@gnu.org" Hello, John Kitchin writes: > I was playing around with creating a new backend to convert an org-file to > a json representation, and I came across this apparent inconsistency in the > backend function signatures. > > at http://orgmode.org/worg/dev/org-export-reference.html it suggests the > backend transcoding functions should have this signature: > > (defun org-backend-xxx (element contents info) > code that converts element to a string) > > but, that does not work for a plain-text element. Even in ox-latex.el it is > defined with only two arguments, with no contents. > > (defun org-latex-plain-text (text info) > > My exporter works when I define it this way too, but it seemed like an odd > inconsistency to me. Am I missing something in the docs somewhere? This is documented in `org-export-define-backend' docstring. Regards, -- Nicolas Goaziou