From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: About how misspelled word are displayed Date: Fri, 12 May 2017 10:32:36 -0700 (PDT) Message-ID: <8778c766-ce0a-4b42-939d-96b0f0b49a82@default> References: <3993ee96-42e7-e597-f7d0-306003faa235@alice.it> <40f5d8bd-8956-b3fa-1818-eb3622f6ff12@alice.it> <20170512141406.GA27429@tuxteam.de> <8479790d-443e-48fc-a59b-f14a917fafab@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1494610405 14704 195.159.176.226 (12 May 2017 17:33:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 12 May 2017 17:33:25 +0000 (UTC) To: Emanuel Berg , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 12 19:33:21 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9ERN-0003kC-HV for geh-help-gnu-emacs@m.gmane.org; Fri, 12 May 2017 19:33:21 +0200 Original-Received: from localhost ([::1]:54722 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9ERT-0007GF-37 for geh-help-gnu-emacs@m.gmane.org; Fri, 12 May 2017 13:33:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9EQr-0007Fx-TZ for help-gnu-emacs@gnu.org; Fri, 12 May 2017 13:32:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9EQo-00063D-R8 for help-gnu-emacs@gnu.org; Fri, 12 May 2017 13:32:49 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:23066) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d9EQo-0005vT-H9 for help-gnu-emacs@gnu.org; Fri, 12 May 2017 13:32:46 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v4CHWfrb003966 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 12 May 2017 17:32:42 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v4CHWfdS004868 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 12 May 2017 17:32:41 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v4CHWd8d010008; Fri, 12 May 2017 17:32:40 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6767.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:113003 Archived-At: > > Just use a separate `custom-file'. > > Customize does not _want_ to fiddle with your > > init file, but if you do not tell it another > > file to use instead (`C-h v custom-file') > > then your init file wins. > > > > For simple stuff, yes, you can code such > > customizations by hand. But why do that > > (except to practice and learn more, which > > can be a fine reason)? > > > > And for stuff that is not so simple, it is > > better to rely on Customize. It knows the > > customize code better than you/we do. >=20 > OK, so when it gets not so simple, one should > not rely on Customize anymore. But if one > cannot solve so simple things without relying > on Customize, how can one be expected to solve > things that are not so simple suddenly? Perhaps you misread what I wrote? 1. I'm talking only about customizations that Customize is for, not arbitrary Lisp code, key bindings, etc. 2. For user options and faces, which is what Customize is for, it is precisely those whose definitions are _not_ so simple that it is especially helpful to use Customize and not just hand-code assignments etc. For both simple and complex defcustoms and deffaces you _can_ rely on Customize. It is for the complex ones that it can be especially helpful to use Customize (or its functions). > Apart from the principle, Customize is not > easier than to put a couple of lines of code > into a text file.=20 I didn't argue about what someone might find easier but about what is more prudent (sure). I don't find it hard to "put a couple of lines of code into a text file." But I also don't find it hard to use the Customize UI. (It's not the best UI, but I can use it to get the job done - and reliably so.) If you really want to set user options or faces with Lisp then it is better to use the `custom*' functions designed for that. You can do everything by Lisp that the Customize UI can do, in terms of setting preferences. But not if you just toss around setq and modify-face. It is particularly options, not faces, that can be problematic if you don't use the `custom*' functions, because of defcustom :set and :initialize triggers, as I mentioned. > Customize is much more complicated and I don't want to > ever rely on complicated stuff, and certainly not for > doing simple things. If you are not the one who defined a given defcustom, and if that defcustom uses a keyword such as :set, then a complicated beast has likely been created for you already. If you try to tame that beast without taking its nature into account (e.g., using just `setq') you can find yourself surprised. You can even get into trouble by not respecting the defcustom :type. Things might be OK in some contexts but not in others, and you might well have trouble figuring out just what is wrong. Knowing this won't stop you from doing whatever you want, of course. ;-) But if you're really interested in using Lisp to set options or faces then you might want to get to know function `customize-set-variable' (or `custom-set-faces' or `custom-set-variables'), if you are not already familiar with it. Or not.