[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] New Exporter: plain list depth
From: |
Yasushi SHOJI |
Subject: |
[O] New Exporter: plain list depth |
Date: |
Mon, 22 Apr 2013 06:19:58 +0900 |
User-agent: |
Wanderlust/2.15.9 |
Hi,
What is the best way to know the depth of list entries when I writing
an exporter back-end?
let's say I have:
#+BEGIN_SRC org
* headline 1
- list 1
- list 2
- list 2.1
#+END_SRC
I'd like to convert it to:
#+BEGIN_EXAMPLE
* headline 1
- list 1
- list 2
-- list 2.1
#+END_EXAMPLE
To generate "--" at the list 2.1, I'd like to find out the list 2.1 is
at depth 2, so that I can use (make-string 2 ?-) for my bullet.
What I came up with instead was to
1) mark each item in item handler with "-"
2) add a "-" in each plain-list handler
3) remove one "-" from all list entries at final-function
it works, but it doesn't look good to me (tm).
I've checked a few exporters, including ox-html and ox-md but couldn't
find a function like org-export-get-relative-level for headline. Does
org-list-to-generic work in this situation?
Thanks,
--
yashi
- [O] New Exporter: plain list depth,
Yasushi SHOJI <=