emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* help with custom exporter
@ 2015-05-30 23:49 Stephen J. Barr
  2015-05-31  0:00 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen J. Barr @ 2015-05-30 23:49 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

Greetings,

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?

Thanks,
Stephen


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

[-- Attachment #2: Type: text/html, Size: 1790 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: help with custom exporter
  2015-05-30 23:49 help with custom exporter Stephen J. Barr
@ 2015-05-31  0:00 ` Nicolas Goaziou
  2015-05-31 17:26   ` Stephen J. Barr
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2015-05-31  0:00 UTC (permalink / raw)
  To: Stephen J. Barr; +Cc: emacs-orgmode

Hello,

"Stephen J. Barr" <stevejb@uw.edu> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: help with custom exporter
  2015-05-31  0:00 ` Nicolas Goaziou
@ 2015-05-31 17:26   ` Stephen J. Barr
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen J. Barr @ 2015-05-31 17:26 UTC (permalink / raw)
  To: Stephen J. Barr, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1359 bytes --]

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 <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> "Stephen J. Barr" <stevejb@uw.edu> 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
>

[-- Attachment #2: Type: text/html, Size: 2585 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-31 17:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-30 23:49 help with custom exporter Stephen J. Barr
2015-05-31  0:00 ` Nicolas Goaziou
2015-05-31 17:26   ` Stephen J. Barr

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).