From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Newsgroups: gmane.emacs.devel Subject: Mechanisms to persist information (Re: Option to not automatically customize-save-variable `package-selected-packages') Date: Thu, 18 Feb 2016 13:25:49 -0500 Message-ID: <56C60CAD.3060308@gmail.com> References: <56C43D17.7010009@alice.it> <831t8aufoe.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PBudMce0V4odS2wJTAB417R00PBEGMBqR" X-Trace: ger.gmane.org 1455820116 17682 80.91.229.3 (18 Feb 2016 18:28:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Feb 2016 18:28:36 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 18 19:28:28 2016 Return-path: Envelope-to: ged-emacs-devel@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 1aWTJR-0006rV-LE for ged-emacs-devel@m.gmane.org; Thu, 18 Feb 2016 19:28:25 +0100 Original-Received: from localhost ([::1]:44207 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWTJQ-00067T-Vm for ged-emacs-devel@m.gmane.org; Thu, 18 Feb 2016 13:28:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWTH1-0002XU-Te for emacs-devel@gnu.org; Thu, 18 Feb 2016 13:25:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWTGy-0007sf-GD for emacs-devel@gnu.org; Thu, 18 Feb 2016 13:25:55 -0500 Original-Received: from mout.kundenserver.de ([212.227.126.130]:53413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWTGy-0007sY-5r for emacs-devel@gnu.org; Thu, 18 Feb 2016 13:25:52 -0500 Original-Received: from [18.26.2.123] ([18.26.2.123]) by mrelayeu.kundenserver.de (mreue003) with ESMTPSA (Nemesis) id 0M1TP3-1ZiLcl3yGH-00tVe5 for ; Thu, 18 Feb 2016 19:25:51 +0100 X-Enigmail-Draft-Status: N1110 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 In-Reply-To: <831t8aufoe.fsf@gnu.org> X-Provags-ID: V03:K0:DW70hOCPWl58pzaHJlqbYYa34HilrO7kJu1yYYAfdQ6cMTfM3mx 9XBCRVO/Iakkitg0RRVn5Ysr9dmYP6MT0/D79gvQwyLIDhD66N3NoQZK7dAupP2YKoHI4n/ mx4MPYDBNxtdgsQf7uXP8zigfwB2/MblH3HDOd2t403YGXFqBDYtCj1JIw7/Dn3+z6aIsS+ AhFVfuIZqxrveRnBwSbJg== X-UI-Out-Filterresults: notjunk:1;V01:K0:OEf5FPYKlCo=:yMHNJwjuVpQpP+OUdCV/Ab CA16osgtnHM++f1KBzmXgBSgsqeYxGsjOT232r9Y/zSmA9sJ6Hx+E3GjFPMyN+Slx74fB0+xW FdmVoPH9OEQEq+ZnMj1imTWk4Uq6Btt27QXHzfcDWzd9TDHkC8qP8MMDHehyI9RGMTz/yk0uR MfWbOCKpQH1/rEePCysnzW0MHnuXDeF1RiVo26Q3YxnSVm6JH7BTodMW6OSeLnk6ZIDdZrG6s kjK7cWB/us95CwsZfEAsyGh3TRps57A9kCh/nruNAEFocMJueQVC3YmTilpWsF969LipcAVXb l/9QNHTkS+kuKjFouyLKqsACkzv9G3meZlnNkaKVwR08uiu9hfoyiXRqtpFovyH5f+JpwsDXH 4260rpDVAUzPv662sCjJFQAoiMkbUXDYylQZ1LkH49UVUeSO5yjosy/2vfzE0b11vwgyBuyqg MxSIZsiWVHMPjR3/MwCSFucufa2mQ6nYMA0Y6UwSHZeeJy2YFgHl9UXcyMgjDSXo4l5fijYzT lv9XQ/RrrUY9DMPn2FJnqG1gmL05JZHOnm/sU9huA6h12QpW4Fc9c60EEAoO/JLvhwHac93BK gwt0hRX51oEyFoSZ5bWwnb8pqq/qLtVFlKsAN7aXfHtjInNUZz+VqI2u3Mao4ew7xP0KNrItH pIB8wBGp7y3g9BL7Qo9iCTzIrZbmkYR/844aIjxfLQf7K7piL7bjBqnkKXaV5iWbPM08= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.130 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:200144 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PBudMce0V4odS2wJTAB417R00PBEGMBqR Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 02/18/2016 11:49 AM, Eli Zaretskii wrote: > This seems to be a general complaint about package.el using Custom to > save the data about installed packages. I see no arguments as to why > it's wrong to use Custom for that. After all, Custom is our standard > way of saving customizations, so it could be argued that having a > single mechanism through which to control where they are saved is > better than inventing a separate mechanism just for package.el. One thing that I would find convenient as a package developer is a notion= of package-local storage. Right now, if I (as a package developer) want = to persist information between Emacs sessions, I can either: * Save the customization through Custom * Create my own file in user-emacs-directory The first one is unsuitable for persisted information that shouldn't be p= resented to the user (for example, if my package collects statistics, I d= on't want to change the custom file constantly and add large amounts of d= ata to it). The second one in not uniform across packages, and forces me = to invent my own storage format (some packages store a lisp form, other s= tore a series of command that are just executed upon loading the file (vi= per, history), others use json or csv-like formats (as was suggested for = package.el)). In both cases, removing a package won't remove the storage that it uses (= either in Custom or in separate files in .emacs.d). This is especially pr= oblematic when trying out packages: I launch a package to try it out, it = initializes its backing store (often with a file, sometimes with an entry= in custom-set-variables), then I remove it (if I don't like it), and yet= the backing store is not removed. Take viper as an example (though viper= is bundled with Emacs right now): launching it and allowing it to persis= t its settings creates a file ~/.emacs.d/viper. It would be nice to have a uniform way to persist package-specific inform= ation; ideally one that would collaborate with package.el, so that removi= ng a package would remove its stored state. One would need to figure out = how to handle settings persisted through custom as well, but a simple key= -value store that plays well with package.el would be a great start. Cl=E9ment. --PBudMce0V4odS2wJTAB417R00PBEGMBqR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJWxgyuAAoJEPqg+cTm90wjD3MP/ixsRNLC29H25zXurQRBKd0R Rkx/jjf2GfIFwOyRGDYeAzNsRoDsEbG8yImqQp0V4qhMVE1CzJHtJ2GctcnztvI8 9o+JzO7JzxvxiPqBHAFnSQ5fEDVEpmk44m5l5qMrQ4aZpSPRnOAfaL6C7l43o8lW 7s8iSZybxgxb+L6Ytvl8yjIztAB3SWEOIZB9KF6MYSS39R8hjU+RyAkcUIIE78tB qgkjyJp6tNaBiaoQNvRMpeeUYG6m1n5Ibix4YKr3RQ+BeU+kM7eF5gPBx743o7Ar jwpfu+/Hwbj90RSN+3UXMOxBY6QVMQVjACiPYNE7QD1OMGJWqsNIwXXHp10g1tKi vB35V5Jlq2vA/QXbs8sJ5wR3cnUbBhdf/D0z0gwW2SowW06gFBDtBxRJWn9OmV0B MzEAz3MEzOcteEYGIx5k/J4sxRITBKMgyHNNCZqDPPpirSUqYAFg45hhs5ybz4EB 1N8W/cDPlGIFjGichOeqDIXKcl69PT67L4xmSTPxf4hsaE6U8Civ6RoGuHrC6E7g FEraepuf7EyyMJNu1dCSgqa+rzEY4okkDtJfZWA39eNI2e6ZpyOXVwQPadALpwVo TPp3c6Skp2AH/RE5cYHaRB3OH37qiA3FiLJ+tkNcCQXlTLp2mvHCHAE8JZ4CJfkx L4HdM1pZwuh4kGBJnxux =KpnZ -----END PGP SIGNATURE----- --PBudMce0V4odS2wJTAB417R00PBEGMBqR--