From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: Change `customize-save-variable' to work under "emacs -Q"? Date: Thu, 14 Jul 2011 11:13:25 +0900 Message-ID: <87zkkhsj7e.fsf@uwakimon.sk.tsukuba.ac.jp> References: <877h7ok9cd.fsf@stupidchicken.com> <87d3hgprjb.fsf@stupidchicken.com> <87r55wtget.fsf@uwakimon.sk.tsukuba.ac.jp> <87ipr8t9w9.fsf@uwakimon.sk.tsukuba.ac.jp> <87ei1vt40t.fsf@uwakimon.sk.tsukuba.ac.jp> <874o2qtpdi.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1310609643 32541 80.91.229.12 (14 Jul 2011 02:14:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 14 Jul 2011 02:14:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: Tim Cross Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 14 04:13:57 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QhBR6-0006iI-Db for ged-emacs-devel@m.gmane.org; Thu, 14 Jul 2011 04:13:56 +0200 Original-Received: from localhost ([::1]:55819 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhBR5-0003y5-CK for ged-emacs-devel@m.gmane.org; Wed, 13 Jul 2011 22:13:55 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:34235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhBQm-0003x8-Ib for emacs-devel@gnu.org; Wed, 13 Jul 2011 22:13:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QhBQk-0005Ba-Hp for emacs-devel@gnu.org; Wed, 13 Jul 2011 22:13:36 -0400 Original-Received: from mgmt1.sk.tsukuba.ac.jp ([130.158.97.223]:51769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhBQj-00055s-O7 for emacs-devel@gnu.org; Wed, 13 Jul 2011 22:13:34 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt1.sk.tsukuba.ac.jp (Postfix) with ESMTP id C047E3FA071E; Thu, 14 Jul 2011 11:13:19 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 84FCB1A275C; Thu, 14 Jul 2011 11:13:25 +0900 (JST) In-Reply-To: X-Mailer: VM 8.1.93a under 21.5 (beta31) "ginger" cd1f8c4e81cd XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.158.97.223 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:142018 Archived-At: Tim Cross writes: > On Wed, Jul 13, 2011 at 9:02 PM, Stephen J. Turnbull wrote: > > So the problem is what do you do when what you need to do > > *requires* changing state? =A0I think it's plausible that almost > > anything to do with mail will *require* changes to the -Q state > > before you get useful behavior. >=20 > Agree, but perhaps disagree on how those changes occur. I think you and I agree that having M-x sendmail prompt for values is implicit, but I'm pretty sure Lars would consider that to be an explicit change. > I guess your saying that saving and setting are different operations > and saving without setting would not affect the current environment? > What I'm not clear about is where you would save the values to. Well, in XEmacs it's not really a problem because by default customizations are saved to ~/.xemacs/custom.el, so I haven't really thought about it. A bit of reflection suggests that if the default is .emacs, this is a real hairball. However, neither of the options currently being advocated (status quo with an error before setting the variable vs. catch the error, set the variable, issue warning) actually does save so the point is moot, I think. That issue aside, IMO if a failure to save customizations in the -Q environment is a problem for some code, that code should handle it. In general, I want to discourage use of Customize in the -Q environment because Customize does way too much magic behind the scenes (a Customize setter can do *anything*). As soon as a recipe says "Customize variable X to Y," you're in a situation where you must analyze Customize as well as the main code. > changes have not been saved. To some extent, I would guess this is > primarily why you would argue for an error rather than a warning - > making it very clear to the user their save action has failed? No, my primary reason is the above. If the warning is obstrusive, the user won't miss it, and it's unlikely that much harm will be done even if they do. They just have to redo the customization in a session without -Q, and only if that is "hard" is there a real loss. > I personally think an error is better. However, I also don't fully > understand how often package maintainers run into problems > initializing their packages when they are run under -Q. Lars says it's not about the package maintainers, it's about the users. It's none of our business why the user is running a mail command in -Q environment, but we should make that as painless as possible. I agree, I just think that it's better to have the burden of handling errors occasioned by operating in the -Q environment placed on developers rather than done behind the scenes by Emacs. > Yes - I worry about it becoming easier to pollute the -Q environment > and whether this will reuslt in -Q becoming less useful over time. Exactly. > I guess we will have to wait and see what evolves. Sure. But although Lars may have long since killed this subthread, I suspect Stefan and/or Yidong lurked long enough to get the point. That doesn't mean they'll agree with us, of course. Until next time :-),