From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#11242: 24.1.50; Switching to rmai view buffer Date: Mon, 16 Apr 2012 18:18:09 +0800 Message-ID: <87sjg4q8ta.fsf@gnu.org> References: <4F89C750.9010508@gmx.at> <83aa2e15sn.fsf@gnu.org> <4F8A8351.40808@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1334571553 15621 80.91.229.3 (16 Apr 2012 10:19:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Apr 2012 10:19:13 +0000 (UTC) Cc: 11242@debbugs.gnu.org To: rms@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 16 12:19:12 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1SJj1b-0005wv-6E for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Apr 2012 12:19:11 +0200 Original-Received: from localhost ([::1]:46099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJj1a-0005Ql-G7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Apr 2012 06:19:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJj1T-0005PT-5M for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 06:19:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJj1R-0000qg-Ep for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 06:19:02 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJj1R-0000qZ-C3 for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 06:19:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SJj1S-00010a-5L for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 06:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Apr 2012 10:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11242 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11242-submit@debbugs.gnu.org id=B11242.13345715103822 (code B ref 11242); Mon, 16 Apr 2012 10:19:02 +0000 Original-Received: (at 11242) by debbugs.gnu.org; 16 Apr 2012 10:18:30 +0000 Original-Received: from localhost ([127.0.0.1]:36413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJj0v-0000za-Ar for submit@debbugs.gnu.org; Mon, 16 Apr 2012 06:18:29 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:45395 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJj0t-0000zT-K8 for 11242@debbugs.gnu.org; Mon, 16 Apr 2012 06:18:28 -0400 Original-Received: from [155.69.18.17] (port=39500 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SJj0k-0007M3-1W; Mon, 16 Apr 2012 06:18:18 -0400 In-Reply-To: (Richard Stallman's message of "Sun, 15 Apr 2012 16:12:33 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:59110 Archived-At: Richard Stallman writes: > It's neither one. It's done by this code. > > ;; If there is an Rmail buffer, return to it nicely > ;; even if this message was not started by an Rmail command. > (unless return-action > (dolist (buffer (buffer-list)) > (if (eq (buffer-local-value 'major-mode buffer) 'rmail-mode) > (setq return-action `(rmail-mail-return ,newbuf))))) This code is wrong; the NEWBUF should not be passed to rmail-mail-return, it should be the BUFFER variable in the loop. I've committed a fix. BTW, having code in mail-bury to specially handle Rmail buffers is kinda ugly. This probably needs to be folded into the quit-window mechanism, somehow. In the first place, I'm not even sure it's appropriate to redirect the user to an Rmail buffer if the mail command was not started from Rmail.