From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1 with LMTPS id wJ82Cp0gil69aAAAk0OIDg (envelope-from ) for ; Sun, 05 Apr 2020 18:17:01 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id sNERJpsgil7eWAAAB5/wlQ (envelope-from ) for ; Sun, 05 Apr 2020 18:16:59 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2B2A4943710 for ; Sun, 5 Apr 2020 17:00:01 +0000 (UTC) Received: from localhost ([::1]:50118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jL8cq-0000Cp-05 for larch@yhetil.org; Sun, 05 Apr 2020 13:00:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58080) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKIjT-0008H0-6o for emacs-orgmode@gnu.org; Fri, 03 Apr 2020 05:35:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jKIjR-00053U-RF for emacs-orgmode@gnu.org; Fri, 03 Apr 2020 05:35:22 -0400 Received: from love.tolo.nu ([79.99.1.16]:36846) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jKIjR-0002dS-Bj for emacs-orgmode@gnu.org; Fri, 03 Apr 2020 05:35:21 -0400 Received: from iris.tolo.nu (unknown [172.18.0.3]) by love.tolo.nu (Postfix) with ESMTP id E15A44021D86 for ; Fri, 3 Apr 2020 11:34:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=toloe.se; s=mail; t=1585906457; bh=M5fubShAhnU+3fahFXKXfQ/TcxL1j9viyj9DnUPhOqI=; h=From:To:Subject:Date:From; b=R6jfADgH6iKFNou+Y0dGsvrSkTeh1lQytQLf9GOh/uJnjB/E/Sfzjk5XrACaodDVu w5/1STKWRM0Pe7PwHv36+oFvE2QmbK0X0GQG7kTZpDOlCK/JQXAluk8JqWraEzmMg/ S/jBIfwQcTV5yEpNVEftBNo5AUkVC2cyOthG/pug= Received: by iris.tolo.nu (Postfix, from userid 1000) id 90C7A7A0038; Fri, 3 Apr 2020 11:34:17 +0200 (CEST) User-agent: mu4e 1.2.0; emacs 28.0.50 From: Johan =?utf-8?Q?Tol=C3=B6?= 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 Message-ID: <87imigzzdy.fsf@toloe.se> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 79.99.1.16 X-Mailman-Approved-At: Sun, 05 Apr 2020 12:59:25 -0400 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=default; t=1586106001; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=CbQ/YaY7a5EsQM5MyZSRk9Rocp5pI2GDYLWdxmCMF9M=; b=PIlhXCX9bUNpvfV8TJUwgt8D3awf7Vi1P/3pc0pAZrlJCu/XPXdYQK0dNnrca9IhCBbQ1v zCIGnwOdOmrrSLR3VHlcCMjVNbNrOttxX3h1u24FR4JwL5J9HrodUADHyRYXtLCjJiybxc bC6luSTn6AAmrn2niWKZzTPX95Ckfgs= ARC-Seal: i=1; s=default; d=yhetil.org; t=1586106001; a=rsa-sha256; cv=none; b=nEdgUd/x4/7uItX28+1cDU7xNh4LssJ4aFfC39iJLXIR4bQCiW93sQmREeCkjXrvcp2g9X 30SYgq+6KdLzUBkyEY36GjJqG5KtSb7EU1VmU3pNPLkF67IQON9xSsb0mLtPwpKLoOC3VD EuJBVBld4aiU5seCF66SZJMwyeZrwHs= ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=toloe.se header.s=mail header.b=R6jfADgH; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Scanner: scn0 X-Spam-Score: 1.99 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=toloe.se header.s=mail header.b=R6jfADgH; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Scan-Result: default: False [1.99 / 13.00]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.33), country: US(-0.01), ip: 209.51.188.17(-0.59)]; TO_DN_NONE(0.00)[]; ARC_SIGNED(0.00)[i=1]; R_DKIM_REJECT(1.00)[toloe.se:s=mail]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; DKIM_TRACE(0.00)[toloe.se:-]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; DATE_IN_PAST(1.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[johan@toloe.se,emacs-orgmode-bounces@gnu.org]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[emacs-orgmode@gnu.org]; DMARC_NA(0.00)[toloe.se]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; SUBJECT_ENDS_QUESTION(1.00)[]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: a3Q/TDGs8GcK 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