[Top][All Lists]

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

backup-by-copying-when-mismatch (was: bug#7289: Tramp changes ownership

From: Stefan Monnier
Subject: backup-by-copying-when-mismatch (was: bug#7289: Tramp changes ownership of remote file when saving)
Date: Mon, 01 Nov 2010 10:12:31 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

[ Moving this to emacs-devel. ]

>> 2 problems with this patch:
>> - (put <var> 'permanent-local t) should *never* be in such a function.
>> It's a top-level operation that has global effects and belongs right
>> next to the var's defvar.

> I want to have `backup-by-copying-when-mismatch' buffer local. If I set
> it in `insert-file-contents' (via `make-local-variable'), it is not kept
> buffer local in that buffer.  How could I achieve this otherwise?

You could place the `put' in files.el at toplevel, right next to the
definition of backup-by-copying-when-mismatch.

>> - This makes it impossible to choose backup-by-copying-when-mismatch=nil
>> when accessing such remote files, whereas for local files accessed by
>> root a (setq backup-by-copying-when-mismatch nil) in the .emacs will
>> do the trick.
> D'accord.  We would need another way for the user to express his
> wish.  Maybe there shall be also other values but only than nil and t.

That would be an option, indeed.

>> A simpler solution would be to change the default value of
>> backup-by-copying-when-mismatch to t for everyone rather than just
>> for root.  I don't know what would the objections to this.

> From my pov it would be acceptable, but I don't know how people see it.

Neither do I.

> And we should check what it does mean for remote files, because they
> tend to "mismatch" more often.

That's a very good point.  


reply via email to

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