help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs in a Corporate Environment


From: Michael Albinus
Subject: Re: Emacs in a Corporate Environment
Date: Sun, 16 Apr 2023 09:51:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Björn Bidar <bjorn.bidar@thaodan.de> writes:

Hi Björn,

>> You can be sure that a copy of your remote data end up in your local
>> drive in /tmp. Tramp is busy to clenaup after the operations, but there
>> is no guarantee that it will cover everything. And if somebody calls
>> `file-local-copy' of a remote file, this ends up in your /tmp by
>> intention of the caller.
>
> Not to hijack this list even more but Emacs should probably use various
> directories other then /tmp under Unixes. Under those that use XDG
> (Linux, BSD, Solaris) ${XDG_CACHE_HOME} or ${XDG_STATE_HOME} comes to
> mind.
> Another option is to use ${XDG_RUNTIME_DIR}.
> All those are separate per user and the latter is likely deleted each
> time (tmpfs).

Emacs has the user option temporary-file-directory. It is initialized
using the environment variable $TMPDIR (or $TMP or $TEMP). If that
doesn't exist, "/tmp/" is used.

Prior starting Emacs, $TMPDIR could be set to "${XDG_CACHE_HOME}/emacs/"
(provided, subdirectory "emacs" is created). Alternatively, you could
set this user option in your init file.

Whether Emacs shall support this setting by default, including the
subdir creation, is a different question. Perhaps we shall do this as
opt-in, based on a user variable.

Similarly, you (we) could set small-temporary-file-directory to
"${XDG_RUNTIME_DIR}/emacs/".

> Br,
>
> Björn

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]