From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.devel Subject: Re: Change `customize-save-variable' to work under "emacs -Q"? Date: Wed, 13 Jul 2011 15:38:02 +1000 Message-ID: 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 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1310535516 24342 80.91.229.12 (13 Jul 2011 05:38:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2011 05:38:36 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 13 07:38:32 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 1Qgs9X-0004oj-J0 for ged-emacs-devel@m.gmane.org; Wed, 13 Jul 2011 07:38:31 +0200 Original-Received: from localhost ([::1]:56532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qgs9W-00025s-Kn for ged-emacs-devel@m.gmane.org; Wed, 13 Jul 2011 01:38:30 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:48116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qgs9B-000258-KA for emacs-devel@gnu.org; Wed, 13 Jul 2011 01:38:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qgs96-000539-4O for emacs-devel@gnu.org; Wed, 13 Jul 2011 01:38:09 -0400 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:55945) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qgs95-00052t-QN for emacs-devel@gnu.org; Wed, 13 Jul 2011 01:38:03 -0400 Original-Received: by iyl8 with SMTP id 8so6190863iyl.0 for ; Tue, 12 Jul 2011 22:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=lr1JDu5FaLdvCuHdxh5sGWR8JDWkI122h7Nt+msyR6Y=; b=b+MGcfOHiUbGtrDZsJKt6nQXBb98g5XM78D7Ga42t9DjBNu68R7O1wb3iTWVRLxgiJ 9O0lcpVfLXXQ2y//9mD2el4bu0Xddj0hHWRKME5MO2myKos1uHsVc8Jb/NVt0qAm3E2b Tu9euPPGr3amoXHCx14/mWlP+3wW8SCOzEgWA= Original-Received: by 10.231.67.145 with SMTP id r17mr630743ibi.176.1310535482222; Tue, 12 Jul 2011 22:38:02 -0700 (PDT) Original-Received: by 10.231.15.3 with HTTP; Tue, 12 Jul 2011 22:38:02 -0700 (PDT) In-Reply-To: <87ei1vt40t.fsf@uwakimon.sk.tsukuba.ac.jp> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.169 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:141992 Archived-At: On Wed, Jul 13, 2011 at 10:31 AM, Stephen J. Turnbull wrote: > Tim Cross writes: > =A0> On Tue, Jul 12, 2011 at 2:12 PM, Stephen J. Turnbull wrote: > > =A0> saved to. I think Lars wants to find a way to make code, such as > =A0> smtpmail (I'm gussing) work in a 'clean' way under -Q. > > The right way is to use different functions to do the `set' part, > which Customize already provides. > > As an Olde Farte, I am often nonplussed by software that doesn't offer > to set or save, but simply reflects changes in the dialog in the > settings immediately, and saves them when the dialog is dismissed (or > perhaps before). =A0It seems to me that a better approach than screwing > with the semantics of "save" and turning it into "save in some > circumstances but not others and you'd better remember which you're > in, until the end of the session which may be a long time from now", > simply do that set (which AFAIK can't fail) and then do a separate > save, which makes it clear WTF the code is doing. > I *think* I agree, though am not clear what 'saving' means compared to 'setting' within the context of the -Q switch - if it is just a 'no-op' type of operation, it could cause confusion for the user and if it means something else, I'm not sure what that is. > =A0> > I'm not sure I understand. =A0Isn't that just a symptom of a poor > =A0> > report, ie, omitting necessary preparation for reproducing the > =A0> > behavior from the recipe? > =A0> > =A0> You could look at it as a symptom of poor bug reporting, but that > =A0> isn't sufficient. > > I very carefully removed "bug". =A0This is not about bug reporting, it's > about communication including bug reporting but not limited to it. =A0I > use the word "report" to indicate that certain aspects of the > communication need to be precisely stated. OK, but that does not affect my point regarding the importance of -Q representing a standard, well defined and consistent configuration. > > =A0> Once you change default settings in any way, this property of the -Q > =A0> switch is lost. > > Sure. =A0I don't see how anything I said depends on *bug* reporting. > What it depends on is making changes to the environment. =A0In the case > of mail, this may mean choosing a non-default transport (smtpmail > vs. sendmail) and setting user options (full name and mail address) > and so on. This is getting weird. It seems we both agree that -Q and any changes to that environment are about more than bug reporting. I think its about more than reporting. For example, I find it extremely useful in a diagnostic role and have even found it useful in teaching or explaining concepts as it ensures everyone is in the same basic environment. > > =A0> An alternative solution is to accept that some packages, those that > =A0> require local configuration, just don't work under -Q. > > Well, sure. =A0All that means is that people will continue to use -Q as > "the ultimate Emacs reset" (quote of the week!) and proceed to modify > that environment as necessary to do the work they're going to do. =A0It > will be their responsibility to report those modifications in order > for others to reproduce the behavior .... > I think we must have very different views on how -Q is used. I do not see -Q being a switch you would normally use in day-to-day operation. It is something you do when trying to diagnose a problem, formulate a recipe for a bug or possibly do some testing/benchmarking/profiling etc. On some levels, it is reasonable to assume some functionality which depends on local customization will not work, but that could be OK given the current context. > =A0> My view is that the objective Lars is after is reasonable and we nee= d > =A0> to support his efforts. > > We already do. =A0There's nothing hard or unclear about > > =A0 =A0(customize-set-variable VAR ...) > =A0 =A0(condition-case > =A0 =A0 =A0 =A0(customize-save-variable VAR ...) > =A0 =A0 =A0(whatever-error-c-s-v-throws > =A0 =A0 =A0 (warn "VAR set but not saved because you haven't loaded custo= m file"))) > > Lars just thinks that Emacs should be smart enough to do that itself. > I think, as the Japanese say, this is ten years too early for that > kind of smartness. > > 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. I thought the objective was to make code that needed to set custom variables at load time able to handle the -Q situation without the need to jump through extra hoops to avoid it throwing an error. Others mentioned that having code 'silently' fail to do what would be expected i.e. save, was perhaps not a great idea and I tend to agree. 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. It means that -Q would no longer mean emacs in a fully default state to emacs in a default state with some things set to local values. It is the 'some things set to local values" which I think could be problematic and my suggestion was that if we do go down that road, we need a convenient way to know what those some things are and possibly a reliable way to communicate that information. The overall point was to question whether this was even a good road to go down at all or 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 (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. Tim