emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* how to use :options-alist in org-export-define-derived-backend ?
@ 2014-06-02 20:55 Nicolas Richard
  2014-06-03 16:28 ` Bastien
  2014-06-03 16:37 ` Nicolas Goaziou
  0 siblings, 2 replies; 17+ messages in thread
From: Nicolas Richard @ 2014-06-02 20:55 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I'm trying to play with the exporter but I'd like my back-end to have no
toc by default. I tried

(org-export-define-derived-backend 'mytest 'html
  :translate-alist
  ;; don't use the template, concentrate on the toc.
  (list (cons 'template (lambda (a _) a))) 
  :options-alist
  '((:with-toc nil "toc" nil)))

IIUC, the last "nil" up there should be the default value for :with-toc.
Unfortunately, exporting like this:

(with-temp-buffer
  (insert "* foo\n** bar\nsome content")
  (org-export-to-buffer 'mytest "*test*")
  (pop-to-buffer "*test*"))

will show a table of contents. Setting org-export-with-toc to nil works
as expected though :

(let ((org-export-with-toc))
  (with-temp-buffer
    (insert "* foo\n** bar\nsome content")
    (org-export-to-buffer 'mytest "*test*")
    (pop-to-buffer "*test*")))

What am I doing wrong ?

Thanks

-- 
Nico.

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

end of thread, other threads:[~2014-08-02 19:21 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-02 20:55 how to use :options-alist in org-export-define-derived-backend ? Nicolas Richard
2014-06-03 16:28 ` Bastien
2014-06-03 20:16   ` Nicolas Goaziou
2014-06-13 10:52     ` Bastien
2014-06-14  7:11       ` Nicolas Goaziou
2014-06-15 20:47         ` Nicolas Goaziou
2014-06-15 20:54           ` Bastien
2014-06-16  6:05             ` Nicolas Goaziou
2014-07-28  8:53         ` Bastien
2014-07-28 19:30           ` Nicolas Goaziou
2014-07-29 13:07             ` Bastien
2014-07-29 14:08               ` Rasmus
2014-07-29 14:16               ` Nicolas Richard
2014-07-29 14:17               ` Nicolas Goaziou
2014-07-29 14:25                 ` Bastien
2014-08-02 19:21                   ` Nicolas Goaziou
2014-06-03 16:37 ` Nicolas Goaziou

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).