emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Error in org-element-parse-buffer?


From: Norman Walsh
Subject: [O] Error in org-element-parse-buffer?
Date: Tue, 19 Feb 2019 08:10:27 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin)

Hi,

I’ve 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-end 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 :parent 
#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 “bold” and “word.” has been lost.
Well, possibly it’s recoverable from the various begin/end positions,
I can’t quite decide although (1) it doesn’t seem obviously to be the
case and (2) it’d be *way* more convenient if the space was in the
data structure as text. I guess it’d have to be either a single space
between them, or at the beginning of “ word.”.

Or do I misunderstand something about the data structure?

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <address@hidden> | The cure for boredom is curiousity.
http://nwalsh.com/            | There is no cure for curiosity.--Ellen
                              | Parr

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]