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

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

Re: how to force auto-save of buffers not visiting files, right now?


From: hw
Subject: Re: how to force auto-save of buffers not visiting files, right now?
Date: Sun, 20 Mar 2022 07:36:42 +0100
User-agent: Evolution 3.42.4 (3.42.4-1.fc35)

On Sat, 2022-03-19 at 10:58 +0100, Michael Albinus wrote:
> hw <hw@adminart.net> writes:
> 
> Hi,
> 
> > For example, I may edit a file '/usr/local/bin/example.pl' which is
> > owned by foo:foo because I made that so.  The directory
> > '/usr/local/bin/' is owned by root.  How do you expect emacs to create
> > a backup file there?  For remote files, I have set
> > tramp-auto-save-directory to a local directory, and I'm missing an
> > equivalent option for local files.
> 
> There is the user option auto-save-file-name-transforms, which gives you
> this feature also for local files.

Thanks!

Its value is
(("\\`/[^/]*:\\([^/]*/\\)*\\([^/]*\\)\\'" "/tmp/\\2" t))

Ah, hm, what is that regexp supposed to match?  All files with at
least a ':', a bunch of slashes and some optional brackets?  Who puts
bracktes into file names, that shouldn't be allowed.

Apprently that leads to puttting some files into /tmp, and I would
consider it a bug to put auto-save files into /tmp because doing that
totally defeats the auto-saving because /tmp is volatile.  I don't
know who made the utterly stupid decision to make /tmp volatile, but
it's the way it is since quite a while now.  This default needs to be
changed, or /tmp needs to go back to be a useful directory.

Why didn't they just make a directory /volatile in addition to /tmp?
Because someone would argue that when something must not be saved,
then don't save it to begin with?

But then, the auto-save files for buffers not visiting files show up
in the directories the files are in from which the buffers not
visiting these files were created.

That is very confusing.





reply via email to

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