From mboxrd@z Thu Jan 1 00:00:00 1970 From: Norman Walsh Subject: Error in org-element-parse-buffer? Date: Tue, 19 Feb 2019 08:10:27 -0600 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:43696) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gw66w-0000td-Ob for emacs-orgmode@gnu.org; Tue, 19 Feb 2019 09:11:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gw66v-00059x-5d for emacs-orgmode@gnu.org; Tue, 19 Feb 2019 09:11:02 -0500 Received: from outbound1g.eu.mailhop.org ([52.28.6.212]:48629) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gw66u-0004wL-JF for emacs-orgmode@gnu.org; Tue, 19 Feb 2019 09:11:00 -0500 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" To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, I=E2=80=99ve just noticed that org-element-parse-buffer loses whitespace sometimes. Consider this org-mode file: This is a *bold* word. What org-element-parse-buffer returns is: (org-data nil (section (:begin 1 :end 24 :contents-begin 1 :contents-en= d 24 :post-blank 0 :post-affiliated 1 :parent #0) (paragraph (:begin 1 :end = 24 :contents-begin 1 :contents-end 24 :post-blank 0 :post-affiliated 1 :pa= rent #1) #("This is a " 0 10 (:parent #2)) (bold (:begin 11 :end 18 :contents-begin 12 :contents-end 16 :post-blank 1 :parent #2) #("bold" 0 4 (:parent #3))) #("word." 0 6 (:parent #2))))) Note that the whitespace between =E2=80=9Cbold=E2=80=9D and =E2=80=9Cword.= =E2=80=9D has been lost. Well, possibly it=E2=80=99s recoverable from the various begin/end position= s, I can=E2=80=99t quite decide although (1) it doesn=E2=80=99t seem obviously= to be the case and (2) it=E2=80=99d be *way* more convenient if the space was in the data structure as text. I guess it=E2=80=99d have to be either a single spa= ce between them, or at the beginning of =E2=80=9C word.=E2=80=9D. Or do I misunderstand something about the data structure? Be seeing you, norm =2D-=20 Norman Walsh | The cure for boredom is curiousity. http://nwalsh.com/ | There is no cure for curiosity.--Ellen | Parr --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE1ury//rzuvqf7fN/hVWfHhJMAHkFAlxsDlMACgkQhVWfHhJM AHn4xhAAuhxxhcIomdPrR5C/f2uOLLV23Q0mQYPMQV42yL78Bjri0BJYRt88PiVi 9H2At3CCAZyLVSyGzmDlk6el37CieUzA0g/pK9zSUzxW3wRmBggUmbBtJ2AnLMDD jd+fFfR8+miMsWVyMnCRHrKUPG2zi7Wty1xuznCutrWgd7UsznznFgJ5WccGdyFg BsRMFp5YT4nYHgN5wPd1GTvduDTWLq1vnBc07ea9xQ1xxeFnGFr+SP2NOYgKreZ1 re3OVLIBLzYTGpY+4nUUprQ1+LDzVeskKgCWN+2Z/VQIRshWwuyBtlWZgwCDK/iN DjzKHx7S7090YO8cnp5Kch3YgkA9q9DxP+qCRSLsb4EVszygJaCxqD/Sn0eSTdut LvroDQtFJrt74V0cpsnFitAovjb5T7Zk+uI7UFy0ojncGykDWjpAv6tUqrtXJJYZ ZNpJKeYZVnvwcyIJ0FML3k/i7n6OG6VVfmbQLEfNd+hu3tLQBvYgNcAAfE1ksJ24 IRfH/ANaYv0CfEAOOsVMgThEURqWUeG3dYkK/7gAyHuMEs7omKS76KOKGziOrW0F fHqhmzmqrTqi/bhEnBrgSo/ogtRZzgbzcr2i/vki/PgEPxSNPAKrv5F14wqVekVG 5pEV/4w0YjWzek9cNG/zE3+dCC5W+6n8OdTsmoZ+243TTgnh88w= =5a7U -----END PGP SIGNATURE----- --=-=-=--