emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to export drawer?


From: Nicolas Goaziou
Subject: Re: [O] How to export drawer?
Date: Fri, 04 Apr 2014 21:10:41 +0200

Hello,

Marcin Antczak <address@hidden> writes:

> I would like to export some org to html with custom backend based on
> 'html.
>
> What I need is to override function org-html-headline from ox-html.el

OK. But this isn't related to drawers, is it? If you want to alter
drawers export, you need to override `org-html-drawer' too.

> I just want to export drawer with some specific name. For example
> LOGBOOK or CLOCKTABLE.

You can set `org-export-with-drawers'. You can also hard-code the list
into `org-mybackend-drawer':

  (defun org-mybackend-drawer (drawer contents info)
    (when (member-ignore-case (org-element-property :drawer-name drawer)
                              '("LOGBOOK" "CLOCKTABLE"))
      (org-export-data-with-backend drawer 'html info)))

Of course, you need to install this function in your custom back-end:

  (org-export-define-derived-backend 'mybackend 'html
    ...
    :translate-alist '(...
                       (drawer . org-mybackend-drawer)
                       ...)
    ...)


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]