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#42431: 28.0.50; browse-url-of-dired-file confusing messaging Date: Sat, 08 Aug 2020 13:22:47 +0300 Message-ID: <83y2mp5te0.fsf@gnu.org> References: <87v9ijl2ol.fsf@gnus.org> <87blk04mw8.fsf@gnus.org> <83eeoh7f68.fsf@gnu.org> <87a6z55u7j.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15743"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael.albinus@gmx.de, 42431@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 08 12:23:10 2020 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 1k4M0M-00040g-0t for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Aug 2020 12:23:10 +0200 Original-Received: from localhost ([::1]:49856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4M0K-0007Wj-V3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Aug 2020 06:23:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4M0E-0007WZ-Pq for bug-gnu-emacs@gnu.org; Sat, 08 Aug 2020 06:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46627) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k4M0E-0007r0-H8 for bug-gnu-emacs@gnu.org; Sat, 08 Aug 2020 06:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k4M0E-0006fO-AL for bug-gnu-emacs@gnu.org; Sat, 08 Aug 2020 06:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Aug 2020 10:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42431 X-GNU-PR-Package: emacs Original-Received: via spool by 42431-submit@debbugs.gnu.org id=B42431.159688218125609 (code B ref 42431); Sat, 08 Aug 2020 10:23:02 +0000 Original-Received: (at 42431) by debbugs.gnu.org; 8 Aug 2020 10:23:01 +0000 Original-Received: from localhost ([127.0.0.1]:58173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4M0D-0006ew-8F for submit@debbugs.gnu.org; Sat, 08 Aug 2020 06:23:01 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4M0B-0006ek-N0 for 42431@debbugs.gnu.org; Sat, 08 Aug 2020 06:23:00 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44625) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4M06-0007qS-0G; Sat, 08 Aug 2020 06:22:54 -0400 Original-Received: from [176.228.60.248] (port=3290 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1k4M05-0002T4-IV; Sat, 08 Aug 2020 06:22:53 -0400 In-Reply-To: <87a6z55u7j.fsf@gnus.org> (message from Lars Ingebrigtsen on Sat, 08 Aug 2020 12:05:04 +0200) 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" Xref: news.gmane.io gmane.emacs.bugs:184317 Archived-At: > From: Lars Ingebrigtsen > Cc: michael.albinus@gmx.de, 42431@debbugs.gnu.org > Date: Sat, 08 Aug 2020 12:05:04 +0200 > > >> (condition-case () > >> (let ((inhibit-read-only t)) > >> (insert-file-contents-literally filename t)) > >> (file-error > >> (when (and (file-exists-p filename) > >> (not (file-readable-p filename))) > >> (kill-buffer buf) > >> (signal 'file-error (list "File is not readable" > >> filename))) > > > > Is this because file-readable-p returns nil for file:// URLs? > > That's the direct cause of the message, but the underlying reason is > that insert-file-contents-literally signalled a file-error here (after > inserting the contents). I haven't yet chased down why. I guess that's because expand-file-name doesn't convert file:// URLs into local file names, and then insert-file-contents chokes on the value produced by expand-file-name. (insert-file-contents-literally is just a thin wrapper around insert-file-contents.) So one solution would be to convert file:// URLs into local file names in the above snippet, before calling insert-file-contents-literally.