emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#27121: closed (26.0.50; Todo-mode buffer becomes c


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#27121: closed (26.0.50; Todo-mode buffer becomes current too soon)
Date: Mon, 29 May 2017 09:10:01 +0000

Your message dated Mon, 29 May 2017 11:09:43 +0200
with message-id <address@hidden>
and subject line Re: bug#27121: 26.0.50; Todo-mode buffer becomes current too 
soon
has caused the debbugs.gnu.org bug report #27121,
regarding 26.0.50; Todo-mode buffer becomes current too soon
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
27121: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=27121
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 26.0.50; Todo-mode buffer becomes current too soon Date: Sun, 28 May 2017 22:40:26 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
If you're in todo-mode and you type `q' to exit it, and in the buffer
that is now current you invoke quit-window, then the todo-mode buffer
becomes current again.  But it was supposed to have been buried by `q',
so it should not immediately become current again.

This problem is due to a faulty use of bury-buffer in commit ea3ae33b
from 2013-05-16, and it's annoyed me ever since, but I didn't bother to
do anything about it till now.


2017-05-28  Stephen Berman  <address@hidden>

        Prevent buried todo-mode buffer from being current too soon

        This happened due to commit ea3ae33b from 2013-05-16, which
        prevented quitting todo-mode buffer after visiting
        todo-archive buffer from making the archive buffer current
        again.  Avoid this now by simply killing the archive buffer,
        since there's no need to keep it a live buffer.  Consequently,
        quitting a todo-mode buffer can now use bury-buffer without an
        argument, which ensures that is will not becomes current on
        quitting the next buffer.

        * lisp/calendar/todo-mode.el (todo-quit): Kill todo-archive-mode
        buffer instead of burying it.  This now allows exiting the
        todo-mode buffer with bury-buffer without an argument, so do that.


diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 5d4fcf8fcb..8155a4241a 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -820,14 +820,10 @@ todo-quit
               (message "There is no todo file for this archive")))
           ;; When todo-check-file runs in todo-show, it kills the
           ;; buffer if the archive file was deleted externally.
-          (when (buffer-live-p buf) (bury-buffer buf)))
+          (when (buffer-live-p buf) (kill-buffer buf)))
          ((eq major-mode 'todo-mode)
           (todo-save)
-          ;; If we just quit archive mode, just burying the buffer
-          ;; in todo-mode would return to archive.
-          (set-window-buffer (selected-window)
-                             (set-buffer (other-buffer)))
-          (bury-buffer buf)))))
+          (bury-buffer)))))
 
 ;; 
-----------------------------------------------------------------------------
 ;;; Navigation between and within categories

In GNU Emacs 26.0.50 (build 28, x86_64-pc-linux-gnu, GTK+ Version 3.22.8)
 of 2017-05-27 built on rosalinde
Repository revision: 527a7cc9425370f7217a4d2b6914b96dff6f5ec1
Windowing system distributor 'The X.Org Foundation', version 11.0.11901000

--- End Message ---
--- Begin Message --- Subject: Re: bug#27121: 26.0.50; Todo-mode buffer becomes current too soon Date: Mon, 29 May 2017 11:09:43 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
On Sun, 28 May 2017 22:40:26 +0200 Stephen Berman <address@hidden> wrote:

> If you're in todo-mode and you type `q' to exit it, and in the buffer
> that is now current you invoke quit-window, then the todo-mode buffer
> becomes current again.  But it was supposed to have been buried by `q',
> so it should not immediately become current again.
>
> This problem is due to a faulty use of bury-buffer in commit ea3ae33b
> from 2013-05-16, and it's annoyed me ever since, but I didn't bother to
> do anything about it till now.

Committed in d76c007.

Steve Berman


--- End Message ---

reply via email to

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