unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* emacs in ~/.cache
@ 2023-08-13 12:17 Colin Baxter
  2023-08-13 12:24 ` Eli Zaretskii
  2023-08-13 13:52 ` Michael Albinus
  0 siblings, 2 replies; 12+ messages in thread
From: Colin Baxter @ 2023-08-13 12:17 UTC (permalink / raw)
  To: help-gnu-emacs


I've noticed that emacs now puts a directory into ~/.cache. This is in
Debian but I assume emacs in other systems are behave the same. I think
that ~/.cache/emacs is fairly new, perhaps beginning emacs-28, but I am
not certain.

I have never seen ~/.cache/emacs populated with anything, so what is its
purpose?

Colin Baxter.




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

* Re: emacs in ~/.cache
  2023-08-13 12:17 emacs in ~/.cache Colin Baxter
@ 2023-08-13 12:24 ` Eli Zaretskii
  2023-08-13 15:43   ` Colin Baxter
  2023-08-13 16:16   ` Sven Joachim
  2023-08-13 13:52 ` Michael Albinus
  1 sibling, 2 replies; 12+ messages in thread
From: Eli Zaretskii @ 2023-08-13 12:24 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Colin Baxter <m43cap@yandex.com>
> Date: Sun, 13 Aug 2023 13:17:25 +0100
> 
> 
> I've noticed that emacs now puts a directory into ~/.cache. This is in
> Debian but I assume emacs in other systems are behave the same. I think
> that ~/.cache/emacs is fairly new, perhaps beginning emacs-28, but I am
> not certain.
> 
> I have never seen ~/.cache/emacs populated with anything, so what is its
> purpose?

Some distros insist on putting the *.eln files in XDG_CACHE_DIR, which
defaults to ~/.cache.  I guess Debian is one of them.  Too bad
(IMNSHO), but they cannot be bothered.



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

* Re: emacs in ~/.cache
  2023-08-13 12:17 emacs in ~/.cache Colin Baxter
  2023-08-13 12:24 ` Eli Zaretskii
@ 2023-08-13 13:52 ` Michael Albinus
  2023-08-13 15:38   ` Colin Baxter
  2023-08-19 21:56   ` Emanuel Berg
  1 sibling, 2 replies; 12+ messages in thread
From: Michael Albinus @ 2023-08-13 13:52 UTC (permalink / raw)
  To: Colin Baxter; +Cc: help-gnu-emacs

Colin Baxter <m43cap@yandex.com> writes:

Hi,

> I've noticed that emacs now puts a directory into ~/.cache. This is in
> Debian but I assume emacs in other systems are behave the same. I think
> that ~/.cache/emacs is fairly new, perhaps beginning emacs-28, but I am
> not certain.
>
> I have never seen ~/.cache/emacs populated with anything, so what is its
> purpose?

Tramp 2.7 (of Emacs 30) uses ~/.cache/emacs as temporary directory, if
possible. The reason are security considerations.

> Colin Baxter.

Best regards, Michael.



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

* Re: emacs in ~/.cache
  2023-08-13 13:52 ` Michael Albinus
@ 2023-08-13 15:38   ` Colin Baxter
  2023-08-13 16:13     ` Michael Albinus
  2023-08-19 21:56   ` Emanuel Berg
  1 sibling, 1 reply; 12+ messages in thread
From: Colin Baxter @ 2023-08-13 15:38 UTC (permalink / raw)
  To: Michael Albinus; +Cc: help-gnu-emacs

>>>>> Michael Albinus <michael.albinus@gmx.de> writes:

    > Colin Baxter <m43cap@yandex.com> writes: Hi,

    >> I've noticed that emacs now puts a directory into ~/.cache. This
    >> is in Debian but I assume emacs in other systems are behave the
    >> same. I think that ~/.cache/emacs is fairly new, perhaps
    >> beginning emacs-28, but I am not certain.
    >> 
    >> I have never seen ~/.cache/emacs populated with anything, so what
    >> is its purpose?

    > Tramp 2.7 (of Emacs 30) uses ~/.cache/emacs as temporary
    > directory, if possible. The reason are security considerations.

I have

--8<---------------cut here---------------start------------->8---

(setq tramp-auto-save-directory "$HOME/.emacs.d/tmp")
(setq temporary-file-directory "$HOME/.emacs.d/tmp")

--8<---------------cut here---------------end--------------->8---

Presumably that's ok, as far as tramp is concerned?

Colin.



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

* Re: emacs in ~/.cache
  2023-08-13 12:24 ` Eli Zaretskii
@ 2023-08-13 15:43   ` Colin Baxter
  2023-08-13 16:18     ` Eli Zaretskii
  2023-08-13 16:16   ` Sven Joachim
  1 sibling, 1 reply; 12+ messages in thread
