1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-18 18:05:07 +00:00

Fixes: debbugs:20832

* lisp/calendar/todo-mode.el (todo-show): Don't visit todo file
in the minibuffer.
This commit is contained in:
Stephen Berman 2015-06-19 17:03:49 +02:00
parent b9f02cf65a
commit a5e6f33b4c

View File

@ -672,7 +672,7 @@ corresponding todo file, displaying the corresponding category."
todo-filtered-items-mode))))
(if (funcall todo-files-function)
(todo-read-file-name "Choose a todo file to visit: "
nil t)
nil t)
(user-error "There are no todo files")))
((and (eq major-mode 'todo-archive-mode)
;; Called noninteractively via todo-quit
@ -732,7 +732,10 @@ corresponding todo file, displaying the corresponding category."
(when (or (member file todo-visited)
(eq todo-show-first 'first))
(unless (todo-check-file file) (throw 'end nil))
(set-window-buffer (selected-window)
;; If todo-show is called from the minibuffer, don't visit
;; the todo file there.
(set-window-buffer (if (minibufferp) (minibuffer-selected-window)
(selected-window))
(set-buffer (find-file-noselect file 'nowarn)))
(if (equal (file-name-extension (buffer-file-name)) "toda")
(unless (derived-mode-p 'todo-archive-mode) (todo-archive-mode))