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:42:34 +0200 Message-ID: <86wmrgxm2t.fsf@gnu.org> References: <87eddo45qj.fsf@localhost> <86zfwcxmp0.fsf@gnu.org> <87fry4qlcj.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36914"; 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:42:59 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 1rXl0l-0009Ng-DD for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Feb 2024 17:42:59 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXl0c-0005Lj-Vh; Wed, 07 Feb 2024 11:42:50 -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 1rXl0b-0005LN-2U for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2024 11:42:49 -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 1rXl0a-0006xK-Qt for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2024 11:42:48 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rXl0o-0002oh-42 for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2024 11:43:02 -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:43:02 +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.170732418110820 (code B ref 68976); Wed, 07 Feb 2024 16:43:02 +0000 Original-Received: (at 68976) by debbugs.gnu.org; 7 Feb 2024 16:43:01 +0000 Original-Received: from localhost ([127.0.0.1]:57781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXl0n-0002oS-2x for submit@debbugs.gnu.org; Wed, 07 Feb 2024 11:43:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXl0k-0002oE-Es for 68976@debbugs.gnu.org; Wed, 07 Feb 2024 11:42:59 -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 1rXl0R-0006ve-1A; Wed, 07 Feb 2024 11:42:39 -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=3KyO8lSQLm2uzQ9gPotIvsJdajQvZ4RxNJunFllIiT0=; b=lNYJq/mOqRYK ES4ViKbutyV1gwbibYUfQZHdNcCjQaGs+gx0m7KwXqXZdgpeo8ctgh3gj0qCnhM834UTLO7zBm7rs 4NdSYRl4+TizSxo4Rb2KJB8Jju1mmcOD1Z4fXwQ/TpV5ZA72pON+JY8tjKurgyAvv9Qx6NPnBi13Y Zzr6XTpadttq1BHJuDsr5wTzAEaUjyw+cBVNfb3+unAT9Ogm0zlq1DGzfPQllVFUykMnHGqeKbQpz 3oNRYX7Mw4mNBBttORfRWghmerW2V6dQNx0zGmi7fLv6+L4gKXL/UgWkTt+orYE+Dz2UEex4BL8Bo 0LMY24wPBGY7wtLLF1goYw==; In-Reply-To: <87fry4qlcj.fsf@localhost> (message from Ihor Radchenko on Wed, 07 Feb 2024 16:40:12 +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:279561 Archived-At: > From: Ihor Radchenko > Cc: 68976@debbugs.gnu.org, michael.albinus@gmx.de > Date: Wed, 07 Feb 2024 16:40:12 +0000 > > Eli Zaretskii writes: > > >> (file-remote-p "/dav:localhost#8000:/foo") > > ...> > >> 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. > > I do not suggest returning nil. I suggest to return non-nil rather than > throwing an error. It would be more appropriate to throw an error when > opening the file were attempted, not merely checking if that file is > remote. I don't know what you mean: Emacs doesn't have any "open file" operations, it has a "visit file" operation, and that makes all kinds of tests before actually trying to read the file's contents, to provide user-friendly diagnostics instead of the cryptic errors generated by the OS. One of those tests is file-remote-p. But let's wait for Michael to chime in.