From: Stephen Berman <stephen.berman@gmx.net>
To: 27121@debbugs.gnu.org
Subject: bug#27121: 26.0.50; Todo-mode buffer becomes current too soon
Date: Sun, 28 May 2017 22:40:26 +0200 [thread overview]
Message-ID: <871sr8r9z9.fsf@rosalinde> (raw)
[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]
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 <stephen.berman@gmx.net>
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: todo-quit patch --]
[-- Type: text/x-patch, Size: 905 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 247 bytes --]
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
next reply other threads:[~2017-05-28 20:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-28 20:40 Stephen Berman [this message]
2017-05-29 9:09 ` bug#27121: 26.0.50; Todo-mode buffer becomes current too soon Stephen Berman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871sr8r9z9.fsf@rosalinde \
--to=stephen.berman@gmx.net \
--cc=27121@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).