Here is an updated patch, its split into 3 very small part, belowe is an explanaton of each: 1. First patch is my original patch to fix error with %e agenda format. 2. Second patch fixes what I beleive to be a logic bug. Most agenda related commands have the following format: (defun org-agenda-do-STUFF () (org-with-remote-undo buffer (with-current-buffer buffer ;; change the item (call-interactively 'org-do-STUFF) (setq newhead (org-get-heading))) ;; refresh agenda lines that have same marker (org-agenda-change-all-lines newhead hdmarker))) The problem is with (org-agenda-change-all-lines). It calls (org-format-agenda-item) on each item, but with the current buffer being the agenda buffer and not the original item's buffer. Also (org-format-agenda-item) expects the agenda item format to be in the variable org-prefix-format-compiled. But when called by (org-agenda-change-all-lines), that variable is not restored, and instead has stale value from the last block of the agenda. This causes the items to be randomly reformatted with last block's agenda format, when they are changed. My second patch fixes above problem, by making (org-agenda-change-all-lines) call (org-format-agenda-item) in the same way as when item was originally generated including changing to the item's buffer, and restoring the correct compiled format variable. 3. Third patch changes (org-agenda-set-effort) to refresh the item. It requires the 2nd patch to work.