From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#42431: 28.0.50; browse-url-of-dired-file confusing messaging Date: Sun, 09 Aug 2020 11:45:05 +0200 Message-ID: <87lfiow3tq.fsf@gnus.org> References: <87v9ijl2ol.fsf@gnus.org> <87blk04mw8.fsf@gnus.org> <83eeoh7f68.fsf@gnu.org> <87a6z55u7j.fsf@gnus.org> <83y2mp5te0.fsf@gnu.org> <87pn80w49u.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35348"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Paul Eggert , michael.albinus@gmx.de, 42431@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 09 11:46: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 1k4hu5-00097p-Kl for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Aug 2020 11:46:09 +0200 Original-Received: from localhost ([::1]:50996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4hu4-0002Sx-MZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Aug 2020 05:46:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4hty-0002Sr-Mw for bug-gnu-emacs@gnu.org; Sun, 09 Aug 2020 05:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48413) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k4hty-00016u-Dh for bug-gnu-emacs@gnu.org; Sun, 09 Aug 2020 05:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k4hty-0008TT-8m for bug-gnu-emacs@gnu.org; Sun, 09 Aug 2020 05:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Aug 2020 09:46: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.159696632432528 (code B ref 42431); Sun, 09 Aug 2020 09:46:02 +0000 Original-Received: (at 42431) by debbugs.gnu.org; 9 Aug 2020 09:45:24 +0000 Original-Received: from localhost ([127.0.0.1]:59959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4htM-0008SZ-0x for submit@debbugs.gnu.org; Sun, 09 Aug 2020 05:45:24 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:34070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4htK-0008SK-0j for 42431@debbugs.gnu.org; Sun, 09 Aug 2020 05:45:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6KzGyM6OHLj14fm1IhmqrSfITpt1126KMyAq0mgsLJY=; b=KSeGta67/GrF0uP84XbIP0lQeX 8anG0tRLcAJT0x6Jx4Vgj/Vk2AEgt7BBdAX/aB8iH1rULBYbA/HA9C3diE1gjz1lgcgP6P051cBF9 MKLcxpl9U1OiJVD4/ywRwjR9RFPGXv3b1O+1F/kvEjaFYL21KGmS2EWzzq2CsitDc7Io=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k4ht4-0000DR-M1; Sun, 09 Aug 2020 11:45:15 +0200 In-Reply-To: <87pn80w49u.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 09 Aug 2020 11:35:25 +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:184389 Archived-At: Lars Ingebrigtsen writes: > It would be, but I think this points to an error in insert-file-contents > itself. I'll poke around some more... Yup. The error signalling comes from Finsert_file_contents. If I make this change, then the confusing messaging goes away: diff --git a/src/fileio.c b/src/fileio.c index 37072d9b6b..05e262b201 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4826,7 +4826,6 @@ because (1) it preserves some marker positions and (2) it puts less data if (!NILP (visit) && current_buffer->modtime.tv_nsec < 0) { /* Signal an error if visiting a file that could not be opened. */ - report_file_errno ("Opening input file", orig_filename, save_errno); } /* We made a lot of deletions and insertions above, so invalidate This was apparently introduced/changed in 2019 by this patch: commit 3a1e7624ed234bb434cdafed59515cadd037cafa Author: Paul Eggert AuthorDate: Thu Oct 31 23:31:17 2019 -0700 Commit: Paul Eggert CommitDate: Thu Oct 31 23:32:05 2019 -0700 Fix insert-file-contents file error regression Problem reported for dired-view-file (Bug#37950). * src/fileio.c (Finsert_file_contents): When visiting, signal an error if the file could not be opened for any reason, rather than signaling an error only for nonexistent files, fixing a bug introduced in 2019-09-16T03:17:43!eggert@cs.ucla.edu. I've Cc'd Paul on this. Paul, the test case is: (browse-url-of-file "/tmp/a.txt") This will open the file correctly (via the url-file-handler file name handler), but Emacs will then message "File exists, but cannot be read" because Finsert_file_contents signals an error with the error message "Success". -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no