From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: org-elements-parse-buffer and weird property drawers Date: Sat, 30 Aug 2014 21:46:04 +0200 Message-ID: <877g1p7ocj.fsf@gmail.com> References: <87r3zxzwgz.fsf@ithaka.home> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNof6-0003mx-EJ for emacs-orgmode@gnu.org; Sat, 30 Aug 2014 15:50:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNoez-0000xg-OW for emacs-orgmode@gnu.org; Sat, 30 Aug 2014 15:50:12 -0400 Received: from plane.gmane.org ([80.91.229.3]:60827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNoez-0000wN-IL for emacs-orgmode@gnu.org; Sat, 30 Aug 2014 15:50:05 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XNoey-0002Gt-EH for emacs-orgmode@gnu.org; Sat, 30 Aug 2014 21:50:04 +0200 Received: from e178062046.adsl.alicedsl.de ([85.178.62.46]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 30 Aug 2014 21:50:04 +0200 Received: from tjolitz by e178062046.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 30 Aug 2014 21:50:04 +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 Eike writes: > Hello all, > > I'm playing with the functions in org-elements.el and the following > effect seems strange to me: > > I have a few propery drawers with empty propertys, like > > #+BEGIN_EXAMPLE > :PROPERTIES: > :date: [2014-08-29 Fr] > :chf: 21.76 > :eur: > :END: > #+END_EXAMPLE > > If I do org-elements-parse-buffer, the empty one is not there, but the > first one is duplicated. At least, there are two node-property > elements in the tree like that: > > #+BEGIN_EXAMPLE > (node-property (:key "chf" :value "21.76" :begin 38 :end 58 :post-blank 0 :post-affiliated 38 :parent #4)) > (node-property (:key "chf" :value "21.76" :begin 58 :end 67 :post-blank 0 :post-affiliated 58 :parent #4)) > #+END_EXAMPLE Indeed, I get ,---- | (property-drawer (:begin 24 :end 78 :contents-begin 40 :contents-end 69 | :post-blank 0 :post-affiliated 24 :parent #3) (node-property (:key "chf" | :value "21.76" :begin 40 :end 60 :post-blank 0 :parent #4)) | (node-property (:key "chf" :value "21.76" :begin 60 :end 69 :post-blank | 0 :parent #4))) `---- too when parsing this ,---- | * ORG SCRATCH | ** Pizza | :PROPERTIES: | :chf: 21.76 | :eur: | :END: `---- looks like a bug to me. -- cheers, Thorsten