From: Colin Baxter @ 2023-08-13 15:43 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Eli Zaretskii <eliz@gnu.org> writes:

    >> From: Colin Baxter <m43cap@yandex.com> Date: Sun, 13 Aug 2023
    >> 13:17:25 +0100
    >> 
    >> 
    >> I've noticed that emacs now puts a directory into ~/.cache. This
    >> is in Debian but I assume emacs in other systems are behave the
    >> same. I think that ~/.cache/emacs is fairly new, perhaps
    >> beginning emacs-28, but I am not certain.
    >> 
    >> I have never seen ~/.cache/emacs populated with anything, so what
    >> is its purpose?

    > Some distros insist on putting the *.eln files in XDG_CACHE_DIR,
    > which defaults to ~/.cache.  I guess Debian is one of them.  Too
    > bad (IMNSHO), but they cannot be bothered.

Thanks for the information. I never compile emacs with
native-compilation enabled. But if I did then I don't think I'd want the
.eln files anywhere near $HOME/.cache, which gets deleted on my system
every re-boot.

Colin.




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

* Re: emacs in ~/.cache
  2023-08-13 15:38   ` Colin Baxter
@ 2023-08-13 16:13     ` Michael Albinus
  2023-08-13 17:42       ` Colin Baxter
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Albinus @ 2023-08-13 16:13 UTC (permalink / raw)
  To: Colin Baxter; +Cc: help-gnu-emacs

Colin Baxter <m43cap@yandex.com> writes:

Hi Colin,

> I have
>
> (setq tramp-auto-save-directory "$HOME/.emacs.d/tmp")
> (setq temporary-file-directory "$HOME/.emacs.d/tmp")
>
> Presumably that's ok, as far as tramp is concerned?

For Tramp's business, you need to set also
tramp-compat-temporary-file-directory.

> Colin.

Best regards, Michael.



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

* Re: emacs in ~/.cache
  2023-08-13 12:24 ` Eli Zaretskii
  2023-08-13 15:43   ` Colin Baxter
@ 2023-08-13 16:16   ` Sven Joachim
  1 sibling, 0 replies; 12+ messages in thread
From: Sven Joachim @ 2023-08-13 16:16 UTC (permalink / raw)
  To: help-gnu-emacs

On 2023-08-13 15:24 +0300, Eli Zaretskii wrote:

>> From: Colin Baxter <m43cap@yandex.com>
>> Date: Sun, 13 Aug 2023 13:17:25 +0100
>>
>>
>> I've noticed that emacs now puts a directory into ~/.cache. This is in
>> Debian but I assume emacs in other systems are behave the same. I think
>> that ~/.cache/emacs is fairly new, perhaps beginning emacs-28, but I am
>> not certain.
>>
>> I have never seen ~/.cache/emacs populated with anything, so what is its
>> purpose?
>
> Some distros insist on putting the *.eln files in XDG_CACHE_DIR, which
> defaults to ~/.cache.  I guess Debian is one of them.

Well, that guess was wrong.  The *.eln files are put into
~/.emacs.d/eln-cache.

> Too bad (IMNSHO), but they cannot be bothered.

You have certainly no obligation whatsoever to contact the Debian Emacs
maintainers, but please do not discourage others from doing so if they
have Debian-specific problems.

Cheers,
       Sven



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

* Re: emacs in ~/.cache
  2023-08-13 15:43   ` Colin Baxter
@ 2023-08-13 16:18     ` Eli Zaretskii
  0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2023-08-13 16:18 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Colin Baxter <m43cap@yandex.com>
> Date: Sun, 13 Aug 2023 16:43:21 +0100
> 
> >>>>> Eli Zaretskii <eliz@gnu.org> writes:
> 
>     > Some distros insist on putting the *.eln files in XDG_CACHE_DIR,
>     > which defaults to ~/.cache.  I guess Debian is one of them.  Too
>     > bad (IMNSHO), but they cannot be bothered.
> 
> Thanks for the information. I never compile emacs with
> native-compilation enabled. But if I did then I don't think I'd want the
> .eln files anywhere near $HOME/.cache, which gets deleted on my system
> every re-boot.

Exactly my point.



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

* Re: emacs in ~/.cache
  2023-08-13 16:13     ` Michael Albinus
@ 2023-08-13 17:42       ` Colin Baxter
  0 siblings, 0 replies; 12+ messages in thread
From: Colin Baxter @ 2023-08-13 17:42 UTC (permalink / raw)
  To: Michael Albinus; +Cc: help-gnu-emacs

