From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Olum Newsgroups: gmane.emacs.devel Subject: sent mail buffers not thoroughly buried Date: Mon, 06 Jan 2014 19:39:58 -0500 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389055213 24760 80.91.229.3 (7 Jan 2014 00:40:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jan 2014 00:40:13 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 07 01:40:19 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W0KiQ-0003b6-Cb for ged-emacs-devel@m.gmane.org; Tue, 07 Jan 2014 01:40:18 +0100 Original-Received: from localhost ([::1]:38248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0KiP-0005Mh-Tx for ged-emacs-devel@m.gmane.org; Mon, 06 Jan 2014 19:40:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0KiI-0005MY-1V for emacs-devel@gnu.org; Mon, 06 Jan 2014 19:40:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0KiC-0003Jq-2H for emacs-devel@gnu.org; Mon, 06 Jan 2014 19:40:09 -0500 Original-Received: from cosmos.phy.tufts.edu ([130.64.83.16]:54945) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0KiB-0003A5-VB for emacs-devel@gnu.org; Mon, 06 Jan 2014 19:40:03 -0500 Original-Received: from kdo by cosmos.phy.tufts.edu ([local]:local) with local id 1W0Ki6-0005Fa-CV - Using Exim-4.80.1 (MandrivaLinux) MTA (return-path ); Mon, 06 Jan 2014 19:39:58 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 130.64.83.16 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:167557 Archived-At: After you have sent a message in message mode, sometimes the sent mail buffer gets reselected when it shouldn't. A specific sequence of events that causes the problem is this: Read mail in rmail. Push "m" or "r" so that you have one window with your inbox and one with your unsent mail. Change buffers in the window with the inbox. Send the mail that you're composing. Now you get your inbox back in the window in which you were composing the mail. Quit rmail. The window that used to have your inbox will now have your sent mail. The problem is in message-bury. If you don't do anything special, this function calls (with-current-buffer buffer (bury-buffer)), which not only buries the buffer but removes it from the window-prev-buffers list. But rmail sets message-return-action so that your inbox gets reselected when you're done sending the mail. In that case, message-bury calls (bury-buffer buffer), which does not remove the buffer from the window-prev-buffers list. Thus when you're done with your inbox, that window goes back to what it was viewing before, which is your sent mail. Is there any good reason for this behavior in message-bury? I propose to change it to always do (with-current-buffer buffer (bury-buffer)). Ken