all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Tim Cross <theophilusx@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Change `customize-save-variable' to work under "emacs -Q"?
Date: Thu, 14 Jul 2011 11:13:25 +0900	[thread overview]
Message-ID: <87zkkhsj7e.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <CAC=50j8C_0HOUHXvU3ucQ+DMB7k8mS9tE80xdYH_DpHkX-bKPg@mail.gmail.com>

Tim Cross writes:
 > On Wed, Jul 13, 2011 at 9:02 PM, Stephen J. Turnbull <stephen@xemacs.org> wrote:

 > > 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.
 > 
 > 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 :-),




  reply	other threads:[~2011-07-14  2:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-10 12:22 Change `customize-save-variable' to work under "emacs -Q"? Lars Magne Ingebrigtsen
2011-07-11  2:30 ` Stephen J. Turnbull
2011-07-11  7:49   ` Lars Magne Ingebrigtsen
2011-07-11  9:52     ` Stephen J. Turnbull
2011-07-11  9:53       ` Lars Magne Ingebrigtsen
2011-07-11 13:52         ` Stephen J. Turnbull
2011-07-11 17:36 ` Chong Yidong
2011-07-11 18:08   ` Drew Adams
2011-07-11 19:32     ` Juanma Barranquero
2011-07-11 18:27   ` PJ Weisberg
2011-07-11 19:04     ` Chong Yidong
2011-07-11 19:28       ` Lars Magne Ingebrigtsen
2011-07-12  0:03         ` Tim Cross
2011-07-12  1:07           ` chad
2011-07-12  1:51           ` Stephen J. Turnbull
2011-07-12  2:57             ` Tim Cross
2011-07-12  4:12               ` Stephen J. Turnbull
2011-07-12 10:30                 ` Tim Cross
2011-07-13  0:31                   ` Stephen J. Turnbull
2011-07-13  5:38                     ` Tim Cross
2011-07-13 11:02                       ` Stephen J. Turnbull
2011-07-13 23:46                         ` Tim Cross
2011-07-14  2:13                           ` Stephen J. Turnbull [this message]
2011-07-12  6:46             ` Lars Magne Ingebrigtsen
2011-07-12  3:32 ` Stefan Monnier
2011-07-15 17:01 ` Dave Abrahams
2011-07-17 14:33 ` Christoph Scholtes
2011-07-17 19:13   ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zkkhsj7e.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=emacs-devel@gnu.org \
    --cc=theophilusx@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.