diff --git a/todo-mode.el b/todo-mode.el index ab0e649..da55fb4 100644 --- a/todo-mode.el +++ b/todo-mode.el @@ -1462,6 +1462,10 @@ the archive of the file moved to, creating it if it does not exist." (point-max))) (content (buffer-substring-no-properties beg end)) (counts (cdr (assoc cat todo-categories)))) + ;; Restore display of selected category, so internal file + ;; structure is not visible if user is prompted to choose a new + ;; category name in target file. + (todo-category-select) ;; Move the category to the new file. Also update or create ;; archive file if necessary. (with-current-buffer @@ -1524,6 +1528,7 @@ the archive of the file moved to, creating it if it does not exist." ;; last category, delete the file. Also handle archive file ;; if necessary. (let ((buffer-read-only nil)) + (widen) (remove-overlays beg end) (delete-region beg end) (goto-char (point-min))