emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: D <d.williams@posteo.net>
To: emacs-orgmode@gnu.org
Subject: Documentation: Side effects of org-entry-properties and others
Date: Tue, 18 Feb 2020 00:19:46 +0100	[thread overview]
Message-ID: <90aecaeb-c182-cc2e-9f31-4dc24db65af9@posteo.net> (raw)

Hi,

it seems a few functions meant to expose org internals to programmers
seem to cause undocumented side effects.  A particular example being
org-entry-properties.  When called, it changes the match-data.  This can
cause issues in cases where leaking match-data can cause font-lock to
behave inconsistently or throw errors.  I think it would be a good idea
to add a prominent warning to such interfacing functions, or document it
somewhere in the module.

The same is true for org-element-lineage, but I am not so sure whether
it is intended for hacking purposes as much as org-entry-properties.
Sadly, I have no overview over the scope of this issue, so I do not know
whether my suggestion is unrealistic (for example, because it would mean
adding warnings practically everywhere).

Regards,

D.

             reply	other threads:[~2020-02-17 23:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17 23:19 D [this message]
2020-02-18  0:08 ` Documentation: Side effects of org-entry-properties and others John Kitchin
2020-02-18  0:53 ` 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=90aecaeb-c182-cc2e-9f31-4dc24db65af9@posteo.net \
    --to=d.williams@posteo.net \
    --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).