From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: In defense of Customize [was: Trying to right-align my window on startup] Date: Tue, 14 Jan 2014 09:37:34 -0800 (PST) Message-ID: <5581e666-3500-4a30-abb2-6454e2398a01@default> References: <3cec217d-8adb-4e6c-b239-eff0c8b520c9@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1389721080 16046 80.91.229.3 (14 Jan 2014 17:38:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jan 2014 17:38:00 +0000 (UTC) To: Rusi , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 14 18:38:07 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W37wE-0008Pb-Ra for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Jan 2014 18:38:07 +0100 Original-Received: from localhost ([::1]:49755 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W37wE-0004Mw-Ak for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Jan 2014 12:38:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W37vv-0004MD-2b for help-gnu-emacs@gnu.org; Tue, 14 Jan 2014 12:37:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W37vn-0002fV-GV for help-gnu-emacs@gnu.org; Tue, 14 Jan 2014 12:37:47 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:45081) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W37vn-0002fL-95 for help-gnu-emacs@gnu.org; Tue, 14 Jan 2014 12:37:39 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s0EHbanP001253 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Jan 2014 17:37:36 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s0EHbZtw016647 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Jan 2014 17:37:35 GMT Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s0EHbZQ2016644; Tue, 14 Jan 2014 17:37:35 GMT In-Reply-To: <3cec217d-8adb-4e6c-b239-eff0c8b520c9@googlegroups.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95389 Archived-At: > > > 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. >=20 > 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.