From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 37573@debbugs.gnu.org, tim.zander@kit.edu
Subject: bug#37573: 27.0.50; Remote file opened from GNOME-Nautilus
Date: Tue, 08 Oct 2019 14:57:54 +0200 [thread overview]
Message-ID: <871rvnpf71.fsf@gmx.de> (raw)
In-Reply-To: <83r23ozfj2.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 07 Oct 2019 19:28:17 +0300")
[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> I've tested the scenario (editing a remote file from Nautilus via Emacs)
>> with GVFS volumes of different types. ftp and afp-volume work w/o
>> problems. ssh/sftp behaves as reported (problem with file locking).
>>
>> dav(s), google-drive and smb-share give another error:
>>
>> Error: (file-error "Doing chmod" "Operation not supported"
>> "/run/user/1000/gvfs/smb-share:server=detlef,share=netlogon/tmp/tramp-test1H01tS")
>>
>> So it doesn't make sense to implement the workaround in general. What we
>> could do instead is to map all files under "/run/user/%d/gvfs" to the
>> respective Tramp file name. Don't know whether it is worth the effort.
>>
>> After all, I believe we shall simply document the behavior, and the
>> workaround for ssh/sftp.
>
> If we cannot fix this, then documenting sounds good to me. In
> etc/PROBLEMS, perhaps?
I've assembled the appended patch. This includes setting of the
safe-local-variable property of create-lockfiles, 'cos it doesn't hurt.
Comments?
[-- Attachment #2: Type: text/plain, Size: 1531 bytes --]
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index c0d30ae5b4..836537bc5f 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -1183,6 +1183,23 @@ always) doesn't insert the whitespace of the killed and yanked line.
The solution is to set the GPaste "trim items" option to OFF.
+*** Gnome: Navigation from Nautilus to remote files.
+
+If you navigate to a file in Nautilus via "Open With Emacs", which
+belongs to a remote server, you might not be able to save this file
+once you have modified it in Emacs. The reasons for failing are
+different, and for some connection methods it might even be possible.
+
+If the remote connection in Nautilus uses ssh or sftp, you could
+mitigate the problem by the following lines in your .emacs file:
+
+(dir-locals-set-class-variables 'gvfs '((nil . ((create-lockfiles . nil)))))
+(dir-locals-set-directory-class (format "/run/user/%d/gvfs" (user-uid)) 'gvfs)
+
+A better approach might be to avoid navigation from Nautilus to Emacs
+for such files, and to open the file in Emacs using Tramp remote file
+name syntax.
+
*** KDE: When running on KDE, colors or fonts are not as specified for Emacs,
or messed up.
diff --git a/lisp/userlock.el b/lisp/userlock.el
index f077bc9ad6..209768620c 100644
--- a/lisp/userlock.el
+++ b/lisp/userlock.el
@@ -34,6 +34,9 @@
(eval-when-compile (require 'cl-lib))
+;;;###autoload
+(put 'create-lockfiles 'safe-local-variable 'booleanp)
+
(define-error 'file-locked "File is locked" 'file-error)
;;;###autoload
[-- Attachment #3: Type: text/plain, Size: 24 bytes --]
Best regards, Michael.
next prev parent reply other threads:[~2019-10-08 12:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-01 15:00 bug#37573: 27.0.50; Remote file opened from GNOME-Nautilus Tim Zander
2019-10-06 10:37 ` Michael Albinus
2019-10-06 17:44 ` Eli Zaretskii
2019-10-07 7:55 ` Michael Albinus
2019-10-07 16:28 ` Eli Zaretskii
2019-10-08 12:57 ` Michael Albinus [this message]
2019-10-08 13:11 ` Eli Zaretskii
2019-10-08 13:44 ` Michael Albinus
2019-10-08 14:15 ` Tim Zander
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871rvnpf71.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=37573@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=tim.zander@kit.edu \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).