[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mechanisms to persist information
From: |
Eli Zaretskii |
Subject: |
Re: Mechanisms to persist information |
Date: |
Thu, 18 Feb 2016 20:54:48 +0200 |
> From: Clément Pit--Claudel <address@hidden>
> 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.
- Re: Option to not automatically customize-save-variable `package-selected-packages', (continued)
- Re: Option to not automatically customize-save-variable `package-selected-packages', Eli Zaretskii, 2016/02/19
- Re: Option to not automatically customize-save-variable `package-selected-packages', Artur Malabarba, 2016/02/19
- Re: Option to not automatically customize-save-variable `package-selected-packages', Eli Zaretskii, 2016/02/19
- Re: Option to not automatically customize-save-variable `package-selected-packages', Kaushal Modi, 2016/02/19
- Re: Option to not automatically customize-save-variable `package-selected-packages', Eli Zaretskii, 2016/02/19
- Re: Option to not automatically customize-save-variable `package-selected-packages', alex, 2016/02/18
- Re: Option to not automatically customize-save-variable `package-selected-packages', Eli Zaretskii, 2016/02/19
- Re: Option to not automatically customize-save-variable `package-selected-packages', alex, 2016/02/19
- Re: Option to not automatically customize-save-variable `package-selected-packages', Eli Zaretskii, 2016/02/20
- Mechanisms to persist information (Re: Option to not automatically customize-save-variable `package-selected-packages'), Clément Pit--Claudel, 2016/02/18
- Re: Mechanisms to persist information,
Eli Zaretskii <=
- Re: Mechanisms to persist information, Jonathan Leech-Pepin, 2016/02/18
- Re: Mechanisms to persist information (Re: Option to not automatically customize-save-variable `package-selected-packages'), John Wiegley, 2016/02/19
- Re: Mechanisms to persist information (Re: Option to not automatically customize-save-variable `package-selected-packages'), Eric Abrahamsen, 2016/02/19
- Re: Option to not automatically customize-save-variable `package-selected-packages', John Wiegley, 2016/02/18
- Re: Option to not automatically customize-save-variable `package-selected-packages', alex, 2016/02/18
- Message not available
- Re: Option to not automatically customize-save-variable `package-selected-packages', Eli Zaretskii, 2016/02/19
- Re: Option to not automatically customize-save-variable `package-selected-packages', alex, 2016/02/19
- Re: Option to not automatically customize-save-variable `package-selected-packages', Eli Zaretskii, 2016/02/20
Re: Option to not automatically customize-save-variable `package-selected-packages', raman, 2016/02/18