unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Rusi <rustompmody@gmail.com>, help-gnu-emacs@gnu.org
Subject: In defense of Customize   [was: Trying to right-align my window on startup]
Date: Tue, 14 Jan 2014 09:37:34 -0800 (PST)	[thread overview]
Message-ID: <5581e666-3500-4a30-abb2-6454e2398a01@default> (raw)
In-Reply-To: <3cec217d-8adb-4e6c-b239-eff0c8b520c9@googlegroups.com>

> > > But (IMHO) too many people ignore Customize, often because
> > > they've gotten the impression somehow that it is for non-Lispers
> > > or wimps.
> >
> > I just hate its UI.
> 
> If a first year student of mine cannot distinguish data and code
> (s)he'd get an F grade.  customize does that.

No, it is Emacs that does that, by not requiring (or even
encouraging) the use of `custom-file', and by telling Customize to
put code in your init file by default.  That is a not-so-wise design
decision about how Emacs uses Customize.  It is not the fault of
Customize if Emacs tells it to write to your init file.

> Proof of that is that it throws random crud at my init file when
> I am not looking.

If you can find a recipe where it throws random crud at your init
file, when you are looking or not, then you will help Emacs and its
users by reporting that as a bug: `M-x report-emacs-bug'.

FWIW, I have never seen Customize "throw random crud".  And you
should avoid letting *any* generated code near your init file.  In
the case of Customize, just use `custom-file'.  Problem solved.  And
there would be no problem in the first place if you were required to
have a separate `custom-file' to use Customize.

Emacs does not by default store your bookmarks, or your elpa info,
or your thumbnail files, or your eshell info, or or any other
generated Lisp code in your init file.  Why does it still store
Customize-generated code in your init file by default?  Ask Emacs Dev.
To me, this is unwise design.

But it is certainly not Customize's fault.  If Emacs Dev decided to
store your bookmarks in your init file, you would get the same kind
of mess that you can get from Emacs mixing Customize code in with
your hand-coded init-file stuff.  It should be a no-brainer to
separate generated or automatically maintained code from user,
hand-written code.  (But whaddo I know?)

And wrt your code/data characterization: all such code is data to
the Lisp interpreter, whether you wrote it or a program wrote it,
and whether that program is Customize or the Elisp byte-compiler.

