From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philippe Vaucher Newsgroups: gmane.emacs.devel Subject: Re: custom-set-variables considered harmful Date: Tue, 28 Nov 2017 15:12:46 +0100 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a11427978cec948055f0b9efc" X-Trace: blaine.gmane.org 1511878418 18120 195.159.176.226 (28 Nov 2017 14:13:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Nov 2017 14:13:38 +0000 (UTC) Cc: Stefan Monnier , emacs-devel To: =?UTF-8?Q?Elias_M=C3=A5rtenson?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 28 15:13:31 2017 Return-path: Envelope-to: ged-emacs-devel@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 1eJgdb-0003wh-C9 for ged-emacs-devel@m.gmane.org; Tue, 28 Nov 2017 15:13:27 +0100 Original-Received: from localhost ([::1]:38198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJgdi-0003CU-PX for ged-emacs-devel@m.gmane.org; Tue, 28 Nov 2017 09:13:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJgdb-0003CP-UI for emacs-devel@gnu.org; Tue, 28 Nov 2017 09:13:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJgdS-0004R6-9t for emacs-devel@gnu.org; Tue, 28 Nov 2017 09:13:27 -0500 Original-Received: from mail-vk0-x229.google.com ([2607:f8b0:400c:c05::229]:36393) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eJgdS-0004Qv-45 for emacs-devel@gnu.org; Tue, 28 Nov 2017 09:13:18 -0500 Original-Received: by mail-vk0-x229.google.com with SMTP id f73so94931vki.3 for ; Tue, 28 Nov 2017 06:13:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vSGBLKWfJS05gpLscpw3giDnRHhSelokYhLdWK0KSI0=; b=SJAZoC4xRimLesNXh9OyBSJIHbjLbd1LmZLx9CTDhKhV272aguvBmUh9GMlOQVxPkS mpUAcbte9hEeytaFC0xT14Is7NEWfh3Smm1a9RY7MrIYNMrdc4QUF/LQhMZOSVB3wRAu 9VCcEL1f7lZuCD/rYJ47Fs7lr14QiRZQM3fUu0asapz+xr+aUlV2yBx+/sIgSjQcpflj WPMRutx5tIhcb26h6Ui9hKJH7Be/RBUegT0UdC21uBVhOIZEyQJzKispf06tDSJH+hlI XuiKB2DPE4oU+T1RElj3pVuYn1GaHGoORCVCiRd5qIQc6lcqhmDsK5z4tU6mQKBMByKJ wugw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=vSGBLKWfJS05gpLscpw3giDnRHhSelokYhLdWK0KSI0=; b=EmxcwVohBLn6WA7bNhEwOm+2XEvDalbZIBbOg6IIzf+KwBHoZqTXH2WB6TuLBefmv3 utSAFakBAzdsRfxYfc7onAVEESNrH4wLXVLQl9zw96S6RwkLifSlWhCL9jPgayCXGJLd HW4naQ/Fe5aG5O06kVK+K/FmOe9PQp+HlgwPEv7nZJfyboM3eAmnZN9lHKlD75F3t258 57q0Rb9exOiFPTQ6wWRQtQrbRflCGT6H7f3PyAqcm6Kd4yIlAUGuwHTXtk2X9vKHPCKG lF+uBf1Er7ML3o1LXqMHa8mBmxxkdTVEOfDt4UVXHhU034o58DYFTvznTpHc7boUV1Ez WjXg== X-Gm-Message-State: AJaThX5xvLdviSCX5XB1flrISizK23vMOH9v3DYSsbMTZW3Cq4sfeECT oUwUa5GgB53KERmJa5/E/GZm8wZX6Rut5sTYj6w= X-Google-Smtp-Source: AGs4zMZw/4hLUYJ+Yr1ukVDY3jHa7LE7R0AaScdP/tm0Ctbt8zTpYrpjuNL6sjKtnpB0gt76jgmyjVezlzQjm0FZRfw= X-Received: by 10.31.3.147 with SMTP id f19mr2438450vki.84.1511878397182; Tue, 28 Nov 2017 06:13:17 -0800 (PST) Original-Received: by 10.103.82.195 with HTTP; Tue, 28 Nov 2017 06:12:46 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400c:c05::229 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:220498 Archived-At: --001a11427978cec948055f0b9efc Content-Type: text/plain; charset="UTF-8" > > > Note that as long as the `setq` is within the magical > custom-autogenerated-user-settings form, it will behave correctly even > if the variable has a setter function. The difference will only affect > those users who take this code and then copy it elsewhere. > > > But setq doesn't have any concrete benefit other than familiarity to > people who don't understand custom. I've spent more time than I wish on > Freenode #emacs teaching people about custom. If c-s-v was used > consistently that effort would be made a lot easier. > The problem I have with c-s-v is that I don't see its benefits for configs like this: (use-package ido :bind ("C-b" . ido-switch-buffer) :init (setq ido-enable-flex-matching t) (setq ido-create-new-buffer 'always) (setq ido-use-url-at-point nil) (setq ido-use-filename-at-point nil) ;; Disable auto searching for files unless called explicitly (setq ido-auto-merge-delay-time 99999) ;; Avoid "size too big" errors (setq ido-max-directory-size 300000) ;; Always propose old buffers as well (setq ido-use-virtual-buffers nil) ;; Don't remember history (setq ido-enable-last-directory-history nil) :config (ido-mode t) (ido-everywhere t)) Can you maybe enlighten me about what problem c-s-v solves that would have me start to use it? Thanks, Philippe --001a11427978cec948055f0b9efc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Note that as long as the `setq` is within the magical
custom-autogenerated-user-settings form, it will behave correctly even=
if the variable has a setter function.=C2=A0 The difference will only affec= t
those users who take this code and then copy it elsewhere.

But setq= doesn't have any concrete benefit other than familiarity to people who= don't understand custom. I've spent more time than I wish on Freen= ode #emacs teaching people about custom. If c-s-v was used consistently tha= t effort would be made a lot easier.=C2=A0
The problem I have with c-s-v is that I don't see its benef= its for configs like this:

=
(use-package ido
=C2=A0 :b= ind ("C-b" . ido-switch-buffer)
=C2=A0 :init
<= div>=C2=A0 (setq ido-enable-flex-matching t)
=C2=A0 (setq ido-c= reate-new-buffer 'always)
=C2=A0 (setq ido-use-url-at-point= nil)
=C2=A0 (setq ido-use-filename-at-point nil)
<= br>
=C2=A0 ;; Disable auto searching for files unless called ex= plicitly
=C2=A0 (setq ido-auto-merge-delay-time 99999)
<= div>
=C2=A0 ;; Avoid "size too big" errors
<= /div>
=C2=A0 (setq ido-max-directory-size 300000)

<= div>=C2=A0 ;; Always propose old buffers as well
=C2=A0 (setq i= do-use-virtual-buffers nil)

=C2=A0 ;; Don'= t remember history
=C2=A0 (setq ido-enable-last-directory-histo= ry nil)
=C2=A0 :config
=C2=A0 (ido-mode t)
<= div>=C2=A0 (ido-everywhere t))

Can you m= aybe enlighten me about what problem c-s-v solves that would have me start = to use it?

Thanks,
Philippe
<= /div>
--001a11427978cec948055f0b9efc--