Subject: 25.3; Unnecessary question when trying to open large unreadable file

From: Rabbe Fogelholm <[email-masked]>
Date: Sun, 3 Dec 2017 14:54:01 +0100

When using C-X C-F to open a large and not readable file I get this question,

    File emerge.log is large (12.4M), really open? (y or n)

Then, after pushing 'y', I get

    File is not readable: /var/log/emerge.log

>From a user interface perspective this is somewhat inefficient. In most cases it
would be enough to just be told that the file is not readable. So, my suggestion
is to display the "really open?" question only when it is in fact otherwise possible
to open the file.

In GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.19)
 of 2017-12-03 built on etna
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
System Description:	Gentoo Base System release 2.4.1

Configured using:
 'configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --disable-dependency-tracking
 --disable-silent-rules --docdir=/usr/share/doc/emacs-25.3
 --htmldir=/usr/share/doc/emacs-25.3/html --libdir=/usr/lib64
 --program-suffix=-emacs-25 --infodir=/usr/share/info/emacs-25
 --localstatedir=/var
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --with-gameuser=:gamestat --without-compress-install
 --with-file-notification=inotify --enable-acl --with-dbus
 --without-modules --with-gpm --without-hesiod --without-kerberos
 --without-kerberos5 --without-xml2 --without-selinux --with-gnutls
 --without-wide-int --with-zlib --with-sound=alsa --with-x --without-ns
 --without-gconf --without-gsettings --without-toolkit-scroll-bars
 --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm
 --without-imagemagick --without-xft --without-cairo --without-libotf
 --without-m17n-flt --with-x-toolkit=gtk3 --without-xwidgets
 GENTOO_PACKAGE=app-editors/emacs-25.3 'CFLAGS=-march=native -Os -pipe'
 CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS NOTIFY ACL GNUTLS ZLIB GTK3
X11

Important settings:
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: Text

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Auto-saving...done
Mark set [2 times]
Saving file /home/erarafo/emptytree-resume.txt...
Wrote /home/erarafo/emptytree-resume.txt
Mark saved where search started [2 times]
File emerge.log is large (12.4M), really open? (y or n) y
find-file-noselect-1: File is not readable: /var/log/emerge.log
File emerge.log is large (12.4M), really open? (y or n) y
find-file-noselect-1: File is not readable: /var/log/emerge.log
File emerge.log is large (12.4M), really open? (y or n) y
find-file-noselect-1: File is not readable: /var/log/emerge.log

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message idna dired format-spec rfc822
mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu
cl-loaddefs pcase cl-lib mail-prsvr mail-utils misearch multi-isearch
site-gentoo time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese charscript
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote dbusbind inotify
dynamic-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 88121 7524)
 (symbols 48 19709 0)
 (miscs 40 64 238)
 (strings 32 14469 5061)
 (string-bytes 1 415682)
 (vectors 16 12784)
 (vector-slots 8 471414 7813)
 (floats 8 164 391)
 (intervals 56 296 15)
 (buffers 976 18))