From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bill Wohler Newsgroups: gmane.emacs.devel Subject: Re: buffer-offer-save, gnus and mh-e Date: Mon, 09 Jan 2006 19:12:43 -0800 Organization: Newt Software Message-ID: <87y81og4ic.fsf@olgas.newt.com> References: <200504171500.j3HF0Ha22225@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1136862818 13064 80.91.229.2 (10 Jan 2006 03:13:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 10 Jan 2006 03:13:38 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 10 04:13:33 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ew9ws-0001pW-MN for ged-emacs-devel@m.gmane.org; Tue, 10 Jan 2006 04:13:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ew9yq-0006g6-40 for ged-emacs-devel@m.gmane.org; Mon, 09 Jan 2006 22:15:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ew9yX-0006cp-Gj for emacs-devel@gnu.org; Mon, 09 Jan 2006 22:15:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ew9yW-0006bU-8W for emacs-devel@gnu.org; Mon, 09 Jan 2006 22:15:08 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ew9yW-0006bP-48 for emacs-devel@gnu.org; Mon, 09 Jan 2006 22:15:08 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1EwA0t-0006SV-K3 for emacs-devel@gnu.org; Mon, 09 Jan 2006 22:17:36 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Ew9wQ-0001kE-8x for emacs-devel@gnu.org; Tue, 10 Jan 2006 04:12:59 +0100 Original-Received: from h-68-166-188-239.snvacaid.dynamic.covad.net ([68.166.188.239]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Jan 2006 04:12:58 +0100 Original-Received: from wohler by h-68-166-188-239.snvacaid.dynamic.covad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Jan 2006 04:12:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 72 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: h-68-166-188-239.snvacaid.dynamic.covad.net User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:U6YLd5Fuw8pbJ+jAD/GAQchFuVc= 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:48890 Archived-At: Luc, as I was going through MH-E bug reports, I came across the following: https://sourceforge.net/tracker/index.php?func=detail&aid=1184756&group_id=13357&atid=113357 Back in April, 2005, you wrote: Luc Teirlinck writes: > I plan to make buffer-offer-save a permanent local. This already has > Richard's approval. It means that it will, as a matter of principle, > no longer be appropriate for major modes to set buffer-offer-save, > regardless of whether doing so produces any concrete user visible bugs. > > Grepping shows that the only affected modes are mail-mode, > message-mode and mh-folder-mode, which set buffer-offer-save to t. > > The solution for that is to set buffer-offer-save to t in > `compose-mail' and no longer set it in the individual mail modes. I > checked that this works for mail-mode and message-mode. I could not > check it for mh-folder-mode, but I guess that it must work, since it > works through `compose-mail'. > > For mail-mode there is no problem. For message-mode and > mh-folder-mode, I was wondering. I know that the gnus directory is > automatically synched, but I do not know whether the version of gnus > included with CVS Emacs is also supposed to work with prior Emacs > versions or with XEmacs. For mh-e, I have no idea whatsoever how it > is supposed to be handled. > > If conditionals would be required, things might look somewhat strange, > because setting buffer-offer-save would still be harmless, even in > Emacs 22. The only problem is that major modes are not supposed to > touch permanent locals. After a bit of discussion, you concluded with: > Bill Wohler wrote: > > Just to be sure I'm understanding correctly, you'd like to see the > following code in mh-e.el:(mh-folder-mode), right? > > (if (or mh-xemacs-flag (< emacs-major-version 22)) > (setq buffer-offer-save t)) > > Please wait a little bit with this. After taking a closer look at the > code involved, I realized that things are more complex than I thought. > `compose-mail' is the wrong place to set `buffer-offer-save', since it > can easily be bypassed. I believe that the various return values of > (get mail-user-agent 'composefunc) should be handled separately. > > I do not know the various mail modes sufficiently to reliable take > care of this and the backward and XEmacs compatibility issues > complicate things and could make the involved code needlessly ugly. > > So I now believe that I will leave `buffer-offer-save' a non-permanent > local. (But maybe someone else could volunteer to do it and solve all > involved problems) > > It would be easier if one did not adhere as strictly to the principle > that major modes never should touch permanent locals. Then everything > that would be needed would be to add one single line in files.el. But > Richard told me that there were absolutely no exceptions to that rule. I see that buffer-offer-save in files.el is still not a permanent local. Is it going to remain that way for the foreseeable future? In other words, can I close my bug? ;-) -- Bill Wohler http://www.newt.com/wohler/ GnuPG ID:610BD9AD Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian! If you're passed on the right, you're in the wrong lane.