I'm trying to make a function that will allow me to add properties to all entries in an org file that contain a particular tag ("drill"):
(defun add-to-chinese-anki ()
(interactive)
(org-entry-put (point) "ANKI_DECK" "Chinese Org Notes")
(org-entry-put (point) "ANKI_NOTE_TYPE" "chinese-org-drill")
(org-entry-put (point) "ANKI_TAGS" "languages")
)
(defun add-all-to-chinese-anki ()
(interactive)
(org-map-entries (lambda () (add-to-chinese-anki) "drill" 'file))
)
However the above code is adding the tags to every entry in the file, and not filtering by tag. Any help would be appreciated!