From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasushi SHOJI Subject: Re: New Exporter: plain list depth Date: Tue, 23 Apr 2013 21:25:55 +0900 Message-ID: <87sj2hv3fw.wl@dns1.atmark-techno.com> References: <87d2tnwphd.wl@dns1.atmark-techno.com> <87haizmt66.fsf@gmail.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]:37833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUcIb-0003VL-Kz for emacs-orgmode@gnu.org; Tue, 23 Apr 2013 08:26:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUcIZ-0004wC-Qu for emacs-orgmode@gnu.org; Tue, 23 Apr 2013 08:26:17 -0400 Received: from plane.gmane.org ([80.91.229.3]:38110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUcIZ-0004w4-JC for emacs-orgmode@gnu.org; Tue, 23 Apr 2013 08:26:15 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UUcIT-0007Cb-3Y for emacs-orgmode@gnu.org; Tue, 23 Apr 2013 14:26:09 +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 ; Tue, 23 Apr 2013 14:26:09 +0200 Received: from yashi by p654785.hkidff01.ap.so-net.ne.jp with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Apr 2013 14:26:09 +0200 In-Reply-To: <87haizmt66.fsf@gmail.com> 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, At Mon, 22 Apr 2013 00:10:25 +0200, Nicolas Goaziou wrote: > > Yasushi SHOJI writes: > > > 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. > > Something like the following should work, assuming ITEM is the item > element you have to transcode: > > #+begin_src emacs-lisp > (let ((parent item) (depth 0)) > (while (and (setq parent (org-export-get-parent parent)) > (case (org-element-type parent) > (item t) > (plain-list (incf depth))))) > depth) > #+end_src Thanks! will try based on your advice. > > Does org-list-to-generic work in this situation? > > As a good rule of thumb, it's best to rely on tools provided in ox.el. ok. regards, -- yashi