emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: ihor <ihor@antonovs.family>
To: emacs-orgmode@gnu.org
Subject: org-element discovered inconsistensies
Date: Mon, 3 Jun 2019 23:12:44 -0400	[thread overview]
Message-ID: <c7400c85-e4f4-0544-a780-c09d1f5b58f3@antonovs.family> (raw)
In-Reply-To: <87y32oip3s.fsf@alphaville.usersys.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 4155 bytes --]

So these are things that I have discovered so far:

     Property Drawer:
        - Element in 
https://orgmode.org/worg/dev/org-element-api.html#orgf47acc7
          It also states that it has :properties field which is simply 
not there in the code
https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-element.el#L1514
          My assumption in is that Property Drawer contains Node 
Properties directly, as children, instead of :properties filed

        - Greater Element in 
https://orgmode.org/worg/dev/org-syntax.html#Property_Drawers
        - Greater Element in source code 
https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-element.el#L233


      Node Property:
        - Element in 
https://orgmode.org/worg/dev/org-syntax.html#Node_Properties
        - Missing from https://orgmode.org/worg/dev/org-element-api.htm
        - Greater Element in source code 
https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-element.el#L226

      Line Break:
        - Object in https://orgmode.org/worg/dev/org-syntax.html#Line_Breaks
        - Element in https://orgmode.org/worg/dev/org-element-api.htm
        - Object in source code 
https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-element.el#L239

Secondly, function that collects affiliated keywords 
(|org-element--collect-affiliated-keywords) |

https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-element.el#L3988

does not take  granularity 
(https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-element.el#L4076) 
as argument

and parse objects any way:

https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-element.el#L4029

https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-element.el#L4036

Is there a reason behind this or is this a bug?


On 5/29/19 11:43 PM, Nick Dokos wrote:
> Ngor <ngortheone@gmail.com> writes:
>
>> Hi Org community.
>>
>> I am re-posting my questions here according to Nicolas' recommendation.
>>
>> I am working on a standalone parser implementation for Org which is basically a translation of elisp program to Rust
>> https://github.com/org-rs/org-rs
>>
>> There are couple of things I wanted to ask about:
>>
>> 1) I have discovered several inconsistencies and errors in the Syntax/API documentation
>> https://orgmode.org/worg/dev/org-element-api.html vs https://orgmode.org/worg/dev/org-syntax.html vs elisp source
>> And I don't know the right way to report them.
>>
>> 2) I think I have found a bug in the algorithm (org-element-collect affiliated keywords does not take granularity into accound and seems to be always parsing objects in Caption
>> keyword)
>>
>> 3) I have a question regarding the elisp source source (specifically about the :parent of the parsed objects of the keyword)
>>
>> I can elaborate on each point but I don't want to overwhelm everybody with details right from the start. I guess the meta-question is where and how
>> should I discuss these points? - I never used mailing lists before (If I did something incorrectly or do not follow the established rituals/traditions please do not judge me harshly.
>> )
>>
> No need for metaquestions: ask away.
>
> You might want to report related problems together, but if the
> connection is tenuous or non-existent, then separate posts to the
> mailing list will probably work better. Asking your question in a
> separate post is probably best, so it doesn't get lost in the forest
> of detail when reporting problems.
>
> If you suspect a bug, then use 'M-x org-submit-bug-report`: the bug
> report will end up here and will contain a lot of information about
> your set-up which might be helpful.
>
> Finally, be patient: do not expect answers (particularly when the
> questions are complicated, as it seems yours will be). It takes
> a while for people to get around to even reading the posts, let
> alone coming up with answers (or, as is likely, more quesions for
> you).
>
> And welcome to mailing lists in general and this mailing list in
> particular!
>

[-- Attachment #2: Type: text/html, Size: 7854 bytes --]

  reply	other threads:[~2019-06-04  3:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAKJNb8-mKR9kOTVHv6vA654GaVaA6HJUksCkrT+C4-V_D=GtNQ@mail.gmail.com>
     [not found] ` <CAKJNb8-8cdcQYFBLNgcrA=USh2LfvFYrdBOnfA+Cej4DU1BCaw@mail.gmail.com>
     [not found]   ` <CAKJNb88Rfz06jbM_BwRGpcufikzEoHuuG+xanK0q2KCEsp1juw@mail.gmail.com>
     [not found]     ` <87ef4l599r.fsf@nicolasgoaziou.fr>
2019-05-29 23:06       ` Fwd: Questions about org-element Ngor
2019-05-30  3:43         ` Nick Dokos
2019-06-04  3:12           ` ihor [this message]
2019-06-08 22:56             ` org-element discovered inconsistensies Nicolas Goaziou
2019-06-08 23:18               ` ihor
2019-06-10  9:15                 ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c7400c85-e4f4-0544-a780-c09d1f5b58f3@antonovs.family \
    --to=ihor@antonovs.family \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).