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: Wed, 13 Jul 2011 20:02:33 +0900 Message-ID: <874o2qtpdi.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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Trace: dough.gmane.org 1310555615 5753 80.91.229.12 (13 Jul 2011 11:13:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2011 11:13:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: Tim Cross Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 13 13:13:31 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 1QgxNj-0007mA-Bi for ged-emacs-devel@m.gmane.org; Wed, 13 Jul 2011 13:13:31 +0200 Original-Received: from localhost ([::1]:33198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgxNh-0007iV-Gf for ged-emacs-devel@m.gmane.org; Wed, 13 Jul 2011 07:13:29 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgxDA-00053V-W0 for emacs-devel@gnu.org; Wed, 13 Jul 2011 07:02:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgxD8-00031Q-Fs for emacs-devel@gnu.org; Wed, 13 Jul 2011 07:02:36 -0400 Original-Received: from mgmt1.sk.tsukuba.ac.jp ([130.158.97.223]:49713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgxD7-0002x3-Ky for emacs-devel@gnu.org; Wed, 13 Jul 2011 07:02: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 1EF7B3FA051E; Wed, 13 Jul 2011 20:02:28 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id CCA521A275C; Wed, 13 Jul 2011 20:02:33 +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:141996 Archived-At: Tim Cross writes: > I *think* I agree, though am not clear what 'saving' means compared to > 'setting' within the context of the -Q switch I think it should mean an error, while the maintainers seem to be (and Lars clearly is) happy with a warning. Nobody *wants* silence. > OK, but that does not affect my point regarding the importance of -Q > representing a standard, well defined and consistent configuration. Right. I think there is consensus on that. My point is simply that in many cases, -Q will not be a useful environment. Lars proposes to make it somewhat more useful, at the cost of complexifying the behavior of custom-save-variable, and making pollution of the -Q environment a bit less painful. > Hmm. That wasn't my impression - at least not initially. What I > understood was that he wanted to modify how the save operation worked > under the -Q switch so that it only set the variable and did not warn > the user the value was not saved. Indeed, that was my impression too, as well as Drew Adams'. But Lars clarified that he just didn't bother to mention adding a warning, I guess because he wanted to focus on the major change from signaling an "unwritable" error to handling it within `custom-save-variable'. > However, my concern was whether having code actually change > variables from their default state under the -Q switch was a good > idea at all as it does change the fundamental meaning of -Q. I think there is a consensus that this should be avoided when possible and done very carefully when necessary. > whether we are better off leaving -Q to mean EVERYTHING at its > default state and doing something else, like having the custom > functions do something other than raise an error when code tries to > save custom values under -Q Of course that's what it means. So the problem is what do you do when what you need to do *requires* changing state? I think it's plausible that almost anything to do with mail will *require* changes to the -Q state before you get useful behavior. Note that saving custom values does not change the -Q environment. It's just that you're unlikely to bother saving in the virgin -Q environment (you can always reproduce that with -Q!), so an attempt to save pretty much implies you've already changed state in a significant way. > (maybe a warning they are not saved rather than an error) or > perhaps it already does the right thing and what the code is trying > to do is incorrect and needs refactoring. My position is that the code needs refactoring, because I don't like the idea of facilitating exceptions here, and I think that changing `custom-save-variable' will make doing customizations in the -Q environment more attractive. But that doesn't seem to be the position of the maintainers.