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: RE: which one to use: custom-set-variables, customize-set-variable, or customize-set-value? Date: Sun, 13 Dec 2015 09:32:14 -0800 (PST) Message-ID: <1bb3e90b-9e31-4450-aa11-4c475ffd081a@default> References: <99f3716d-513e-42b5-b43b-fafca9c81f5a@default> <87twnorgig.fsf@metapensiero.it> <63e721db-3901-4017-a254-a679a4d8d04e@default> <87lh90nk3u.fsf@metapensiero.it> <782dca8a-9b67-49f4-bd41-20e80f94ad9e@default> <20151213081701.GA25363@tuxteam.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1450027968 5334 80.91.229.3 (13 Dec 2015 17:32:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Dec 2015 17:32:48 +0000 (UTC) To: tomas@tuxteam.de, help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 13 18:32:36 2015 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 1a8AVe-0001pJ-Qh for geh-help-gnu-emacs@m.gmane.org; Sun, 13 Dec 2015 18:32:34 +0100 Original-Received: from localhost ([::1]:56023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8AVe-0005TT-28 for geh-help-gnu-emacs@m.gmane.org; Sun, 13 Dec 2015 12:32:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8AVU-0005T7-Od for help-gnu-emacs@gnu.org; Sun, 13 Dec 2015 12:32:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8AVR-00040a-3E for help-gnu-emacs@gnu.org; Sun, 13 Dec 2015 12:32:24 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:51179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8AVQ-0003yJ-SF for help-gnu-emacs@gnu.org; Sun, 13 Dec 2015 12:32:21 -0500 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id tBDHWHIa005534 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 13 Dec 2015 17:32:18 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id tBDHWHJ4013494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 13 Dec 2015 17:32:17 GMT Original-Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id tBDHWGg7029489; Sun, 13 Dec 2015 17:32:16 GMT In-Reply-To: <20151213081701.GA25363@tuxteam.de> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] 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:108386 Archived-At: > > As I said, you can certainly do as you suggest. My suggestion is > > to clearly show in your init file how you are setting the value. > > Including for different Emacs versions - so you are aware of such > > changes when you read your code later. But it's just a suggestion. >=20 > Here I was trying to make a case for some kind of "generic setter" > which knows what the right thing is. Of course, such a generic setter > wouldn't be half as valuable without a context. I wouldn't do it in > my init file as of now, where it's not "usual". BTW, maybe I should also have made clear that I think the best practice, in general, is to use the Customize UI and let it manage user options and faces, and to force it to do so in a separate `custom-file' and not in the init file. While one can call Customize functions (`customize-set-variable') from Lisp code, my advice is to save that for commands you write that dynamically manipulate (set and possibly save) options and faces - as opposed to using such functions in an init file. (Just one opinion.)