>>>>> Michael Albinus <michael.albinus@gmx.de> writes:

    > Colin Baxter <m43cap@yandex.com> writes: Hi Colin,

    >> I have
    >> 
    >> (setq tramp-auto-save-directory "$HOME/.emacs.d/tmp") (setq
    >> temporary-file-directory "$HOME/.emacs.d/tmp")
    >> 
    >> Presumably that's ok, as far as tramp is concerned?

    > For Tramp's business, you need to set also
    > tramp-compat-temporary-file-directory.

Thanks. I'll set that to $HOME/.emacs.d/tmp too.

Best wishes,

Colin Baxter.



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

* Re: emacs in ~/.cache
  2023-08-13 13:52 ` Michael Albinus
  2023-08-13 15:38   ` Colin Baxter
@ 2023-08-19 21:56   ` Emanuel Berg
  2023-08-22 15:45     ` Michael Albinus
  1 sibling, 1 reply; 12+ messages in thread
From: Emanuel Berg @ 2023-08-19 21:56 UTC (permalink / raw)
  To: help-gnu-emacs

Michael Albinus wrote:

>> I have never seen ~/.cache/emacs populated with anything,
>> so what is its purpose?
>
> Tramp 2.7 (of Emacs 30) uses ~/.cache/emacs as temporary
> directory, if possible. The reason are
> security considerations.

I have a Tramp socket file there on Debian, it is the
only file.

It gets more secure that way?

What happens if you remove that directory, will it still work
the next time, just a similar file has to be created first
before use?

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: emacs in ~/.cache
  2023-08-19 21:56   ` Emanuel Berg
@ 2023-08-22 15:45     ` Michael Albinus
  2023-08-22 19:22       ` Emanuel Berg
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Albinus @ 2023-08-22 15:45 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <incal@dataswamp.org> writes:

Hi Emanuel,

>> Tramp 2.7 (of Emacs 30) uses ~/.cache/emacs as temporary
>> directory, if possible. The reason are
>> security considerations.
>
> I have a Tramp socket file there on Debian, it is the
> only file.
>
> It gets more secure that way?

~/.cache has 0700 file permissions. Other users have no access.

> What happens if you remove that directory, will it still work
> the next time, just a similar file has to be created first
> before use?

If you remove it while Emacs is running you're lost. Don't do that!

When Tramp is loaded, and ~/.cache exists, ~/.cache/emacs will be
(re-)created if it doesn't exist. Otherwise, /tmp will be used (or
whatever value of temporary-file-directory).

See the initialization of tramp-compat-temporary-file-directory in
tramp-compat.el.

Best regards, Michael.



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

* Re: emacs in ~/.cache
  2023-08-22 15:45     ` Michael Albinus
@ 2023-08-22 19:22       ` Emanuel Berg
  0 siblings, 0 replies; 12+ messages in thread
From: Emanuel Berg @ 2023-08-22 19:22 UTC (permalink / raw)
  To: help-gnu-emacs

Michael Albinus wrote:

>>> Tramp 2.7 (of Emacs 30) uses ~/.cache/emacs as temporary
>>> directory, if possible. The reason are
>>> security considerations.
>>
>> I have a Tramp socket file there on Debian, it is the
>> only file.
>>
>> It gets more secure that way?
>
> ~/.cache has 0700 file permissions. Other users have
> no access.
>
>> What happens if you remove that directory, will it still
>> work the next time, just a similar file has to be created
>> first before use?
>
> If you remove it while Emacs is running you're lost.
> Don't do that!
>
> When Tramp is loaded, and ~/.cache exists, ~/.cache/emacs
> will be (re-)created if it doesn't exist. Otherwise, /tmp
> will be used (or whatever value of
> temporary-file-directory).
>
> See the initialization of
> tramp-compat-temporary-file-directory in tramp-compat.el.

Thank you, this was a pleasant explanation.

-- 
underground experts united
https://dataswamp.org/~incal




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

end of thread, other threads:[~2023-08-22 19:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-13 12:17 emacs in ~/.cache Colin Baxter
2023-08-13 12:24 ` Eli Zaretskii
2023-08-13 15:43   ` Colin Baxter
2023-08-13 16:18     ` Eli Zaretskii
2023-08-13 16:16   ` Sven Joachim
2023-08-13 13:52 ` Michael Albinus
2023-08-13 15:38   ` Colin Baxter
2023-08-13 16:13     ` Michael Albinus
2023-08-13 17:42       ` Colin Baxter
2023-08-19 21:56   ` Emanuel Berg
2023-08-22 15:45     ` Michael Albinus
2023-08-22 19:22       ` Emanuel Berg

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