unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#48543: Feature request: put ELN cache in $XDG_CACHE_HOME by default
@ 2021-05-20 17:25 Clément Pit-Claudel
  2022-07-13 12:08 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Clément Pit-Claudel @ 2021-05-20 17:25 UTC (permalink / raw)
  To: 48543

Hi all,

By default the eln cache is stored in .emacs.d/eln-cache.  Would it make sense to store it in $XDG_CACHE_HOME/emacs/eln by default on platforms that obey the XDG spec?

I came across this because my backup scripts already exclude $XDG_CACHE_HOME, but didn't exclude .emacs.d/eln-cache, so I found myself backing up hundreds of megabytes of ELN files.

In a related Reddit discussion, https://www.reddit.com/r/emacs/comments/mltaie/gccemacs_how_to_permanently_change_where_elncache , Steve Purcell wrote:

> Now that emacs honours xdg settings for finding its own config, might it make sense for the eln cache to move to the xdg cache directory?

And Eli Zaretskii responded:

> I don't think so, personally: the XDG spec says the XDG cache directory should hold "user-specific non-essential (cached) data files". The *.eln files don't fit that description: the user would like the files to persist.
>
> That said, feel free to submit a feature-request bug report about this, and let's see what others think about this.

FWIW, I had a quick look through my .cache folder, and it seems that chromium and Firefox both put compiled code in that folder (JS bytecode and compiled Webassembly files).






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#48543: Feature request: put ELN cache in $XDG_CACHE_HOME by default
  2021-05-20 17:25 bug#48543: Feature request: put ELN cache in $XDG_CACHE_HOME by default Clément Pit-Claudel
@ 2022-07-13 12:08 ` Lars Ingebrigtsen
  2022-07-13 12:42   ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2022-07-13 12:08 UTC (permalink / raw)
  To: Clément Pit-Claudel; +Cc: 48543, Andrea Corallo

Clément Pit-Claudel <cpitclaudel@gmail.com> writes:

> By default the eln cache is stored in .emacs.d/eln-cache.  Would it
> make sense to store it in $XDG_CACHE_HOME/emacs/eln by default on
> platforms that obey the XDG spec?

I think that makes sense.  Perhaps Andrea has some comments; added to
the CCs.

> And Eli Zaretskii responded:
>
>> I don't think so, personally: the XDG spec says the XDG cache
>> directory should hold "user-specific non-essential (cached) data
>> files". The *.eln files don't fit that description: the user would
>> like the files to persist.
>>
>> That said, feel free to submit a feature-request bug report about
>> this, and let's see what others think about this.
>
> FWIW, I had a quick look through my .cache folder, and it seems that
> chromium and Firefox both put compiled code in that folder (JS
> bytecode and compiled Webassembly files).

Since the .eln files are cached data, it seems like the right place to
put them.  Of course the user would like all (non-stale) cached data to
persist.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#48543: Feature request: put ELN cache in $XDG_CACHE_HOME by default
  2022-07-13 12:08 ` Lars Ingebrigtsen
@ 2022-07-13 12:42   ` Eli Zaretskii
  2022-07-13 12:45     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2022-07-13 12:42 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 48543, cpitclaudel, akrl

> Cc: 48543@debbugs.gnu.org, Andrea Corallo <akrl@sdf.org>
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Wed, 13 Jul 2022 14:08:56 +0200
> 
> >> I don't think so, personally: the XDG spec says the XDG cache
> >> directory should hold "user-specific non-essential (cached) data
> >> files". The *.eln files don't fit that description: the user would
> >> like the files to persist.
> >>
> >> That said, feel free to submit a feature-request bug report about
> >> this, and let's see what others think about this.
> >
> > FWIW, I had a quick look through my .cache folder, and it seems that
> > chromium and Firefox both put compiled code in that folder (JS
> > bytecode and compiled Webassembly files).
> 
> Since the .eln files are cached data, it seems like the right place to
> put them.  Of course the user would like all (non-stale) cached data to
> persist.

So we prefer to hear more complaints about Emacs being slow to start
because the eln-cache was purged?  Don't forget that the XDG
directories can disappear without a warning.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#48543: Feature request: put ELN cache in $XDG_CACHE_HOME by default
  2022-07-13 12:42   ` Eli Zaretskii
@ 2022-07-13 12:45     ` Lars Ingebrigtsen
  2022-07-13 13:09       ` Visuwesh
  2022-07-13 13:40       ` Andrea Corallo
  0 siblings, 2 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2022-07-13 12:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 48543, cpitclaudel, akrl

Eli Zaretskii <eliz@gnu.org> writes:

>> > FWIW, I had a quick look through my .cache folder, and it seems that
>> > chromium and Firefox both put compiled code in that folder (JS
>> > bytecode and compiled Webassembly files).
>> 
>> Since the .eln files are cached data, it seems like the right place to
>> put them.  Of course the user would like all (non-stale) cached data to
>> persist.
>
> So we prefer to hear more complaints about Emacs being slow to start
> because the eln-cache was purged?  Don't forget that the XDG
> directories can disappear without a warning.

This doesn't seem to worry the Chromium etc people, so I don't think it
should worry us.  

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#48543: Feature request: put ELN cache in $XDG_CACHE_HOME by default
  2022-07-13 12:45     ` Lars Ingebrigtsen
