emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 a5e6f33 2/2: Fixes: debbugs:20832


From: Stephen Berman
Subject: [Emacs-diffs] emacs-24 a5e6f33 2/2: Fixes: debbugs:20832
Date: Fri, 19 Jun 2015 15:11:25 +0000

branch: emacs-24
commit a5e6f33b4c8222ad62fdd7ff4bb0f8c5fac432c1
Author: Stephen Berman <address@hidden>
Commit: Stephen Berman <address@hidden>

    Fixes: debbugs:20832
    
    * lisp/calendar/todo-mode.el (todo-show): Don't visit todo file
    in the minibuffer.
---
 lisp/calendar/todo-mode.el |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 6e97524..c869727 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]