From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: custom-set-variables considered harmful Date: Fri, 24 Nov 2017 12:37:45 -0500 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1511545110 7693 195.159.176.226 (24 Nov 2017 17:38:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 24 Nov 2017 17:38:30 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 24 18:38:27 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 1eIHvj-0001az-9q for ged-emacs-devel@m.gmane.org; Fri, 24 Nov 2017 18:38:23 +0100 Original-Received: from localhost ([::1]:50499 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIHvq-0003vy-P0 for ged-emacs-devel@m.gmane.org; Fri, 24 Nov 2017 12:38:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIHvA-0003tx-SR for emacs-devel@gnu.org; Fri, 24 Nov 2017 12:37:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIHvA-0006xZ-24 for emacs-devel@gnu.org; Fri, 24 Nov 2017 12:37:48 -0500 Original-Received: from mail-qt0-x234.google.com ([2607:f8b0:400d:c0d::234]:37108) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eIHv9-0006vG-Tv for emacs-devel@gnu.org; Fri, 24 Nov 2017 12:37:47 -0500 Original-Received: by mail-qt0-x234.google.com with SMTP id d15so32182409qte.4 for ; Fri, 24 Nov 2017 09:37:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=UxGydt6XLyg/8b/vNEuVQwr6xtWY4RAMy/dwfamqNeI=; b=j02qWb/uoXsosZiCGJE5iHz+qAc4wU6ugsXiEXhO7KfxgZ2ZPTVPrklgRxvlpe5VwE xiAyYrikfuviwElQ7wbT5FKGx/2OoyJCRajuwXsRuiLrqtml74FeshzDpvtiGrg0fclZ GSjJerTJSnW1LgOIW7AUtBYKcUePtaZp+4G7KV9Cg8HgNQKQSQJ7q1KflHGx5XMAL4sU u7+NBnQQFpmvh46qsIQ1FBjMdZqXlaA0RgB2RnwLvYqsIxA2A1W/MSHEoaSOaoZ7RzqD vmEpXh85GV6zFhNrymkXq2nv+0F9U/ANaBSunj8Lwz85vvvszQhxmO5dxzPwiaRBU2H/ uqfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UxGydt6XLyg/8b/vNEuVQwr6xtWY4RAMy/dwfamqNeI=; b=be1D5hx4zg1A4ruqw3I+BnjckKRoQ+L+fMgzkSCqWbsvaiO/lBB7Kox0ilMKuj0SLb ov5riQIZG342Qsj8+3aa7A52YcKEPBfpPabp34kLrQH20hK5YyNvc0ra4fY28i4XDSoJ /f0MXkqVmgPJddKIbGlDYeg849jEximgp7BNxwErolrOHS2K+vl0os/ZUiaLiwI4l+ez rAcqqPybxW7T5nHhPfqRUOqZOiFiVk/uBytmL7EbsZaq7rMz537j1X2BhpCAJ36RY6mC nWjaloXTaM6KPQg99AMhuxHbNEmT+AsOkaNPRZ51QbUVDVcj33MLyLdINSs6Xka2/2tO ZiKw== X-Gm-Message-State: AJaThX7M1Ma9gBiClJHXas4OP8DAm1ots7wh2KhmMvXKwgvqSQCB50ED olHRC3qih9rrytmfhXrMI2y7U0Lh X-Google-Smtp-Source: AGs4zMbzK+aKsuXJ9WKPCUEfNwsa3w2Cd9fp3cPj9vTodBGtjZ3foqqpw4joO1VrhO7xTsiWpPrc5g== X-Received: by 10.200.16.136 with SMTP id a8mr14836793qtj.177.1511545066983; Fri, 24 Nov 2017 09:37:46 -0800 (PST) Original-Received: from ?IPv6:2601:184:4180:66e7:b8ad:a073:3ec6:b0b8? ([2601:184:4180:66e7:b8ad:a073:3ec6:b0b8]) by smtp.gmail.com with ESMTPSA id o26sm15560932qto.16.2017.11.24.09.37.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Nov 2017 09:37:46 -0800 (PST) In-Reply-To: Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::234 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:220433 Archived-At: On 2017-11-24 02:16, Stefan Monnier wrote: >> Is there a particular reson you're not using ‘customize-set-variable’ >> for all values? > > Because I want the code to look as much as possible like "manually > written Elisp", and `setq` is what is used in 99% of the Elisp > customization code. I think that's a bug, though — multiple packages of mine have specific code to deal with this (users using setq instead of customize-set-variable). >> It would be more consistent, and also avoid problems >> in case a package is changed and a setter function is added to >> a variable which previously did not use it. > > 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. I like the direction of this patch very much, but I'm not a fan of this: it seems too error-prone. It'd be much better if copying from the special form was safe (at least in the vast majority of cases). > The difference will only affect > those users who take this code and then copy it elsewhere. But isn't one of the selling points of this patch to make copying easier? Thanks, Clément.