Suppose we have
*** Sample Task
:PROPERTIES:
:Tally: 42
:END:
Is there a way to quickly add a number to :Tally:
without having to compute the sum manually and changing the property by hand?
EDIT: I tried making an interactive region selecting function which replaces the first instance of :Tally: with the added value:
(defun tally-add (start end num)
(interactive "r\nn Number:")
(query-replace-regexp ":Tally:\ *\([0-9]+\)" "\,(format ":Tally: %d" (+ num \#1))" start end))
However, when running on a region I get "%d Symbol's value as a variable is void".