From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shiyuan Subject: How to show the complete syntax tree Date: Sun, 13 Jul 2014 21:27:53 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e013d0502efcba604fe1fb667 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6Xrn-0007Qo-Af for emacs-orgmode@gnu.org; Mon, 14 Jul 2014 00:27:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6Xrm-0002rY-8i for emacs-orgmode@gnu.org; Mon, 14 Jul 2014 00:27:55 -0400 Received: from mail-vc0-x22b.google.com ([2607:f8b0:400c:c03::22b]:35352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6Xrm-0002rR-4e for emacs-orgmode@gnu.org; Mon, 14 Jul 2014 00:27:54 -0400 Received: by mail-vc0-f171.google.com with SMTP id id10so6216505vcb.16 for ; Sun, 13 Jul 2014 21:27:53 -0700 (PDT) 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" --089e013d0502efcba604fe1fb667 Content-Type: text/plain; charset=UTF-8 Hi, The command I can find in the manual to show the syntax tree is (org-element-parse-buffer). However, when the structure is output to the buffer, by using the commands C-u M-: (org-element-parse-buffer), it seems that only the part up to a certain depth is printed. For example, if the current org buffer has the following content: #+TITLE: Hello World Hello World! * HEADLINE 1 ** Sub-topic + ItemA + ItemB - Item1 - Item2 *** Sub-Sub-topic \begin{equation} \label{eq:test} Bx=b \end{equation} When apply C-u M-: (org-element-parse-buffer), the sub-sub-topic level is completely omitted in the printout: (org-data nil (section (:begin 1 :end 35 :contents-begin 1 :contents-end 35 :post-blank 0 :parent #0) (keyword (:key "TITLE" :value "Hello World" :begin 1 :end 22 :post-blank 0 :post-affiliated 1 ...)) (paragraph (:begin 22 :end 35 :contents-begin 22 :contents-end 35 :post-blank 0 :post-affiliated 22 ...) #("Hello World! " 0 13 ...))) (headline (:raw-value "HEADLINE 1" :begin 35 :end 174 :pre-blank 0 :contents-begin 48 :contents-end 173 ...) (headline (:raw-value "Sub-topic" :begin 48 :end 173 :pre-blank 0 :contents-begin 62 :contents-end 173 ...) (section ... ...) (headline ... ...)))) What's the recommended way to show the syntax tree? Thanks. Shiyuan --089e013d0502efcba604fe1fb667 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,=C2=A0
=C2=A0 =C2=A0 The command I can find in the = manual to show the syntax tree is (org-element-parse-buffer). However, when= the structure is output to the buffer, by using the commands C-u M-: (org-= element-parse-buffer), it seems that only the part up to a certain depth is= printed.=C2=A0

For example, if the current org buffer has the followin= g content:=C2=A0

#+TITLE: Hello World
Hello World!
* HEADLINE 1
** Sub-topic=C2=A0
+ ItemA
+ ItemB
- Item1
- Item2
*** Sub-Sub-topi= c
\begin{equation}
=C2=A0 =C2=A0 \label{eq:test}
<= div>=C2=A0 =C2=A0 Bx=3Db
\end{equation}

When apply C-u M-: (org-element-parse-buffer), =C2=A0the sub-sub-topi= c level is completely omitted in the printout:=C2=A0

(org-data nil (section (:begin 1 :end 35 :contents= -begin 1 :contents-end 35 :post-blank 0 :parent #0) (keyword (:key "TI= TLE" :value "Hello World" :begin 1 :end 22 :post-blank 0 :po= st-affiliated 1 ...)) (paragraph (:begin 22 :end 35 :contents-begin 22 :con= tents-end 35 :post-blank 0 :post-affiliated 22 ...) #("Hello World!
" 0 13 ...))) (headline (:raw-value "HEADLINE 1" :begin= 35 :end 174 :pre-blank 0 :contents-begin 48 :contents-end 173 ...) (headli= ne (:raw-value "Sub-topic" :begin 48 :end 173 :pre-blank 0 :conte= nts-begin 62 :contents-end 173 ...) (section ... ...) (headline ... ...))))=

What's the recommended way to show the syntax= tree? Thanks.=C2=A0

Shiyuan=C2=A0

<= /div>
--089e013d0502efcba604fe1fb667--