From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: help with custom exporter Date: Sun, 31 May 2015 02:00:59 +0200 Message-ID: <87vbf962f8.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yyqf6-0004Yh-VH for emacs-orgmode@gnu.org; Sat, 30 May 2015 19:59:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yyqf6-0000cf-5G for emacs-orgmode@gnu.org; Sat, 30 May 2015 19:59:32 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:54770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yyqf5-0000cW-Ve for emacs-orgmode@gnu.org; Sat, 30 May 2015 19:59:32 -0400 In-Reply-To: (Stephen J. Barr's message of "Sat, 30 May 2015 16:49:44 -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: "Stephen J. Barr" Cc: emacs-orgmode@gnu.org Hello, "Stephen J. Barr" writes: > I am trying to modify ox-md.el. I do not know too much emacs lisp so please > bear with me. > > Hypothetically, if I want to modify the exporter to add a "THIS DOCUMENT > BY: " at the beginning, could I do: > > (defun org-md-template (contents info) > "Return complete document string after Markdown conversion. > CONTENTS is the transcoded contents string. INFO is a plist used > as a communication channel." > (concat "THIS DOCUMENT BY: " (plist-get info :author) "\n" contents) > ) > > > However, I get an error: > > org-md-template: Wrong type argument: characterp, #("Stephen > > What is the output type of plist-get? Not a string? :author contains a secondary string. You need to turn it into the string with, e.g., `org-export-data'. Regards, -- Nicolas Goaziou