> Mostly I get away by keeping the custom file as its very exclusive
> garbage dump.  But with all my care it still occasionally stomps
> my (ie my init's) toes.

Again, report a bug.  I have never seen that.  If your `custom-file'
value points to an accessible, writable file, then I don't know of
any scenario where Emacs would write Customize stuff to your init file.

In sum, instead of vague trash-talk, please submit a bug report,
specifying just what you think happened to you.  The devil (and
understanding) is in the details.  Chicken-Little talk to scare
people away does not really help anyone.

> So no customize is not written for wimps, its written by wimps

I hardly think that Per Abrahamsen is a wimp, wrt Lisp or Emacs,
at least.  http://www.emacswiki.org/PerAbrahamsen

Of course, everything is relative - perhaps you are even less of
a programming wimp than Per, so you can judge him from on high.
That's certainly not my case.

The Customize code, and the `widget' code generally, is not easy
to read, IMO - that's a fair criticism.  And that is a big problem
in terms of improving Customize (e.g., the UI).  It is likely one
reason that the UI has been left behind to some extent.

> Of course if Drew is saying that customize is good for
> *exploring* options, I agree.

No, Customize is actually *not* so good for exploring faces and
options, IMHO.

It is good for ensuring that you change options and faces correctly,
e.g. type-correctly and wrt setting and initialization triggers
that should be applied.  It can also help to some extent wrt
choosing values (e.g. completion), even beyond ensuring their proper
types.

To tell you the truth, I never thought I'd be an apologist for
Customize.  I too used to avoid it and use only hand-coded Lisp
for all of my customizations.  And I too am no big fan of the UI
(and I have proposed and implemented some UI enhancements).  I have
probably criticized it (in concrete terms, including bug reports)
as much as anyone.

But I think that lots of people are, out of ignorance of what
Customize really is and can do, throwing the baby out with the
bathwater. You do not need to love the Customize UI to make good
use of Customize.

One place to start is to (really) learn `defcustom', in particular
:type.  IMO, too much Elisp code that uses `defcustom' does not
make good use of :type - meaning pretty much lazy and
less-than-useful typing.  (And that has included, and probably
still includes, some code that is distributed with Emacs.)

The more complex the structure of a variable's value, the more
Customize can help, regardless of whether you use its UI.



  reply	other threads:[~2014-01-14 17:37 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<B67C92F68785104E8816FEEE2B44C9346F33C8FD@TEMCAS01.peinet.peinc.com>
     [not found] ` <<83r48idw6z.fsf@gnu.org>
     [not found]   ` <<B67C92F68785104E8816FEEE2B44C9346F33C978@TEMCAS01.peinet.peinc.com>
     [not found]     ` <<83mwj5ekrs.fsf@gnu.org>
     [not found]       ` <<B67C92F68785104E8816FEEE2B44C9346F33D269@TEMCAS01.peinet.peinc.com>
     [not found]         ` <<28ab7799-fdc5-47c4-9ac0-f7db66771e7e@default>
     [not found]           ` <<83iotsdh9n.fsf@gnu.org>
2014-01-09 21:02             ` Trying to right-align my window on startup Drew Adams
2014-01-11 14:45               ` Juanma Barranquero
2014-01-11 17:35                 ` poor Customize [was: Trying to right-align my window on startup] Drew Adams
     [not found]                 ` <mailman.11630.1389461775.10748.help-gnu-emacs@gnu.org>
2014-01-13 15:11                   ` jack-mac
2014-01-13 17:06                     ` Drew Adams
     [not found]               ` <mailman.11626.1389451551.10748.help-gnu-emacs@gnu.org>
2014-01-14  9:24                 ` Trying to right-align my window on startup Rusi
2014-01-14 17:37                   ` Drew Adams [this message]
2014-01-14 19:32                     ` session.* files (was: In defense of Customize) gottlieb
2014-01-14 19:52                       ` Peter Dyballa
2014-01-15 10:29                     ` In defense of Customize [was: Trying to right-align my window on startup] Phillip Lord
2014-01-15 17:28                       ` Drew Adams
2014-01-16 10:06                         ` Phillip Lord
2014-01-16 15:33                           ` Drew Adams
2014-01-14 17:53                   ` Trying to right-align my window on startup Emanuel Berg
2014-01-14 17:57                   ` Marcin Borkowski
     [not found]                   ` <mailman.11925.1389722262.10748.help-gnu-emacs@gnu.org>
2014-01-14 18:15                     ` Rusi
2014-01-14 18:19                     ` Emanuel Berg
2014-01-15  4:44                     ` Rusi
     [not found]                   ` <mailman.11921.1389721075.10748.help-gnu-emacs@gnu.org>
2014-01-18  2:59                     ` In defense of Customize [was: Trying to right-align my window on startup] Rusi
2014-01-18  4:42                       ` Emanuel Berg
2014-01-18 15:31                         ` Rusi
2014-01-28 15:17                     ` Christoph Wedler
2014-01-28 18:35                       ` Emanuel Berg
2014-01-29 10:57                         ` Phillip Lord
2014-01-29 13:23                           ` Stefan Monnier
2014-01-29 16:54                             ` Phillip Lord
2014-01-29 18:26                               ` Stefan Monnier
2014-01-30  9:59                                 ` Phillip Lord
     [not found]                         ` <mailman.13090.1390993048.10748.help-gnu-emacs@gnu.org>
2014-01-29 16:52                           ` Emanuel Berg
2014-01-29 17:19                             ` Phillip Lord
     [not found]                             ` <mailman.13107.1391015968.10748.help-gnu-emacs@gnu.org>
2014-01-29 18:21                               ` Emanuel Berg
2014-01-29  0:47                       ` Drew Adams
     [not found]                       ` <mailman.13068.1390956492.10748.help-gnu-emacs@gnu.org>
2014-01-30 10:14                         ` Christoph Wedler
2014-01-30 13:23                           ` Stefan Monnier
2014-01-30 16:06                           ` Drew Adams
     [not found]                           ` <mailman.13194.1391088219.10748.help-gnu-emacs@gnu.org>
2014-01-30 16:15                             ` Rusi
2014-01-30 18:44                               ` Emanuel Berg
2014-01-31  9:56                                 ` Phillip Lord
     [not found]                                 ` <mailman.13338.1391162177.10748.help-gnu-emacs@gnu.org>
2014-01-31 12:08                                   ` Rusi
2014-01-31 20:41                                     ` Emanuel Berg
2014-01-31 20:39                                   ` Emanuel Berg
     [not found]                           ` <mailman.13229.1391098001.10748.help-gnu-emacs@gnu.org>
2014-01-31  6:54                             ` Rusi
2014-01-31 17:50                             ` Christoph Wedler
2014-01-08 20:11 Trying to right-align my window on startup Mickey Ferguson
2014-01-08 21:01 ` Eli Zaretskii
     [not found]   ` <B67C92F68785104E8816FEEE2B44C9346F33C978@TEMCAS01.peinet.peinc.com>
2014-01-09  6:23     ` Eli Zaretskii
2014-01-09 20:16       ` Mickey Ferguson
2014-01-09 20:30         ` Eli Zaretskii
2014-01-09 20:32         ` Drew Adams
2014-01-09 20:36           ` Eli Zaretskii
2014-01-09 20:41             ` Marcin Borkowski
2014-01-09 21:04               ` Drew Adams
     [not found]             ` <mailman.11466.1389300108.10748.help-gnu-emacs@gnu.org>
2014-01-09 21:43               ` Sebastien Vauban
2014-01-09 22:23                 ` Drew Adams
2014-01-10 22:31           ` Mickey Ferguson
2014-01-10 23:09             ` Drew Adams
2014-01-11  1:17               ` Mickey Ferguson
2014-01-11  3:07                 ` Drew Adams
2014-01-13 23:14                   ` Mickey Ferguson
2014-01-14  4:55                     ` Eli Zaretskii
     [not found]         ` <<83k3e8dhj9.fsf@gnu.org>
2014-01-09 21:02           ` Drew Adams

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=5581e666-3500-4a30-abb2-6454e2398a01@default \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=rustompmody@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).