From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 7289@debbugs.gnu.org, Jo Vermeulen <jo.vermeulen@gmail.com>
Subject: bug#7289: Tramp changes ownership of remote file when saving
Date: Sun, 31 Oct 2010 15:15:08 -0400 [thread overview]
Message-ID: <jwv4oc2dvod.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <874oc6ze69.fsf@gmx.de> (Michael Albinus's message of "Thu, 28 Oct 2010 14:37:18 +0200")
> ! ;; 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
next prev parent reply other threads:[~2010-10-31 19:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-27 10:46 bug#7289: Tramp changes ownership of remote file when saving Jo Vermeulen
2010-10-27 13:53 ` Stefan Monnier
2010-10-27 15:21 ` Jo Vermeulen
2010-10-28 12:37 ` Michael Albinus
2010-10-29 10:42 ` Jo Vermeulen
2010-10-29 11:25 ` Michael Albinus
2010-10-29 13:28 ` Jo Vermeulen
2010-10-29 19:31 ` Michael Albinus
2010-10-31 19:15 ` Stefan Monnier [this message]
2010-11-01 7:33 ` Michael Albinus
2010-11-01 14:12 ` backup-by-copying-when-mismatch (was: bug#7289: Tramp changes ownership of remote file when saving) Stefan Monnier
2010-11-04 14:51 ` backup-by-copying-when-mismatch Michael Albinus
2010-11-20 10:49 ` backup-by-copying-when-mismatch Michael Albinus
2010-11-21 17:16 ` backup-by-copying-when-mismatch Stefan Monnier
2010-11-21 19:48 ` backup-by-copying-when-mismatch Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv4oc2dvod.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=7289@debbugs.gnu.org \
--cc=jo.vermeulen@gmail.com \
--cc=michael.albinus@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.