* Error in org-element-parse-buffer?
@ 2019-02-19 14:10 Norman Walsh
2019-02-19 15:43 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Norman Walsh @ 2019-02-19 14:10 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1418 bytes --]
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 <ndw@nwalsh.com> | The cure for boredom is curiousity.
http://nwalsh.com/ | There is no cure for curiosity.--Ellen
| Parr
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Error in org-element-parse-buffer?
2019-02-19 14:10 Error in org-element-parse-buffer? Norman Walsh
@ 2019-02-19 15:43 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2019-02-19 15:43 UTC (permalink / raw)
To: Norman Walsh; +Cc: emacs-orgmode
Hello,
Norman Walsh <ndw@nwalsh.com> writes:
> 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)))
^^^^^^^^^^^^^
it is here.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-19 15:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-19 14:10 Error in org-element-parse-buffer? Norman Walsh
2019-02-19 15:43 ` Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.