emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: tomas@tuxteam.de
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: Differentiating org element properties from built-ins?
Date: Mon, 23 Sep 2024 08:07:49 +0200	[thread overview]
Message-ID: <ZvEFtT+2FxDIfFD7@tuxteam.de> (raw)
In-Reply-To: <87cykvpq36.fsf@localhost>

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

On Sun, Sep 22, 2024 at 05:15:25PM +0000, Ihor Radchenko wrote:
> <tomas@tuxteam.de> writes:
> 
> > I do see foo and bar (well, OK, :FOO and :BAR) with their values, but lots
> > of other (let's call them "built-ins") like :begin and :post-affiliated.
> >
> > How do I keep those apart? Or do I have to resort to running regexps through
> > the buffer?
> 
>    (defun org-element-headline-parser (&optional _ raw-secondary-p)
>      "Parse a headline.
> 
>    Return a new syntax node of `headline' type containing `:raw-value',
>    `:title', `:begin', `:end', `:pre-blank', `:contents-begin' and
>    `:contents-end', `:level', `:priority', `:tags', `:todo-keyword',
>    `:todo-type', `:scheduled', `:deadline', `:closed', `:archivedp',
>    `:commentedp' `:footnote-section-p', `:post-blank' and
>    `:post-affiliated' properties.
> 
>    The plist also contains any property set in the property drawer,
>    with its name in upper cases and colons added at the
>    beginning (e.g., `:CUSTOM_ID').
> 
> So, properties from the property drawer are always upcased.

Thanks for that, Ihor

I ended up regexping my was through (which brought about some other
advantages with it; I'm using those props to communicate with other
things outside, and there, keeping the keys's cases is a nice-to-have).

Actually, the case treatment of property names is one of the most
acute pain points in Org for me, but this ship has sailed :-)

Cheers & thanks again for your help.
-- 
tomás

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

      reply	other threads:[~2024-09-23  6:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-17 14:22 Differentiating org element properties from built-ins? tomas
2024-09-22 17:15 ` Ihor Radchenko
2024-09-23  6:07   ` tomas [this message]

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=ZvEFtT+2FxDIfFD7@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /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).