1

When publishing it's possible to get a list of filetags for an org note by doing something like (org-export-data (plist-get info :filetags) info) in publish.el and loop over them to create markup. I use org-roam and was wondering if there is a way to do something similar with the +#roam_tags: property. Just switching :filetags for :roam_tags doesn't work - no error, it's just empty I think. Could anyone offer some advice on how I might approach this?

FYI I asked this question on the org-mode sub reddit as well but posting here as well.

0

After experimenting with custom backends using org-export-define-derived-backend, I learned that we can define custom properties and reference their values in the way my question states. For example:

We can derive a backend from the existing one and provide customizations. In this case, we can define a custom property mapped to the export property.

(org-export-define-derived-backend 'my-custom-backend 'slimhtml
  :options-alist
  '((:roam_tags "ROAM_TAGS" nil nil split)))

Now, with my-custom-backend defined, invoking (plist-get info :roam_tags) returns a list of the #+roam_tags. Also, we can access the roam tags with (org-publish-find-property entry :roam_tags project 'my-custom-backend)

See https://orgmode.org/worg/dev/org-export-reference.html and http://doc.endlessparentheses.com/Var/org-export-options-alist.html for more details like the additional arguments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.