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: Tue, 12 Jul 2011 12:57:54 +1000 Message-ID: References: <877h7ok9cd.fsf@stupidchicken.com> <87d3hgprjb.fsf@stupidchicken.com> <87r55wtget.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 1310439504 19763 80.91.229.12 (12 Jul 2011 02:58:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 12 Jul 2011 02:58:24 +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 Tue Jul 12 04:58:20 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 1QgTAx-0005tK-Pq for ged-emacs-devel@m.gmane.org; Tue, 12 Jul 2011 04:58:20 +0200 Original-Received: from localhost ([::1]:39575 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgTAw-0008FJ-JN for ged-emacs-devel@m.gmane.org; Mon, 11 Jul 2011 22:58:18 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:37487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgTAd-0008Ef-Mj for emacs-devel@gnu.org; Mon, 11 Jul 2011 22:58:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgTAb-0008Gw-3S for emacs-devel@gnu.org; Mon, 11 Jul 2011 22:57:59 -0400 Original-Received: from mail-iw0-f169.google.com ([209.85.214.169]:37796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgTAa-0008Gl-D2 for emacs-devel@gnu.org; Mon, 11 Jul 2011 22:57:56 -0400 Original-Received: by iwn8 with SMTP id 8so4937096iwn.0 for ; Mon, 11 Jul 2011 19:57:55 -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=XFT/V7AqbnQ6s9KXPScJtCnhkG/hqcmIZio9/E+1P+c=; b=vnhHb0PHM48MVimQLq59WcZL2PI2hWfDzRFM4W+NAe0jBPPTWl25l8GonaOu2KoAyg 8eRASwJBSZPAxJP7sQiW8+lOWdzla/mfDK9Ujk8WkS8IZ4st72bTEsueu4XzHU4cxssg YkTD/56yzGt1ootsvT3KVQj37T+HlHWcfWSXY= Original-Received: by 10.231.61.7 with SMTP id r7mr74866ibh.151.1310439474928; Mon, 11 Jul 2011 19:57:54 -0700 (PDT) Original-Received: by 10.231.15.3 with HTTP; Mon, 11 Jul 2011 19:57:54 -0700 (PDT) In-Reply-To: <87r55wtget.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.214.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:141962 Archived-At: On Tue, Jul 12, 2011 at 11:51 AM, Stephen J. Turnbull wrote: > Tim Cross writes: > > =A0> At the same time, this can also be a source of frustration. For > =A0> example, if you run emacs -Q to test a recipe for a bug and find it > =A0> works, you cannot just run report-emacs-bug to submit the bug if you= r > =A0> mail settings depend on anything but the default values. You need to > =A0> copy the backtrace and other important information to a temporary > =A0> file, exit emacs and start again without the -Q switch and then subm= it > =A0> the bug. > > $ emacs -Q > ;; reproduce non-crashing bug > M-x report-emacs-bug RET =A0 =A0 =A0 =A0 =A0 ; get the environment right > ;; edit the bug buffer as usual > M-: (load-user-init-file) RET =A0 =A0 =A0; YMMV, this is XEmacs-specific = IIRC > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ; XEm= acs GUI provides a button, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ; Ema= cs can easily do the same if > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ; it'= s not already available > ;; fix up own address in bug report and send > I have used that technique, but have run into problems with packages that have already loaded where the variable needs to be set before they are loaded. The other problem is that it is a solution which really only works for somewhat experienced/confident users. However, bug submission was just an example of the point I was trying to make. The core issue I see is that -Q is useful mainly because it establishes a standard default environment. I think this is an important point - it is this standard default environment which allows developers to try and reproduce bugs without the distraction of local customizations that may cause/hide such bugs and it allows users to quickly and easily identify whether their problem is a bug in the core system or a but in their customization or add-on code/package. Once we allow local customizations to be applied in this environment, this standard base default environment no longer exists. This may be fine, provided there is some mechanism that makes what has been changed explicit and easy to reproduce. > works for me. =A0I do that kind of thing all the time, for the reasons > you give. > > =A0> Furthermore, the environment setting you include in the bug > =A0> report are now likely to be more complex and not a true reflection o= f > =A0> the actual environment that existed when you ran your recipe under > =A0> emacs -Q. > > This isn't a problem if done as above. =A0There are surely other ways to > accomplish the same thing, too, such as running a separate emacs -Q, > formatting the bug buffer in the emacs -Q session, saving to a file, > then running M-x report-emacs-bug in your main session, delete all the > session information and C-x i the real bug report in. > > So this thread isn't about making life easier for bug reporters (who > very likely don't remember the necessary settings the way Lars does, > or even which variables to set, because assistant.el and Customize > handle it for them), it's about making life easier for developers like > Lars. =A0Nothing wrong with that, but let's remember who benefits here. Bug reporting was not meant as the central theme - it was just an example of one thing that could be affected when you allow local customizations to be applied in a -Q environment. I'm not even against local customizations being applied, but I think such customizations need to be very explicit and I would like to see some easy way to communicate what has been customized and to what so that it can be reproduced by others. What I don't want to see is one party reporting something in a -Q environment that is not seen in another -Q environment (assuming other things, such as platform, version etc being equal) as this could negate the real value of -Q, which is to provide a common base that can be used not only for bug reporting, but also for any development or other discussion where you need to make sure all parties are coming from the same point. The -Q arg is the great leveller that puts the novice, intermediate and expert on the same level and is often critical in establishing good communication. > > =A0> One possibility might be to modify the code that manages/sets custom > =A0> variables check for the -Q switch and take some additional or > =A0> different steps if the -Q switch is also detected. > > Another possibility might be putting basic infrastructure stuff like > mail settings in a different file, loaded on demand by the code that > needs it. =A0(Yeah, I know, deliberately putting all eggs in one basket > is where this whole thing started.) > I think there are probably many different solutions. Mail is just one area where this issue comes up. There are likely others. The solution will likely become evident once we understand the issue well. My only real contribution is to say that for me, the most fundamental property of -Q is that it is emacs with just the defaults and no local customization. I don't mind if it also has local customization, but that customization should be very explicit and I would like it to include a mechanism that would allow me to bundle that up in a simple way that would allow someone else to create a similar environment reliably and consistently. What I don't want is local customizations that are applied 'behind the scenes' or are only applied to some things and not others. I also don't want things to fail totally silently. Tim