GNU bug report logs -
#42431
28.0.50; browse-url-of-dired-file confusing messaging
Previous Next
Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>
Date: Sun, 19 Jul 2020 19:35:02 UTC
Severity: normal
Found in versions 28.0.91, 28.0.50, 28.0.60
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #26 received at 42431 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> 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 <eggert <at> cs.ucla.edu>
AuthorDate: Thu Oct 31 23:31:17 2019 -0700
Commit: Paul Eggert <eggert <at> cs.ucla.edu>
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 <at> 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
This bug report was last modified 2 years and 218 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.