emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Johan Tolö" <johan@toloe.se>
To: emacs-orgmode@gnu.org
Subject: Why is `org-element-affiliated-keywords' a var when `org-element--affiliated-re' is a const?
Date: Fri, 03 Apr 2020 11:34:17 +0200	[thread overview]
Message-ID: <87imigzzdy.fsf@toloe.se> (raw)

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]]
[[file:a-figure.png]]

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 
`org-element-affiliated-keywords'.

Is this an oversight or am I trying to use this is a way that is 
not intended?

Johan

-- 
Johan


             reply	other threads:[~2020-04-05 18:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-03  9:34 Johan Tolö [this message]
2020-04-05 17:06 ` Why is `org-element-affiliated-keywords' a var when `org-element--affiliated-re' is a const? Nicolas Goaziou
2020-04-05 21:01   ` Johan Tolö

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=87imigzzdy.fsf@toloe.se \
    --to=johan@toloe.se \
    --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).