Function: org-element--interpret-affiliated-keywords
org-element--interpret-affiliated-keywords is a byte-compiled function
defined in org-element.el.gz.
Signature
(org-element--interpret-affiliated-keywords ELEMENT)
Documentation
Return ELEMENT's affiliated keywords as Org syntax.
If there is no affiliated keyword, return the empty string.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-element.el.gz
(defun org-element--interpret-affiliated-keywords (element)
"Return ELEMENT's affiliated keywords as Org syntax.
If there is no affiliated keyword, return the empty string."
;; there are some elements that will never have affiliated keywords,
;; so do nothing for these
(if (member (org-element-type element)
org-element-elements-no-affiliated)
""
(let (acc)
;; List all ELEMENT's properties matching an attribute line or an
;; affiliated keyword, but ignore translated keywords since they
;; cannot belong to the property list.
(org-element-properties-mapc
(lambda (prop value)
(when value
(let* ((keyword (upcase (substring (symbol-name prop) 1)))
(attrp (string-prefix-p "ATTR_" keyword)))
(when (or attrp
(and
(member keyword org-element-affiliated-keywords)
(not (assoc keyword
org-element-keyword-translation-alist))))
(push (if (or attrp ; All attribute keywords can have multiple lines.
(member keyword org-element-multiple-keywords))
(mapconcat (lambda (line) (org-element--interpret-affiliated-keyword keyword line))
value "")
(org-element--interpret-affiliated-keyword keyword value))
acc)))))
element t)
(apply #'concat (nreverse acc)))))