[Top][All Lists]

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

Re: auto-saving and jka-compr-write-region

From: Kai Großjohann
Subject: Re: auto-saving and jka-compr-write-region
Date: Fri, 07 Dec 2001 11:59:58 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i686-pc-linux-gnu)

Richard Stallman <address@hidden> writes:

>     Is it dangerous to use a *.gz file as an autosave file, or should
>     this work?
> It seems bizarre to try that, given that you want autosaves to be
> fast above all.  If there's a simple safe fix to make it work,
> we may as well make it work.  But it is not terribly important.


>     This comes about because Tramp arranges to set the auto-save file name
>     for a buffer to be a filename with *.gz, if the filename of the buffer
>     was *.gz.  Maybe Tramp shouldn't do this, but I get the feeling it
>     ought to work.
> It is definitely wrong for Tramp to do this.  Can you please
> ask the maintainer of Tramp to change that?

That would be me :-)

Tramp allows you to edit remote files.  Tramp includes a feature where
you can set a variable so that auto-saves are done locally.  Suppose
that the tramp-auto-save-directory is "~/.tramp", then the auto-save
file for /address@hidden/tmp/foo.gz would be
~/.tramp/address@hidden/tmp/foo.gz, except that some potentially
dangerous characters (such as "[]") are replaced with something else
("_a" and "_b" in this case).

Doing auto-saves locally helps a lot with the speed, so I presume
you're happy with me trying that.

Do you have some suggestion what I should do about the ".gz" suffix
on the filename?  I think that maybe just removing the suffix is not
such a good idea since people might wish to edit both the file
/address@hidden/tmp/foo and the file /address@hidden/tmp/foo.gz in
the same Emacs session.  Removing the suffix would mean that one
auto-save file overwrites the other one.

Also, including special cases for jka-compr in Tramp means that Tramp
might have to know about all the other filename handlers out there.
I guess this is not such a good idea.

I could replace "." in the file name with "_d", that would disable
jka-compr for the auto-save file.

Simplification good!  Oversimplification bad!  (Larry Wall)

reply via email to

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