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

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

Re: volatile /tmp [was: how to force auto-save of buffers not visiting f


From: Michael Albinus
Subject: Re: volatile /tmp [was: how to force auto-save of buffers not visiting files, right now?]
Date: Mon, 21 Mar 2022 09:47:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

hw <hw@adminart.net> writes:

Hi,

>> So either change it for yourself (and document what you did, to
>> help others in your situation) or start convincing people if you
>> want that to become a more general default :-)
>
> Nah, it's simply a bug that files which are being stored in order to
> recover your work after something went wrong --- and that "something"
> includes having to reboot --- are being stored in such a way that
> recovery is impossible.  It's a feature that doesn't work right and
> thus needs to be fixed.

There won't be any change if you continue to argue on help-gnu-emacs@gnu.org.
Write a bug report, and be prepared for the discussion.

Take into account, that auto-save-file-name-transforms isn't initialized
using hard-coded "/tmp/". It's default value is rather

--8<---------------cut here---------------start------------->8---
`(("\\`/[^/]*:\\([^/]*/\\)*\\([^/]*\\)\\'"
   ,(concat temporary-file-directory "\\2") t))
--8<---------------cut here---------------end--------------->8---

On MS-Windows, this expands for me to

--8<---------------cut here---------------start------------->8---
'(("\\`/[^/]*:\\([^/]*/\\)*\\([^/]*\\)\\'"
   "c:/Users/albinus/AppData/Local/Temp/\\2" t))
--8<---------------cut here---------------end--------------->8---

And if you start Emacs with any value for environment variable $TMP, like

--8<---------------cut here---------------start------------->8---
env TMP=/var/tmp emacs -Q
--8<---------------cut here---------------end--------------->8---

then auto-save-file-name-transforms expands accordingly:

--8<---------------cut here---------------start------------->8---
'(("\\`/[^/]*:\\([^/]*/\\)*\\([^/]*\\)\\'" "/var/tmp/\\2" t))
--8<---------------cut here---------------end--------------->8---

And there is tramp-auto-save-directory, which overrules the said
setting.

Honestly, I don't see a reason to change the current behavior. People
who want that auto-saved remote files exist after a reboot can change
the behavior easily. But many people, including me, don't want this feature.

(I might be biased as Tramp maintainer. Who knows.)

Best regards, Michael.



reply via email to

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