From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Stephen J. Barr" Subject: Re: help with custom exporter Date: Sun, 31 May 2015 10:26:56 -0700 Message-ID: References: <87vbf962f8.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c1b572194b900517640439 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yz70n-0006pj-1j for emacs-orgmode@gnu.org; Sun, 31 May 2015 13:27:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yz70j-0007Gj-Q3 for emacs-orgmode@gnu.org; Sun, 31 May 2015 13:27:00 -0400 Received: from mail-lb0-f171.google.com ([209.85.217.171]:32935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yz70j-0007GI-FJ for emacs-orgmode@gnu.org; Sun, 31 May 2015 13:26:57 -0400 Received: by lbcue7 with SMTP id ue7so72381307lbc.0 for ; Sun, 31 May 2015 10:26:56 -0700 (PDT) In-Reply-To: <87vbf962f8.fsf@nicolasgoaziou.fr> 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" , emacs-orgmode@gnu.org --001a11c1b572194b900517640439 Content-Type: text/plain; charset=UTF-8 Thank you for the help. I think I can start hacking something together now that will do what I want it to do. Stephen J. Barr PhD Student, Operations Management Dept: Information Systems and Operations Management (ISOM) Michael G. Foster School of Business University of Washington Phone: 425 516 5012 Email: stevejb@uw.edu Twitter: @stevejb Website: http://steve.planetbarr.com On Sat, May 30, 2015 at 5:00 PM, Nicolas Goaziou wrote: > 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 > --001a11c1b572194b900517640439 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thank you for the help. I think I can start hacking someth= ing together now that will do what I want it to do.



Stephen J. Barr
PhD Student, Ope= rations Management
Dept:= Information Systems and Operations Management (ISOM)
Michael G. Foster School of Busine= ss
University of Washington
<= div>Phone: =C2=A0425 516 5012
Twitter: @stevejb
<= div>Website: http://steve.planetbarr.com


On Sat, May 30, 2015 at 5:00 PM, Nicolas Goa= ziou <mail@nicolasgoaziou.fr> wrote:
Hello,

"Stephen J. Barr" <stevejb@u= w.edu> writes:

> I am trying to modify ox-md.el. I do not know too much emacs lisp so p= lease
> bear with me.
>
> Hypothetically, if I want to modify the exporter to add a "THIS D= OCUMENT
> BY: " at the beginning, could I do:
>
> (defun org-md-template (contents info)
>=C2=A0 =C2=A0"Return complete document string after Markdown conve= rsion.
> CONTENTS is the transcoded contents string.=C2=A0 INFO is a plist used=
> as a communication channel."
>=C2=A0 =C2=A0(concat "THIS DOCUMENT BY: " (plist-get info :au= thor) "\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 st= ring
with, e.g., `org-export-data'.

Regards,

--
Nicolas Goaziou

--001a11c1b572194b900517640439--