aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Berman2015-06-19 17:03:49 +0200
committerStephen Berman2015-06-19 17:03:49 +0200
commita5e6f33b4c8222ad62fdd7ff4bb0f8c5fac432c1 (patch)
tree54c9da32a5676361c63a6df5f9092583b15bb35a
parentb9f02cf65a1b41e486f412e6f98644f298129d55 (diff)
downloademacs-a5e6f33b4c8222ad62fdd7ff4bb0f8c5fac432c1.tar.gz
emacs-a5e6f33b4c8222ad62fdd7ff4bb0f8c5fac432c1.zip
Fixes: debbugs:20832
* lisp/calendar/todo-mode.el (todo-show): Don't visit todo file in the minibuffer.
-rw-r--r--lisp/calendar/todo-mode.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 6e975249a3f..c869727f4c1 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -672,7 +672,7 @@ corresponding todo file, displaying the corresponding category."
672 todo-filtered-items-mode)))) 672 todo-filtered-items-mode))))
673 (if (funcall todo-files-function) 673 (if (funcall todo-files-function)
674 (todo-read-file-name "Choose a todo file to visit: " 674 (todo-read-file-name "Choose a todo file to visit: "
675 nil t) 675 nil t)
676 (user-error "There are no todo files"))) 676 (user-error "There are no todo files")))
677 ((and (eq major-mode 'todo-archive-mode) 677 ((and (eq major-mode 'todo-archive-mode)
678 ;; Called noninteractively via todo-quit 678 ;; Called noninteractively via todo-quit
@@ -732,7 +732,10 @@ corresponding todo file, displaying the corresponding category."
732 (when (or (member file todo-visited) 732 (when (or (member file todo-visited)
733 (eq todo-show-first 'first)) 733 (eq todo-show-first 'first))
734 (unless (todo-check-file file) (throw 'end nil)) 734 (unless (todo-check-file file) (throw 'end nil))
735 (set-window-buffer (selected-window) 735 ;; If todo-show is called from the minibuffer, don't visit
736 ;; the todo file there.
737 (set-window-buffer (if (minibufferp) (minibuffer-selected-window)
738 (selected-window))
736 (set-buffer (find-file-noselect file 'nowarn))) 739 (set-buffer (find-file-noselect file 'nowarn)))
737 (if (equal (file-name-extension (buffer-file-name)) "toda") 740 (if (equal (file-name-extension (buffer-file-name)) "toda")
738 (unless (derived-mode-p 'todo-archive-mode) (todo-archive-mode)) 741 (unless (derived-mode-p 'todo-archive-mode) (todo-archive-mode))