From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#68976: 30.0.50; Tramp: unexpected error when calling (file-remote-p "/dav:localhost#8000:/foo") Date: Wed, 07 Feb 2024 18:59:48 +0100 Message-ID: <87fry4b1ez.fsf@gmx.de> References: <87eddo45qj.fsf@localhost> Reply-To: Michael Albinus Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10887"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 68976@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 07 19:01:39 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rXmEs-0002eJ-89 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Feb 2024 19:01:38 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXmEZ-0000yS-Ow; Wed, 07 Feb 2024 13:01:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXmE9-0000bR-VI for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2024 13:00:55 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXmE4-0004bF-55 for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2024 13:00:52 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rXmEH-0004va-WE for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2024 13:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Feb 2024 18:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68976 X-GNU-PR-Package: emacs Original-Received: via spool by 68976-submit@debbugs.gnu.org id=B68976.170732881318834 (code B ref 68976); Wed, 07 Feb 2024 18:01:01 +0000 Original-Received: (at 68976) by debbugs.gnu.org; 7 Feb 2024 18:00:13 +0000 Original-Received: from localhost ([127.0.0.1]:57887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXmDU-0004ti-RD for submit@debbugs.gnu.org; Wed, 07 Feb 2024 13:00:13 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:38755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXmDR-0004sD-LZ for 68976@debbugs.gnu.org; Wed, 07 Feb 2024 13:00:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1707328788; x=1707933588; i=michael.albinus@gmx.de; bh=PZX6YXSurYMmdqlWXOjgeceAXSlImNd+ZT6CAF8+twM=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=gdaiSKi88w/M2iuWqxAnw6m3DgriY7pI8vvNYjwqGzQPbEToch2+RRLdfTM9HA5C TLSnjKcptKvg6xlgtYI+XuR8kvh1AhH1kf/AnZI8qfXQQPvm1vDyxY1q0gqt0SCgw Bng6D1kjc0a/TJYj+NqGdZleFZ24LLd972dLR4Pwu7kJnSVe+mbUmeGsq4YPqQqGs oviSO1N32fvxCzW/FnTkJ5H/Giqs/MbQPHLIf9JeA5iRrehf2WAbvvUadXcMqXd0i yB6dE1b51i8xuphwFc3Bct8mDHCZC2q8iTIhUm6n4osFLh5q8Y6MPu/We7N8jSY23 oY6FSoN8Gn0rvI7WgQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.16]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MpDJX-1rEAmZ2iTP-00qg7T; Wed, 07 Feb 2024 18:59:48 +0100 In-Reply-To: <87eddo45qj.fsf@localhost> (Ihor Radchenko's message of "Wed, 07 Feb 2024 16:08:20 +0000") X-Provags-ID: V03:K1:Rgh5vS1/gmFdqaYr4gIKX4jeItUKuUcL9cdpGu4ybYhFXT8phBF dTEitSBUyX7Nmk5zjqLxQ7wUfRNogc+WP7UTYGFVnRB3kPnPIxkgxS5HOmMVse+yxf8VlOH CmTXav/z1VGb1D/5CMVfdoeWLrmZOUVMa9D4L7pmyEp+Qi+knlO3woNS0751czVI5EeMnVM mG36hKmjspz9i735OALHw== UI-OutboundReport: notjunk:1;M01:P0:ASvD+eOZ7yY=;+o/fhBKtW5JVpjrxo1sIDQsrOzN X3t0WKBCRPDc6wEzhh5Tpet3K+EStGmQ530LuSb/T9VC0GAjGXq+4A6tnQUCOxRdDeLX7qIC3 Z4aTN/SjBA3oA8oqdmwvaYcWRrzovd9G0fPIORegthJKq+hppv2dVLb2uv0eBy3CYYinvAjiG xbnKZtjoFOQv3UIBdrv3Z/Tr2TlrgnvOJNdxeU0GbjlPlg0Re2x33Jp1WgwQLHQv7kS58tkJc FFqwA9Uz7ogZmXQelGTsUShh6AObfi2aa7eORlzzlBKgoWAJk38UB30j3lMVof1EYwGQ6eFrE HhEbhtzRPH6BsuPSIMAS7GtXYxYaxPeFypFwdgdTUabburce6OEkkSj6wfZVIcZG5IwSBFHm5 JjTQoW8myWYD+zi5xuR7YehRlNxyCwyhHgjDK2eEfFU5Usboi+whrZ8zl/wdXZl/9grCjMuVq jdw5NoZT6yDuYgAYjJ65VqWFvE6JbbhUsqxc6mCpg5v8LICclVgouXRLgP1ggL1h9/PzvU9sX JCTV/GgWfas/QF7m3GmRsUgPM+0AAuTmU5n3b+NL9Y1LqLb5XY0YpIy5NTrCvWXkGXrVJeciF PBgs+VQXwySGcj9i321x/XTu5OOI3nvSYKjF18rIpANQ9HGDBCRwrV75WHChHegcFFePGSsGz Y7pC9tgmBnSEF0SZf78e3I5xD6tJ9JX5qMbz7jnMY0lKzK6Rix36TNpNqvpT0L+5VhIVpowJo mvLYYvaTmbLeJ9WLNzJixLOR+llTy0HHbmCUaGDxSRK9YrOLCN3OybjSlTtqPmw3ZA+3B3tm X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279574 Archived-At: Ihor Radchenko writes: > Hello, Hi Ihor, > Today, I tried to execute an innocent test checking if a file is remote > or not: > > (file-remote-p "/dav:localhost#8000:/foo") > > Unexpectedly, I encountered user error > tramp-error: Package `tramp-gvfs' not supported > > I did not expect that `file-remote-p' should ever throw an error other > than when passed non-string argument. You are right. It should have returned nil instead of the error. `file-remote-p' claims in its docstring --8<---------------cut here---------------start------------->8--- Test whether FILE specifies a location on a remote system. --8<---------------cut here---------------end--------------->8--- > Looking at the code, (setq tramp-gvfs-enabled t) would make the error > disappear. (The default value is nil) If tramp-gvfs-enabled is nil (default value if D-Bus is not enabled), the example given above does not specify "a location on a remote system". > I believe that it is inappropriate that throw an error in such > situation. If "gvfs" is not supported, but still claimed to be remote by > TRAMP, I expect non-nil return value when calling `file-remote-p'; not > an error. Tramp does not claim it is remote. However, it should return nil. If you want to know, whether a file name has remote file name syntax, you should call (string-match-p tramp-file-name-regexp "/dav:localhost#8000:/foo") This variable is documented in the Tramp manual, node "(tramp) Change file name syntax". I will fix it on master (returning nil but an error). Best regards, Michael.