Does anyone have any idea how to force #emacs #org to extract all properties (including inherited) of a given header into a string?
Also, how to query to a given header based on id? :-)
I want an external process to call emacs and and get those properties in stdout / file in a given location.
=> More informations about this toot | More toots from mms@bsd.cafe
@mms
Get properties as a string (of JSON, in this case): (json-encode (org-entry-properties))
EDIT: apparently this doesn't honour inheritance. I tested with CATEGORY but it's special cased. Sorry for the noise!
I don't understand what you mean by "query a given header by id", but I assume (org-id-goto ID) could help?
=> More informations about this toot | More toots from carlozancanaro@aus.social
@mms Would that do?
(defun my/list-properties-inherit ()
(seq-filter
#'cdr
(mapcar
(lambda (p) (cons p (org-entry-get (point) p t)))
(org-buffer-property-keys))))
Unfortunately, org-entry-properties' doesn't respect
org-use-property-inheritance', but `org-entry-get' does if the third parameter is t.
As for querying a header, (org-find-property "ID" ) is an option (value is a string). But you'll probably need Adam Porter's `org-ql' for anything more advanced.
=> More informations about this toot | More toots from sqrtminusone@bsd.cafe This content has been proxied by September (ba2dc).Proxy Information
text/gemini