From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#37573: 27.0.50; Remote file opened from GNOME-Nautilus Date: Tue, 08 Oct 2019 14:57:54 +0200 Message-ID: <871rvnpf71.fsf@gmx.de> References: <66b84229-81df-f88d-78bd-5eeed10b67da@kit.edu> <871rvqcg7y.fsf@gmx.de> <835zl13h1g.fsf@gnu.org> <87r23pat27.fsf@gmx.de> <83r23ozfj2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="130279"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 37573@debbugs.gnu.org, tim.zander@kit.edu To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 08 14:59:44 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iHp5b-000Xkr-Gi for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Oct 2019 14:59:43 +0200 Original-Received: from localhost ([::1]:55350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHp5a-0007qp-1N for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Oct 2019 08:59:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36348) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHp4x-0007qg-Gb for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2019 08:59:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHp4w-000165-Av for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2019 08:59:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40896) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iHp4w-00015y-7T for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2019 08:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iHp4w-0003WK-5a for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2019 08:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Oct 2019 12:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37573 X-GNU-PR-Package: emacs Original-Received: via spool by 37573-submit@debbugs.gnu.org id=B37573.157053949413473 (code B ref 37573); Tue, 08 Oct 2019 12:59:02 +0000 Original-Received: (at 37573) by debbugs.gnu.org; 8 Oct 2019 12:58:14 +0000 Original-Received: from localhost ([127.0.0.1]:49717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHp4A-0003VF-CW for submit@debbugs.gnu.org; Tue, 08 Oct 2019 08:58:14 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:43183) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHp49-0003V2-0R for 37573@debbugs.gnu.org; Tue, 08 Oct 2019 08:58:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1570539476; bh=CWDRvgqhe7GNaISwOoSPstY2p37Y4Ksg5Hih7+f0aRc=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=AxP67VfGGlML3Rv58B3Hp4jdygSWkGBnxse2BMw0OkNUZcC2ojEUj5F3r1Tj8bcTF 3Qkb+1X/1JBv5eX5tGOQZ+fYn37B67AxrrdZL3x1c2iqYp2rLp+CGa3c6F4OdHRqf0 GfbpOh3Cz8LixRqynNmIz8lSl0X+OYmvS1oGcoF0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from detlef.gmx.de ([213.220.146.216]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N1fis-1i6nT22V68-011zMD; Tue, 08 Oct 2019 14:57:56 +0200 In-Reply-To: <83r23ozfj2.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 07 Oct 2019 19:28:17 +0300") X-Provags-ID: V03:K1:ArbBuMgJc2Zj/ucW9/heO5CB8d3Cq+jpSzjKOKSm3xEEXcgRMJU x6CXqn6aL2aMmk7iid8WXQ32sjjdG7bn4EDreHWj94J+EiaJTv1oNvEk+NgGIWz32HZ7c5W ltAETRSuVl53B/gVBNv6KQhQZdtfaJoIzhXCEU4YVl51YqYNCjXxAqG8wjGenH6peNoA0Up MRdhnSLvSMU1Kpt2D2biA== X-UI-Out-Filterresults: notjunk:1;V03:K0:ZLkEjGyM1Xo=:T+5tmqyPQIHuqyPdcYz8rc IrdbmhJwtBwWF9RRBkQgxqAnWBivet2XX0JVzcJO4dLjKOUZ6sUin2QmUEoSzCAVTHXU17qUR dGcj8u/bFHz7eml9mxmTInshSLMLGWtLDnMIvO0dFZC3lwbbkTZf/raK/bEX2oOnZO9nRt0bF 4S+XGdt1vJxMWG+rR5w2UvNXw0YJQZs9017kfhmWTYQyR4fFYOEv5iPKHrWcvcabwIiPUb3NS aOTff6kfSKbO0JnOv7jzRxBLS/jMWrQpR2maPPXvMdfe1jTh+S7xEJEVCht+Fph8XePmQNJ9V IeXpxX+IbcaNLMF7IqKE/9sejgf8kd2qrUmjA54ZnNa56yNM6DrNZrIiJyvtM0lQcFLqrV0Xx 5/4F5d7qPmpEt87rp9jNsLbkVPzlHgHloeA1aY5wiA+7VsDn0iA9lRYsI5LqIyoJtrSN/jpNi acpQ1+7xAvJGVcvcK9JfWLISRwZfwyg1/BQSnxO1D9LmOuXHQBLp2b4f9aLbFZ1RatEGxQddr 8kIlpyRkbJs8HFPLiyjucWgiJwpLUdt3+IsSuWMKZiQ086ivACCY0qWASX8y9L2m0EymZIIVF NAKbPFEZZvC5N8wUjufMnZx8lVFzbETUgjJmqMNPLdf7yZkYVQusjnKGSqwVh/ppFcl82hUlD ZpCVKRAKvH7W6sZVqruY1hqTwCHoUX0MhUKCABSCkf38NNHXCvajX92+W2pmQRX9LmZW6w0u5 41txSJ3A+gyh7tc+JI3MU06NfDeoHdPOwiz8rn9Kc3UMw7ENzEPueUHGE+XZZIbMs8o52eit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:168644 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eli Zaretskii 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=3Ddetlef,share=3Dnetlogon/tmp/tra= mp-test1H01tS") >> >> So it doesn't make sense to implement the workaround in general. What w= e >> 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? --=-=-= Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: quoted-printable diff --git a/etc/PROBLEMS b/etc/PROBLEMS index c0d30ae5b4..836537bc5f 100644 =2D-- 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 Em= acs, or messed up. diff --git a/lisp/userlock.el b/lisp/userlock.el index f077bc9ad6..209768620c 100644 =2D-- 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 --=-=-= Content-Type: text/plain Best regards, Michael. --=-=-=--