From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lele Gaifax Newsgroups: gmane.emacs.help Subject: Re: which one to use: custom-set-variables, customize-set-variable, or customize-set-value? Date: Sat, 12 Dec 2015 09:31:49 +0100 Organization: Nautilus Entertainments Message-ID: <87lh90nk3u.fsf@metapensiero.it> References: <99f3716d-513e-42b5-b43b-fafca9c81f5a@default> <87twnorgig.fsf@metapensiero.it> <63e721db-3901-4017-a254-a679a4d8d04e@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1449909142 5937 80.91.229.3 (12 Dec 2015 08:32:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Dec 2015 08:32:22 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 12 09:32:13 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 1a7fbA-0006h0-Ft for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Dec 2015 09:32:12 +0100 Original-Received: from localhost ([::1]:50989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7fb9-0000ku-Tc for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Dec 2015 03:32:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7fb0-0000ko-8O for help-gnu-emacs@gnu.org; Sat, 12 Dec 2015 03:32:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7fax-0000KL-3h for help-gnu-emacs@gnu.org; Sat, 12 Dec 2015 03:32:02 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:34914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7faw-0000KD-T3 for help-gnu-emacs@gnu.org; Sat, 12 Dec 2015 03:31:59 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1a7fat-00063o-Ti for help-gnu-emacs@gnu.org; Sat, 12 Dec 2015 09:31:56 +0100 Original-Received: from 151.62.33.97 ([151.62.33.97]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 Dec 2015 09:31:55 +0100 Original-Received: from lele by 151.62.33.97 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 Dec 2015 09:31:55 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 151.62.33.97 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:i8mPLcTsNund9VAlj/UgURxkDmU= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:108378 Archived-At: Drew Adams writes: >> While it seems working as expected, I like to hear other's opinion: do you >> see any problem with this approach? > > You can do that. But I would advise just using `customize-set-variable' > for a user option, and using `setq' or `setq-default' etc. for non-options. > > That is much more readable in your code, IMO. Ok, thanks, I will rethink my step. > And no, you do not ever need to "check each variable documentation to > see the right way to set its value". (And you should anyway not rely > on a variable's documentation for that.) How's it that possible? How can then I know when to use `setq', `setq-default' or `customize-set-variable'? ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. lele@metapensiero.it | -- Fortunato Depero, 1929.