From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasushi SHOJI Subject: New Exporter: plain list depth Date: Mon, 22 Apr 2013 06:19:58 +0900 Message-ID: <87d2tnwphd.wl@dns1.atmark-techno.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([208.118.235.92]:60793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UU1gH-0002aI-V1 for emacs-orgmode@gnu.org; Sun, 21 Apr 2013 17:20:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UU1gG-0000Zz-Jg for emacs-orgmode@gnu.org; Sun, 21 Apr 2013 17:20:17 -0400 Received: from plane.gmane.org ([80.91.229.3]:55496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UU1gG-0000Zl-Da for emacs-orgmode@gnu.org; Sun, 21 Apr 2013 17:20:16 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UU1gF-0008C1-0s for emacs-orgmode@gnu.org; Sun, 21 Apr 2013 23:20:15 +0200 Received: from p654785.hkidff01.ap.so-net.ne.jp ([121.101.71.133]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Apr 2013 23:20:15 +0200 Received: from yashi by p654785.hkidff01.ap.so-net.ne.jp with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Apr 2013 23:20:15 +0200 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: emacs-orgmode@gnu.org 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