From unknown Mon Jun 23 22:05:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37950: 27.0.50; File error regression Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Oct 2019 22:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37950 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 37950@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.157221672524114 (code B ref -1); Sun, 27 Oct 2019 22:53:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Oct 2019 22:52:05 +0000 Received: from localhost ([127.0.0.1]:43641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOrOH-0006Gq-2Q for submit@debbugs.gnu.org; Sun, 27 Oct 2019 18:52:05 -0400 Received: from lists.gnu.org ([209.51.188.17]:44351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOrOF-0006Gg-Hb for submit@debbugs.gnu.org; Sun, 27 Oct 2019 18:52:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35200) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOrOE-0007Ti-6v for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 18:52:03 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOrOC-0003MJ-KQ for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 18:52:01 -0400 Received: from elephant.ash.relay.mailchannels.net ([23.83.222.57]:54056) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOrOB-0003KU-Rr for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 18:52:00 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 8876F340B2D for ; Sun, 27 Oct 2019 22:51:55 +0000 (UTC) Received: from pdx1-sub0-mail-a92.g.dreamhost.com (100-96-6-174.trex.outbound.svc.cluster.local [100.96.6.174]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 22358340D2A for ; Sun, 27 Oct 2019 22:51:55 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a92.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Sun, 27 Oct 2019 22:51:55 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Ski-Callous: 4740657b43df8064_1572216715368_4286716957 X-MC-Loop-Signature: 1572216715368:3744310998 X-MC-Ingress-Time: 1572216715368 Received: from pdx1-sub0-mail-a92.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a92.g.dreamhost.com (Postfix) with ESMTP id 7286A87F1C for ; Sun, 27 Oct 2019 15:51:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to :subject:date:message-id:mime-version:content-type; s= linkov.net; bh=CJFQ/pYVi2AgZQv84oN3orZRgP4=; b=w3ztxCx5C7f2E/unL dE6qdOQDn34/yFP8GJpmiP67uSUvu4gXdgHf9QcsVrgxvdvooEWXuu21rzqA5UDN Tv5EocFN3paEMW9eR3eCsTo01x7zvOGNwo30soQp9wtF0ct9WNwtOgovVPW56QM9 prIAwllPhr6mTtrbmxK48tkiqo= Received: from mail.jurta.org (m91-129-98-153.cust.tele2.ee [91.129.98.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a92.g.dreamhost.com (Postfix) with ESMTPSA id 1E6968791E for ; Sun, 27 Oct 2019 15:51:47 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a92 From: Juri Linkov Organization: LINKOV.NET Date: Mon, 28 Oct 2019 00:50:25 +0200 Message-ID: <87k18pztu5.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.222.57 X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) 0. emacs -Q 1. in Dired type 'v' ('dired-view-file') to view a read-protected file, e.g. from non-root to visit a file with such permissions: -rw------- root root 2. Empty buffer is displayed (but the file size is several kilobytes) 3. The echo area displays the message: View mode: type C-h for help, h for commands, q to quit. 4. Visiting *Messages* reveals the error message: Note: file is write protected obscured by the View mode message above. But this error message is wrong anyway. In previous versions the error message was correct: find-file-noselect-1: File is not readable: and it rightfully refused to visit the read-protected file. In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2019-10-27 built on localhost Repository revision: c6667cc6a958e06fd43fb1ee0e80753adfefa49d Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Linux Mint 19 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Note: file is write protected View mode: type C-h for help, h for commands, q to quit. Configured using: 'configure --with-x-toolkit=gtk3 --with-xwidgets --with-xft --with-modules --enable-checking=yes,glyphs --enable-check-lisp-object-type 'CFLAGS=-O0 -g3 -gdwarf-4'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS PDUMPER LCMS2 GMP Important settings: value of $LC_MONETARY: et_EE.UTF-8 value of $LC_NUMERIC: en_US.UTF-8 value of $LC_TIME: en_DK.utf8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix From unknown Mon Jun 23 22:05:33 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Juri Linkov Subject: bug#37950: closed (Re: 27.0.50; File error regression) Message-ID: References: <87k18pztu5.fsf@mail.linkov.net> X-Gnu-PR-Message: they-closed 37950 X-Gnu-PR-Package: emacs Reply-To: 37950@debbugs.gnu.org Date: Fri, 01 Nov 2019 06:40:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1572590402-10631-1" This is a multi-part message in MIME format... ------------=_1572590402-10631-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #37950: 27.0.50; File error regression which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 37950@debbugs.gnu.org. --=20 37950: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D37950 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1572590402-10631-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 37950-done) by debbugs.gnu.org; 1 Nov 2019 06:39:21 +0000 Received: from localhost ([127.0.0.1]:54947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQQaf-0002kV-6m for submit@debbugs.gnu.org; Fri, 01 Nov 2019 02:39:21 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:51934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQQad-0002kB-0T for 37950-done@debbugs.gnu.org; Fri, 01 Nov 2019 02:39:19 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C04A0160101; Thu, 31 Oct 2019 23:39:12 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ZyJKPAQzoGQa; Thu, 31 Oct 2019 23:39:12 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E8A4F1604FF; Thu, 31 Oct 2019 23:39:11 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kxUe_8hJyfJB; Thu, 31 Oct 2019 23:39:11 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id B586F160101; Thu, 31 Oct 2019 23:39:11 -0700 (PDT) To: Juri Linkov From: Paul Eggert Subject: Re: 27.0.50; File error regression Organization: UCLA Computer Science Department Message-ID: Date: Thu, 31 Oct 2019 23:39:07 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------6440C4DEC798E46F6AB51740" Content-Language: en-US X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 37950-done Cc: 37950-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) This is a multi-part message in MIME format. --------------6440C4DEC798E46F6AB51740 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Thanks for the bug report. That one's my fault, as it was due to this patch: https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=ba0605779e0e207161441c08afdfac57ed603f69 which fixed a problem elsewhere but introduced a bug. I installed the attached patch to fix things. --------------6440C4DEC798E46F6AB51740 Content-Type: text/x-patch; name="0001-Fix-insert-file-contents-file-error-regression.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Fix-insert-file-contents-file-error-regression.patch" >From 3a1e7624ed234bb434cdafed59515cadd037cafa Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 31 Oct 2019 23:31:17 -0700 Subject: [PATCH] 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. --- src/fileio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index a3121a26da..01f8a04e5d 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4806,10 +4806,9 @@ by calling `format-decode', which see. */) unbind_to (count1, Qnil); } - if (!NILP (visit) - && current_buffer->modtime.tv_nsec == NONEXISTENT_MODTIME_NSECS) + if (!NILP (visit) && current_buffer->modtime.tv_nsec < 0) { - /* If visiting nonexistent file, return nil. */ + /* Signal an error if visiting a file that could not be opened. */ report_file_errno ("Opening input file", orig_filename, save_errno); } -- 2.17.1 --------------6440C4DEC798E46F6AB51740-- ------------=_1572590402-10631-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 27 Oct 2019 22:52:05 +0000 Received: from localhost ([127.0.0.1]:43641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOrOH-0006Gq-2Q for submit@debbugs.gnu.org; Sun, 27 Oct 2019 18:52:05 -0400 Received: from lists.gnu.org ([209.51.188.17]:44351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOrOF-0006Gg-Hb for submit@debbugs.gnu.org; Sun, 27 Oct 2019 18:52:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35200) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOrOE-0007Ti-6v for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 18:52:03 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOrOC-0003MJ-KQ for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 18:52:01 -0400 Received: from elephant.ash.relay.mailchannels.net ([23.83.222.57]:54056) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOrOB-0003KU-Rr for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 18:52:00 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 8876F340B2D for ; Sun, 27 Oct 2019 22:51:55 +0000 (UTC) Received: from pdx1-sub0-mail-a92.g.dreamhost.com (100-96-6-174.trex.outbound.svc.cluster.local [100.96.6.174]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 22358340D2A for ; Sun, 27 Oct 2019 22:51:55 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Received: from pdx1-sub0-mail-a92.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Sun, 27 Oct 2019 22:51:55 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Ski-Callous: 4740657b43df8064_1572216715368_4286716957 X-MC-Loop-Signature: 1572216715368:3744310998 X-MC-Ingress-Time: 1572216715368 Received: from pdx1-sub0-mail-a92.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a92.g.dreamhost.com (Postfix) with ESMTP id 7286A87F1C for ; Sun, 27 Oct 2019 15:51:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to :subject:date:message-id:mime-version:content-type; s= linkov.net; bh=CJFQ/pYVi2AgZQv84oN3orZRgP4=; b=w3ztxCx5C7f2E/unL dE6qdOQDn34/yFP8GJpmiP67uSUvu4gXdgHf9QcsVrgxvdvooEWXuu21rzqA5UDN Tv5EocFN3paEMW9eR3eCsTo01x7zvOGNwo30soQp9wtF0ct9WNwtOgovVPW56QM9 prIAwllPhr6mTtrbmxK48tkiqo= Received: from mail.jurta.org (m91-129-98-153.cust.tele2.ee [91.129.98.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a92.g.dreamhost.com (Postfix) with ESMTPSA id 1E6968791E for ; Sun, 27 Oct 2019 15:51:47 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a92 From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: 27.0.50; File error regression Organization: LINKOV.NET Date: Mon, 28 Oct 2019 00:50:25 +0200 Message-ID: <87k18pztu5.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.222.57 X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) 0. emacs -Q 1. in Dired type 'v' ('dired-view-file') to view a read-protected file, e.g. from non-root to visit a file with such permissions: -rw------- root root 2. Empty buffer is displayed (but the file size is several kilobytes) 3. The echo area displays the message: View mode: type C-h for help, h for commands, q to quit. 4. Visiting *Messages* reveals the error message: Note: file is write protected obscured by the View mode message above. But this error message is wrong anyway. In previous versions the error message was correct: find-file-noselect-1: File is not readable: and it rightfully refused to visit the read-protected file. In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2019-10-27 built on localhost Repository revision: c6667cc6a958e06fd43fb1ee0e80753adfefa49d Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Linux Mint 19 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Note: file is write protected View mode: type C-h for help, h for commands, q to quit. Configured using: 'configure --with-x-toolkit=gtk3 --with-xwidgets --with-xft --with-modules --enable-checking=yes,glyphs --enable-check-lisp-object-type 'CFLAGS=-O0 -g3 -gdwarf-4'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS PDUMPER LCMS2 GMP Important settings: value of $LC_MONETARY: et_EE.UTF-8 value of $LC_NUMERIC: en_US.UTF-8 value of $LC_TIME: en_DK.utf8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix ------------=_1572590402-10631-1--