[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: `set-variable' should use :set

From: Stephen J. Turnbull
Subject: RE: `set-variable' should use :set
Date: Fri, 22 Oct 2010 16:17:29 +0900

Drew Adams writes:

 > That last part is a bit presumptuous, IMHO.  Perhaps it means to
 > say only that `set-variable' is largely obsolete (although I don't
 > see why it would be - it is quick; Customize is not).

You've simply identified an optimization that isn't premature.

OK, point made.  But I don't really understand why customize-variable
needs to be any slower than set-variable.

 > ("Obsolete" is not a verb BTW (e.g. "obsoleted"), although it is
 > true that you can verb any noun.)

Don't tell me that, submit a patch. ;-)

 > > I'm curious, what are your use cases?
 > As I said before, more or less the same use cases as using Customize to set a
 > value (without saving it):

That's not a use case.  Which variables?  As I wrote, I don't see a
need for this, but maybe I just don't mess with the same variables
that you do.

 > Also, I don't necessarily treat user options as things to be set
 > once in a blue moon and persist.

Well, neither do I.  For example, I might toggle debug-on-error or
debug-on-signal a dozen times in a session.  But since I do, those
toggles live on C-c D E and C-c D S respectively, along with a number
of other debugging utilities I use frequently in the C-c D keymap.
set-variable kind of pales in comparision.

OTOH, if I do something infrequently enough that I'd forget the key
sequence I bound it to, customize-variable would do the trick.

So it sounds to me like you must do a lot of experimenting with
various options, and in that context I can see where set-variable
would hit a sweet spot.  I have no objection to you writing -- and
maintaining -- variable-interactive declarations for any variables you
care to, but I ain't gonna do it myself unless there's a lot more
support for it from typical users.

 > I even proposed that Emacs allow for (i.e., optionally) typing
 > non-option vars.  That suggestion was summarily dismissed by you -
 > the sole responder, with the single word "YAGNI".
 > http://lists.gnu.org/archive/html/emacs-devel/2009-10/msg00668.html
 > We have different views of Emacs and its features.  That's OK.
 > YAGNI.  But IUI.

That's not true, though.  Maybe YWUI, but you admitted in that post
that you have no implementation and don't intend to create one, and
evidently even less intention to maintain a few thousand
variable-interactive or type declarations.  And that's the rub.

If (as you suggest) set-variable could be made to use Customize
descriptions without losing its speed, that would be reasonable.  But
duplicating the effort makes no sense.  Similarly, the typing code
clashes with the (alleged) intent of Emacs Lisp to be lightweight (at
least compared to Common Lisp).  So while your suggestions have merit
in themselves, I don't see them fitting with Emacs philosophy very

reply via email to

[Prev in Thread] Current Thread [Next in Thread]