From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: 3 bugs in Rmail Date: Mon, 10 Jan 2011 16:28:05 -0500 Message-ID: References: <8362twk3js.fsf@gnu.org> <871v4kzfvs.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1294694901 23914 80.91.229.12 (10 Jan 2011 21:28:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 10 Jan 2011 21:28:21 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 10 22:28:13 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PcPHh-0008Ek-LS for ged-emacs-devel@m.gmane.org; Mon, 10 Jan 2011 22:28:13 +0100 Original-Received: from localhost ([127.0.0.1]:53146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcPHh-0000nS-5l for ged-emacs-devel@m.gmane.org; Mon, 10 Jan 2011 16:28:13 -0500 Original-Received: from [140.186.70.92] (port=51127 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcPHc-0000nB-LA for emacs-devel@gnu.org; Mon, 10 Jan 2011 16:28:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcPHb-00026i-Nr for emacs-devel@gnu.org; Mon, 10 Jan 2011 16:28:08 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:19691 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcPHa-00026F-IT; Mon, 10 Jan 2011 16:28:06 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEADYIK01FxIbi/2dsb2JhbACkSnS7ToVMBIRnhS+IdQ X-IronPort-AV: E=Sophos;i="4.60,303,1291611600"; d="scan'208";a="87554361" Original-Received: from 69-196-134-226.dsl.teksavvy.com (HELO ceviche.home) ([69.196.134.226]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 10 Jan 2011 16:28:05 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 0AF84660DC; Mon, 10 Jan 2011 16:28:05 -0500 (EST) In-Reply-To: <871v4kzfvs.fsf@stupidchicken.com> (Chong Yidong's message of "Mon, 10 Jan 2011 15:02:31 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134419 Archived-At: >> http://lists.gnu.org/archive/html/help-gnu-emacs/2011-01/msg00315.html > In mail-mode, C-c C-c deletes the window and returns to the Rmail buffer > because of this specialized code in mail-bury: > (with-current-buffer > (window-buffer (next-window (selected-window) 'not)) > (setq rmail-flag (eq major-mode 'rmail-mode)) > ...) > (if rmail-flag > ;; If the Rmail buffer has a summary, show that. > (if summary-buffer (switch-to-buffer summary-buffer) > (delete-window)) > (switch-to-buffer newbuf)))))) > So, one solution is to add this to message-bury, or make message-bury an > alias for mail-bury. But this code doesn't seem terribly clean. Yes, it's pretty hackish and ugly. > A better alternative may be to specify a `mail-bury-function' variable, > let Rmail set that variable, and change both mail-mode and message-mode > to respect `mail-bury-function'. Anyone have any better ideas? Maybe rather than mail-bury-function, it could be a mail-callback-function, i.e. not meant explicitly for burying but more generally for returning to the caller. I guess the difference would be only in the name, tho. Stefan