From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii 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:29:15 +0200 Message-ID: <86zfwcxmp0.fsf@gnu.org> References: <87eddo45qj.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5034"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael.albinus@gmx.de, 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 17:30:01 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 1rXkoC-00017k-09 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Feb 2024 17:30:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXko1-0008Fi-9f; Wed, 07 Feb 2024 11:29:49 -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 1rXko0-0008DG-9c for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2024 11:29:48 -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 1rXko0-0004LQ-0x for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2024 11:29:48 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rXkoD-0002Ue-Qs for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2024 11:30:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Feb 2024 16:30: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.17073233829539 (code B ref 68976); Wed, 07 Feb 2024 16:30:01 +0000 Original-Received: (at 68976) by debbugs.gnu.org; 7 Feb 2024 16:29:42 +0000 Original-Received: from localhost ([127.0.0.1]:57755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXknu-0002Tm-CD for submit@debbugs.gnu.org; Wed, 07 Feb 2024 11:29:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXknr-0002TZ-NJ for 68976@debbugs.gnu.org; Wed, 07 Feb 2024 11:29:40 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXknY-00049N-Hh; Wed, 07 Feb 2024 11:29:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=jlItn7NvOJ5zP6TBk0trkjgy4BaPFPoJzvn9Q1w5WZI=; b=J6oVpPPcdLqF celWfwQTzAy8TQ233ZMAOM1a85K6FYDVz/zZ8+J8ZH9r2L1lp9wCtd726XJozu5lBD2n03kjSeQdH Mcbsr12CdV3O7Y5Qu9RAVhyB0psGap0iFMgzLwwOxems+HXQkEFWZKKgUniAube7UOOwufL+PHcwY +/yjtWearBl/nkl9ptAYJJzrWI4k3DIQdLKbMuiCqcvAIRSU+DDJNkTcKorkOlynH3o4O22w7qVSz do+TPiNXBoy7zNzZFMIvDPKzgYkml4LoaNXDB+KC6Iqnhx8QmVX1dcIGmrsZGCWUv+yIHTpAAfEzQ cU1KCd5I3Glhd/zW53tRQw==; In-Reply-To: <87eddo45qj.fsf@localhost> (message from Ihor Radchenko on Wed, 07 Feb 2024 16:08:20 +0000) 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:279558 Archived-At: > Cc: michael.albinus@gmx.de > From: Ihor Radchenko > Date: Wed, 07 Feb 2024 16:08:20 +0000 > > 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. > > Looking at the code, (setq tramp-gvfs-enabled t) would make the error > disappear. (The default value is nil) > > 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. What if the "dav:" part was deliberate, i.e. not an accident? That ism the caller did want to access a gvfs remote filesystem. Returning nil in that case would be exactly the wrong thing to do. IOW, please keep in mind that file-remote-p is called internally by many APIs, and its main use case is to be called at such a low level, where silently failing is not an option. So I'm not sure we want to fix this, but maybe Michael will suggest some solution.