weirdNox / org-noter

Emacs document annotator, using Org-mode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

custom property field for annotations

uliw opened this issue · comments

currently, a note will create a properties drawer like this:

:PROPERTIES:
:NOTER_PAGE: [[pdf:~/user/papers_to_read/wolf-gladrow-2007-total-alkal.pdf::8++0.00;;annot-8-5]]
:ID:       ../../../papers_to_read/wolf-gladrow-2007-total-alkal.pdf-annot-8-5
:END:

when used in conjunction with org-roam, this will automatically create an org-roam node.
adding:

:ROAM_EXCLUDE: t

will prevent this. However, is there a way to insert this into the property drawer as a default?

commented

Yes, org-noter-insert-heading-hook allows you to call a function every time a note heading is created by org-noter.

Put this in your .emacs file,

(defun my-exclude-heading-from-roam ()
  "Add ROAM_EXCLUDE property to a heading at point."
  (org-entry-put nil "ROAM_EXCLUDE" "t"))

(add-hook 'org-noter-insert-heading-hook 'my-exclude-heading-from-roam)

Much obliged!