From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#27121: 26.0.50; Todo-mode buffer becomes current too soon Date: Sun, 28 May 2017 22:40:26 +0200 Message-ID: <871sr8r9z9.fsf@rosalinde> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1496004072 9423 195.159.176.226 (28 May 2017 20:41:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 28 May 2017 20:41:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: 27121@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 28 22:41:06 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dF4zq-0002I6-Cm for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 May 2017 22:41:06 +0200 Original-Received: from localhost ([::1]:45195 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dF4zv-0002TP-Rl for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 May 2017 16:41:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dF4zp-0002Sq-FI for bug-gnu-emacs@gnu.org; Sun, 28 May 2017 16:41:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dF4zm-00007x-B1 for bug-gnu-emacs@gnu.org; Sun, 28 May 2017 16:41:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39448) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dF4zm-00007t-0U for bug-gnu-emacs@gnu.org; Sun, 28 May 2017 16:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dF4zl-0001N2-Rp for bug-gnu-emacs@gnu.org; Sun, 28 May 2017 16:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 May 2017 20:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27121 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14960040445233 (code B ref -1); Sun, 28 May 2017 20:41:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 May 2017 20:40:44 +0000 Original-Received: from localhost ([127.0.0.1]:42125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dF4zT-0001ML-IP for submit@debbugs.gnu.org; Sun, 28 May 2017 16:40:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dF4zR-0001M7-5b for submit@debbugs.gnu.org; Sun, 28 May 2017 16:40:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dF4zL-00005z-4S for submit@debbugs.gnu.org; Sun, 28 May 2017 16:40:36 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:41707) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dF4zL-00005t-0d for submit@debbugs.gnu.org; Sun, 28 May 2017 16:40:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dF4zJ-0002S6-Nx for bug-gnu-emacs@gnu.org; Sun, 28 May 2017 16:40:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dF4zG-00005H-K2 for bug-gnu-emacs@gnu.org; Sun, 28 May 2017 16:40:33 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:50544) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dF4zG-000057-8m for bug-gnu-emacs@gnu.org; Sun, 28 May 2017 16:40:30 -0400 Original-Received: from rosalinde ([83.135.4.33]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MIQlv-1dD9yW3kMR-0048OR for ; Sun, 28 May 2017 22:40:28 +0200 X-Provags-ID: V03:K0:qwAEBWix0KDwHv0KH/MlSVNTdN5LAdxBUichtz9H7Ey7rSjEQbT PARdbr29q00DrL8znFHjyvdLoae/XsA4cxlI005He8XWqgI/YAHLnhcX1TfQ8qVHWSuNEyc TZCY6t1v4mMLmf6oRQJjdxWfdlnSRMjbeNTmYlG6gtnWHfRrTuGb82F5neszVTbljrcZ6WI vWUGzjyx+x4r2XMmW6E6w== X-UI-Out-Filterresults: notjunk:1;V01:K0:X+9XDt38/h8=:YhSwPtuOfoG/AiXUyh08QE HoSshehY8E9SdbCkaZUUcZ6Mm/zD8joL0YOkO+XkfLa0/JLL4qD1Agk9CwWv3zRbz5oGXG30U MV+SykpfRAvM+dgOLsNLILGA+q8J6pX5fT/EGlRpu6eNLu6Lo1f/to0nou1NKjX2LSUk5l/Wz WLyH2Rm2/GGW4xz1X8voRkvdiw4+wsi1ullKRy9avU0oK3Zx9kSqjNBFdYaj/IVfPWHELr5+i PDg17168TPulkLXYfVMGiB4FmfVE+m/gdDldbmDVEJtw+I51N9XBlgi6FBsxg00o6sBCjKmjj Pe7LhBoPKdb8hlIyuOA9texMvJ70QM5pqpYh7411JMD2peTLFiEdL0MZsAI9a4SkmWe2JzZ+A y5A4E94DI3iHR5ogakbxmF4W41wQzkhA/6OpshjloJkMii0IWzgxmGAoGYCIxWVwZWb+IbV5V /fmIFy5un9N7aYmbGtfA3dmzhKxjjwBxzrdiPxiBbe38C/WX9rQYvPM52hiz60gREq1PYTbyB D/D0UsPEFmBCdegN0BKKtXeP08buht/8xKSqBXjJ3YnUOkQy8uXvIOiNRCeKdPdjwnldjLJd/ vBGfwwY+gI/523GD+bXDlI2z20dTXGKQZBbA80Ql8JsXr4aTGWjfjUEygBOU4d7wl1P7WQ9Zh m1Vn2OJSZwJLcEODQE6BggiXpF7gHrWrFTzRNkd8xsrVOS/HWvqYe8sCcViyic78y13fBnOV9 CdpuLojUYlafF3/UeZUkMvZR78U3LUBrpLCY1+H0lpsR/w+0abBW0g55ZGw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:132967 Archived-At: --=-=-= Content-Type: text/plain 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 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. --=-=-= Content-Type: text/x-patch Content-Disposition: inline Content-Description: todo-quit patch 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 --=-=-= Content-Type: text/plain 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 --=-=-=--