@ 2022-07-13 13:09       ` Visuwesh
  2022-07-13 14:01         ` Stefan Kangas
  2022-07-13 13:40       ` Andrea Corallo
  1 sibling, 1 reply; 7+ messages in thread
From: Visuwesh @ 2022-07-13 13:09 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 48543, Eli Zaretskii, cpitclaudel, akrl

[புதன் ஜூலை 13, 2022] Lars Ingebrigtsen wrote:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> > FWIW, I had a quick look through my .cache folder, and it seems that
>>> > chromium and Firefox both put compiled code in that folder (JS
>>> > bytecode and compiled Webassembly files).
>>> 
>>> Since the .eln files are cached data, it seems like the right place to
>>> put them.  Of course the user would like all (non-stale) cached data to
>>> persist.
>>
>> So we prefer to hear more complaints about Emacs being slow to start
>> because the eln-cache was purged?  Don't forget that the XDG
>> directories can disappear without a warning.
>
> This doesn't seem to worry the Chromium etc people, so I don't think it
> should worry us.  

Why not use XDG_DATA_HOME in that case?  It doesn't get cleared I think.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#48543: Feature request: put ELN cache in $XDG_CACHE_HOME by default
  2022-07-13 12:45     ` Lars Ingebrigtsen
  2022-07-13 13:09       ` Visuwesh
@ 2022-07-13 13:40       ` Andrea Corallo
  1 sibling, 0 replies; 7+ messages in thread
From: Andrea Corallo @ 2022-07-13 13:40 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 48543, Eli Zaretskii, cpitclaudel

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> > FWIW, I had a quick look through my .cache folder, and it seems that
>>> > chromium and Firefox both put compiled code in that folder (JS
>>> > bytecode and compiled Webassembly files).
>>> 
>>> Since the .eln files are cached data, it seems like the right place to
>>> put them.  Of course the user would like all (non-stale) cached data to
>>> persist.
>>
>> So we prefer to hear more complaints about Emacs being slow to start
>> because the eln-cache was purged?  Don't forget that the XDG
>> directories can disappear without a warning.
>
> This doesn't seem to worry the Chromium etc people, so I don't think it
> should worry us.  

Hi Lars,

thanks for adding me in Cc.

Browser speed is tipically dominated by the internet/web server
bandwidth and it's therfore very variable.  Users will hardly notice if
a page loads slower because the cache was removed and complain, this is
indeed not the case for Emacs as program.

Also given the XDG spec definition I'm not sure this move would be the
right thing.

Best Regards

  Andrea





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#48543: Feature request: put ELN cache in $XDG_CACHE_HOME by default
  2022-07-13 13:09       ` Visuwesh
@ 2022-07-13 14:01         ` Stefan Kangas
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Kangas @ 2022-07-13 14:01 UTC (permalink / raw)
  To: Visuwesh, Lars Ingebrigtsen; +Cc: 48543, Eli Zaretskii, cpitclaudel, akrl

Visuwesh <visuweshm@gmail.com> writes:

> Why not use XDG_DATA_HOME in that case?

I realize that the XDG Base Directory Specification could be more clear
on these details, but I believe that a study of the current practices as
well as previous discussions on e.g. the XDG mailing list, in Debian,
Arch and so on, would lead to the conclusion that this would be wrong.

It is generally understood that XDG_DATA_HOME is roughly analogus to
/usr/share and XDG_CACHE_HOME is roughly analogous to /var/cache -- one
is volatile, the other one is not.

For starters, please compare the contents of ~/.local/share with
~/.cache on your machine to see what other software puts where.

Next, to understand how these issues are often approached, I invite you
to study references such as:

    https://wiki.debian.org/XDGBaseDirectorySpecification
    https://wiki.archlinux.org/title/XDG_Base_Directory
    https://wiki.gnome.org/action/show/Initiatives/GnomeGoals/XDGConfigFolders
    https://bugzilla.mozilla.org/show_bug.cgi?id=259356

There are more to find obviously, but that should be plenty to get the
discussion started.

> It doesn't get cleared I think.

AFAIK, $XDG_CACHE_HOME also doesn't "get cleared" arbitrarily.  There
has to be some action on behalf of the user for that to happen.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-07-13 14:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 17:25 bug#48543: Feature request: put ELN cache in $XDG_CACHE_HOME by default Clément Pit-Claudel
2022-07-13 12:08 ` Lars Ingebrigtsen
2022-07-13 12:42   ` Eli Zaretskii
2022-07-13 12:45     ` Lars Ingebrigtsen
2022-07-13 13:09       ` Visuwesh
2022-07-13 14:01         ` Stefan Kangas
2022-07-13 13:40       ` Andrea Corallo

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).