[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7289: Tramp changes ownership of remote file when saving
From: |
Stefan Monnier |
Subject: |
bug#7289: Tramp changes ownership of remote file when saving |
Date: |
Sun, 31 Oct 2010 15:15:08 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> ! ;; For root, preserve owner and group when editing files.
> ! (when (string-equal (file-remote-p filename 'user) "root")
> ! (set (make-local-variable 'backup-by-copying-when-mismatch) t)
> ! (put 'backup-by-copying-when-mismatch 'permanent-local t)))
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.
- 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.
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.
Stefan
- bug#7289: Tramp changes ownership of remote file when saving, Jo Vermeulen, 2010/10/27
- bug#7289: Tramp changes ownership of remote file when saving, Stefan Monnier, 2010/10/27
- bug#7289: Tramp changes ownership of remote file when saving, Jo Vermeulen, 2010/10/27
- bug#7289: Tramp changes ownership of remote file when saving, Michael Albinus, 2010/10/28
- bug#7289: Tramp changes ownership of remote file when saving, Jo Vermeulen, 2010/10/29
- bug#7289: Tramp changes ownership of remote file when saving, Michael Albinus, 2010/10/29
- bug#7289: Tramp changes ownership of remote file when saving, Jo Vermeulen, 2010/10/29
- bug#7289: Tramp changes ownership of remote file when saving, Michael Albinus, 2010/10/29
- bug#7289: Tramp changes ownership of remote file when saving,
Stefan Monnier <=