From: Eli Zaretskii <eliz@gnu.org>
To: "Clément Pit--Claudel" <clement.pit@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Mechanisms to persist information
Date: Thu, 18 Feb 2016 20:54:48 +0200 [thread overview]
Message-ID: <83d1rtu9vr.fsf@gnu.org> (raw)
In-Reply-To: <56C60CAD.3060308@gmail.com> (message from Clément Pit--Claudel on Thu, 18 Feb 2016 13:25:49 -0500)
> From: Clément Pit--Claudel <clement.pit@gmail.com>
> Date: Thu, 18 Feb 2016 13:25:49 -0500
>
> One thing that I would find convenient as a package developer is a notion of package-local storage.
We will find a lot of missing infrastructure as we begin using
package.el more and more. This is just the tip of the iceberg.
FWIW, I think we should first design the package system we want to
support, and only after that talk about stuff like saving
package-specific settings. But I have no illusions that this will be
accepted, or that the discussions will indeed be deferred.
> * 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 presented to the user (for example, if my package collects statistics, I don't want to change the custom file constantly and add large amounts of data 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 store a series of command that are just executed upon loading the file (viper, history), others use json or csv-like formats (as was suggested for package.el)).
Personally, I see nothing wrong with each package using its own
storage format. We don't require package authors to use the same
coding style and the same abstractions, so why should storage be any
different?
> 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 problematic 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 persist its settings creates a file ~/.emacs.d/viper.
>
> It would be nice to have a uniform way to persist package-specific information; ideally one that would collaborate with package.el, so that removing 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.
Removing auxiliary files doesn't require those files to be in the same
format, it can be solved by having each package produce a record of
those files that the manager can use to delete them.
next prev parent reply other threads:[~2016-02-18 18:54 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-17 9:27 Option to not automatically customize-save-variable `package-selected-packages' Angelo Graziosi
2016-02-17 23:05 ` John Wiegley
2016-02-18 1:04 ` Angelo Graziosi
2016-02-18 1:43 ` Artur Malabarba
2016-02-18 16:49 ` Eli Zaretskii
2016-02-18 17:28 ` Colin Baxter
2016-02-18 17:35 ` Kaushal Modi
2016-02-18 18:06 ` Artur Malabarba
2016-02-18 18:15 ` Eli Zaretskii
2016-02-18 20:34 ` Joost Kremers
2016-02-18 21:00 ` Eli Zaretskii
2016-02-18 21:49 ` Joost Kremers
2016-02-19 9:31 ` Eli Zaretskii
2016-02-19 9:47 ` Angelo Graziosi
2016-02-19 13:04 ` Artur Malabarba
2016-02-19 15:50 ` Eli Zaretskii
2016-02-19 18:29 ` Artur Malabarba
2016-02-19 18:50 ` Eli Zaretskii
2016-02-19 19:05 ` Kaushal Modi
2016-02-19 20:34 ` Eli Zaretskii
2016-02-21 23:56 ` Joost Kremers
2016-02-22 0:10 ` John Wiegley
2016-02-22 3:37 ` Eli Zaretskii
2016-02-22 21:00 ` Bastian Beischer
2016-02-19 4:18 ` alex
2016-02-19 9:48 ` Eli Zaretskii
2016-02-19 21:15 ` alex
2016-02-20 7:53 ` Eli Zaretskii
2016-02-18 18:25 ` Mechanisms to persist information (Re: Option to not automatically customize-save-variable `package-selected-packages') Clément Pit--Claudel
2016-02-18 18:54 ` Eli Zaretskii [this message]
2016-02-18 19:22 ` Mechanisms to persist information Jonathan Leech-Pepin
2016-02-20 2:17 ` Mechanisms to persist information (Re: Option to not automatically customize-save-variable `package-selected-packages') John Wiegley
2016-02-20 4:44 ` Eric Abrahamsen
2016-02-18 18:45 ` Option to not automatically customize-save-variable `package-selected-packages' John Wiegley
2016-02-19 4:17 ` alex
[not found] ` <vYxebPyde_BnqKsA6mXLVX-_dj3rDIchNBYl3O1LxNhGCR7etgi0R4ZR7de5PU1TZXk9R4YsCjNxqkoh5lBR3Q==@protonmail.com>
2016-02-19 9:47 ` Eli Zaretskii
2016-02-19 22:55 ` alex
2016-02-20 8:27 ` Eli Zaretskii
2016-03-05 0:40 ` alex
2016-02-18 16:19 ` raman
2016-02-18 18:55 ` Angelo Graziosi
2016-02-18 19:00 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83d1rtu9vr.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=clement.pit@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).