From: Nicolas Goaziou <firstname.lastname@example.org>
To: "Johan Tolö" <email@example.com>
Subject: Re: Why is `org-element-affiliated-keywords' a var when `org-element--affiliated-re' is a const?
Date: Sun, 05 Apr 2020 19:06:17 +0200 [thread overview]
Message-ID: <firstname.lastname@example.org> (raw)
In-Reply-To: <email@example.com> ("Johan =?utf-8?Q?Tol=C3=B6=22's?= message of "Fri, 03 Apr 2020 11:34:17 +0200")
Johan Tolö <firstname.lastname@example.org> writes:
> Dear all,
> I want to add my own org-element affiliated keyword "REF" in order
> to provide a reference to some other part of an org mode document
> (or another document) for a link.
> For example:
> #+NAME: a-figure
> #+REF: [[file:another_document.org]]
> I want to use `org-element-context' to get the link element and
> use `org-element-property' to get the `REF' property.
> I tried changing `org-element-affiliated-keywords' in order to
> define my own keyword. This is never picked up by
> `org-element-context' since it uses `org-element--affiliated-re'
> which is defined as a const and thus is never updated to reflect
> the change to `org-element-affiliated-keywords'. The help text for
> `org-element--affiliated-re' even mentions changing
> Is this an oversight or am I trying to use this is a way that is
> not intended?
Syntax is not meant to be changed by users. Also,
`org-element-affiliated-keywords' is a defconst.
You might abuse #+header: affiliated keyword to add a reference.
next prev parent reply other threads:[~2020-04-05 18:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 9:34 Why is `org-element-affiliated-keywords' a var when `org-element--affiliated-re' is a const? Johan Tolö
2020-04-05 17:06 ` Nicolas Goaziou [this message]
2020-04-05 21:01 ` Johan Tolö
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:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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
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).