So, I have this function, which works just fine for me and does what I want it to:
(defun mwp-set-grade () (interactive) (save-excursion (while (re-search-forward "- Grade :: \\\(.*\\\)") (org-set-property "GRADE" (match-string 1)))) )
However, at some point it finds the last match, and then throws a message:
while: Search failed: "- Grade :: \\(.*\\)"
I figure there must be a way to exit gracefully while searching for something in a buffer. I bet the answer will also help me understand a little more about dealing with errors and failures in elisp, whihc I don't understand well.
Thanks as always...