* bug#47850: 28.0.50; find-file-noselect non-nil nowarn argument effect in read-only buffers
@ 2021-04-17 21:00 dalanicolai
2021-05-04 9:47 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: dalanicolai @ 2021-04-17 21:00 UTC (permalink / raw)
To: 47850
Find-file-noselect buffer in non-existing directory with non-nil nowarn
argument e.g:
(switch-to-buffer (find-file-noselect "non-existing-dir/test.el" t))
the buffer will open in read-only mode.
Note that with a nowarn is nil argument, the buffer opens in an
editable mode as expected.
If it is not considered a technical bug then I would consider it a
documentation bug.
In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.25, cairo version 1.16.0)
of 2021-02-18 built on daniel-fedora
Repository revision: 185121da6978553d538d37d6d0e67dc52e13311f
Repository branch: feature/native-comp
Windowing system distributor 'The X.Org Foundation', version
11.0.12010000
System Description: Fedora 34 (Workstation Edition)
Configured using:
'configure --with-nativecomp'
Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP
NOTIFY INOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM GTK3 ZLIB
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=none
locale-coding-system: utf-8-unix
Major mode: Fundamental
Minor modes in effect:
global-company-mode: t
marginalia-mode: t
override-global-mode: t
selectrum-prescient-mode: t
prescient-persist-mode: t
selectrum-mode: t
general-override-mode: t
which-key-mode: t
shell-dirtrack-mode: t
evil-mode: t
evil-local-mode: t
straight-use-package-mode: t
straight-package-neutering-mode: t
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
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
/home/dalanicolai/.emacs.d/straight/build/org/ob-processing hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-processing
/home/dalanicolai/.emacs.d/straight/build/org/ob-io hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-io
/home/dalanicolai/.emacs.d/straight/build/org/ob-table hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-table
/home/dalanicolai/.emacs.d/straight/build/org/ob-ruby hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-ruby
/home/dalanicolai/.emacs.d/straight/build/org/ob-core hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-core
/home/dalanicolai/.emacs.d/straight/build/org/org-plot hides
/usr/local/share/emacs/28.0.50/lisp/org/org-plot
/home/dalanicolai/.emacs.d/straight/build/org/org-protocol hides
/usr/local/share/emacs/28.0.50/lisp/org/org-protocol
/home/dalanicolai/.emacs.d/straight/build/org/org-feed hides
/usr/local/share/emacs/28.0.50/lisp/org/org-feed
/home/dalanicolai/.emacs.d/straight/build/org/ol-mhe hides
/usr/local/share/emacs/28.0.50/lisp/org/ol-mhe
/home/dalanicolai/.emacs.d/straight/build/org/ob-picolisp hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-picolisp
/home/dalanicolai/.emacs.d/straight/build/org/ob-shell hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-shell
/home/dalanicolai/.emacs.d/straight/build/org/ol hides
/usr/local/share/emacs/28.0.50/lisp/org/ol
/home/dalanicolai/.emacs.d/straight/build/org/ob-clojure hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-clojure
/home/dalanicolai/.emacs.d/straight/build/org/ob-ditaa hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-ditaa
/home/dalanicolai/.emacs.d/straight/build/org/ox-man hides
/usr/local/share/emacs/28.0.50/lisp/org/ox-man
/home/dalanicolai/.emacs.d/straight/build/org/org-agenda hides
/usr/local/share/emacs/28.0.50/lisp/org/org-agenda
/home/dalanicolai/.emacs.d/straight/build/org/ob-screen hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-screen
/home/dalanicolai/.emacs.d/straight/build/org/ob-gnuplot hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-gnuplot
/home/dalanicolai/.emacs.d/straight/build/org/ob-coq hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-coq
/home/dalanicolai/.emacs.d/straight/build/org/org-mouse hides
/usr/local/share/emacs/28.0.50/lisp/org/org-mouse
/home/dalanicolai/.emacs.d/straight/build/org/org-element hides
/usr/local/share/emacs/28.0.50/lisp/org/org-element
/home/dalanicolai/.emacs.d/straight/build/org/ox-org hides
/usr/local/share/emacs/28.0.50/lisp/org/ox-org
/home/dalanicolai/.emacs.d/straight/build/org/ob-maxima hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-maxima
/home/dalanicolai/.emacs.d/straight/build/org/ob-makefile hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-makefile
/home/dalanicolai/.emacs.d/straight/build/org/ob-latex hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-latex
/home/dalanicolai/.emacs.d/straight/build/org/org-entities hides
/usr/local/share/emacs/28.0.50/lisp/org/org-entities
/home/dalanicolai/.emacs.d/straight/build/org/ox-md hides
/usr/local/share/emacs/28.0.50/lisp/org/ox-md
/home/dalanicolai/.emacs.d/straight/build/org/ob-lisp hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-lisp
/home/dalanicolai/.emacs.d/straight/build/org/org-list hides
/usr/local/share/emacs/28.0.50/lisp/org/org-list
/home/dalanicolai/.emacs.d/straight/build/org/ob-dot hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-dot
/home/dalanicolai/.emacs.d/straight/build/org/ob-sql hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-sql
/home/dalanicolai/.emacs.d/straight/build/org/ob-asymptote hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-asymptote
/home/dalanicolai/.emacs.d/straight/build/org/ob-ref hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-ref
/home/dalanicolai/.emacs.d/straight/build/org/ob-fortran hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-fortran
/home/dalanicolai/.emacs.d/straight/build/org/ob-mscgen hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-mscgen
/home/dalanicolai/.emacs.d/straight/build/org/ob-awk hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-awk
/home/dalanicolai/.emacs.d/straight/build/org/org-inlinetask hides
/usr/local/share/emacs/28.0.50/lisp/org/org-inlinetask
/home/dalanicolai/.emacs.d/straight/build/org/ol-rmail hides
/usr/local/share/emacs/28.0.50/lisp/org/ol-rmail
/home/dalanicolai/.emacs.d/straight/build/org/ob-calc hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-calc
/home/dalanicolai/.emacs.d/straight/build/org/org-lint hides
/usr/local/share/emacs/28.0.50/lisp/org/org-lint
/home/dalanicolai/.emacs.d/straight/build/org/ox-odt hides
/usr/local/share/emacs/28.0.50/lisp/org/ox-odt
/home/dalanicolai/.emacs.d/straight/build/org/ob-stan hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-stan
/home/dalanicolai/.emacs.d/straight/build/org/org-capture hides
/usr/local/share/emacs/28.0.50/lisp/org/org-capture
/home/dalanicolai/.emacs.d/straight/build/org/ol-irc hides
/usr/local/share/emacs/28.0.50/lisp/org/ol-irc
/home/dalanicolai/.emacs.d/straight/build/org/ox hides
/usr/local/share/emacs/28.0.50/lisp/org/ox
/home/dalanicolai/.emacs.d/straight/build/org/ob-ledger hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-ledger
/home/dalanicolai/.emacs.d/straight/build/org/org-habit hides
/usr/local/share/emacs/28.0.50/lisp/org/org-habit
/home/dalanicolai/.emacs.d/straight/build/org/ox-texinfo hides
/usr/local/share/emacs/28.0.50/lisp/org/ox-texinfo
/home/dalanicolai/.emacs.d/straight/build/org/ob-hledger hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-hledger
/home/dalanicolai/.emacs.d/straight/build/org/org-macro hides
/usr/local/share/emacs/28.0.50/lisp/org/org-macro
/home/dalanicolai/.emacs.d/straight/build/org/ob-ocaml hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-ocaml
/home/dalanicolai/.emacs.d/straight/build/org/ob-eshell hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-eshell
/home/dalanicolai/.emacs.d/straight/build/org/ob-sqlite hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-sqlite
/home/dalanicolai/.emacs.d/straight/build/org/org-datetree hides
/usr/local/share/emacs/28.0.50/lisp/org/org-datetree
/home/dalanicolai/.emacs.d/straight/build/org/org-ctags hides
/usr/local/share/emacs/28.0.50/lisp/org/org-ctags
/home/dalanicolai/.emacs.d/straight/build/org/org-refile hides
/usr/local/share/emacs/28.0.50/lisp/org/org-refile
/home/dalanicolai/.emacs.d/straight/build/org/org-duration hides
/usr/local/share/emacs/28.0.50/lisp/org/org-duration
/home/dalanicolai/.emacs.d/straight/build/org/ob-scheme hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-scheme
/home/dalanicolai/.emacs.d/straight/build/org/ol-eww hides
/usr/local/share/emacs/28.0.50/lisp/org/ol-eww
/home/dalanicolai/.emacs.d/straight/build/org/ob-js hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-js
/home/dalanicolai/.emacs.d/straight/build/org/org-indent hides
/usr/local/share/emacs/28.0.50/lisp/org/org-indent
/home/dalanicolai/.emacs.d/straight/build/org/ob-sed hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-sed
/home/dalanicolai/.emacs.d/straight/build/org/org hides
/usr/local/share/emacs/28.0.50/lisp/org/org
/home/dalanicolai/.emacs.d/straight/build/org/ob-lob hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-lob
/home/dalanicolai/.emacs.d/straight/build/org/org-colview hides
/usr/local/share/emacs/28.0.50/lisp/org/org-colview
/home/dalanicolai/.emacs.d/straight/build/org/org-keys hides
/usr/local/share/emacs/28.0.50/lisp/org/org-keys
/home/dalanicolai/.emacs.d/straight/build/org/ob-vala hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-vala
/home/dalanicolai/.emacs.d/straight/build/org/ob-sass hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-sass
/home/dalanicolai/.emacs.d/straight/build/org/ob-octave hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-octave
/home/dalanicolai/.emacs.d/straight/build/org/org-crypt hides
/usr/local/share/emacs/28.0.50/lisp/org/org-crypt
/home/dalanicolai/.emacs.d/straight/build/org/ob-forth hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-forth
/home/dalanicolai/.emacs.d/straight/build/org/ob-shen hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-shen
/home/dalanicolai/.emacs.d/straight/build/org/ob-python hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-python
/home/dalanicolai/.emacs.d/straight/build/org/ox-html hides
/usr/local/share/emacs/28.0.50/lisp/org/ox-html
/home/dalanicolai/.emacs.d/straight/build/org/ol-eshell hides
/usr/local/share/emacs/28.0.50/lisp/org/ol-eshell
/home/dalanicolai/.emacs.d/straight/build/org/ob hides
/usr/local/share/emacs/28.0.50/lisp/org/ob
/home/dalanicolai/.emacs.d/straight/build/org/ol-bbdb hides
/usr/local/share/emacs/28.0.50/lisp/org/ol-bbdb
/home/dalanicolai/.emacs.d/straight/build/org/org-install hides
/usr/local/share/emacs/28.0.50/lisp/org/org-install
/home/dalanicolai/.emacs.d/straight/build/org/ob-comint hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-comint
/home/dalanicolai/.emacs.d/straight/build/org/org-footnote hides
/usr/local/share/emacs/28.0.50/lisp/org/org-footnote
/home/dalanicolai/.emacs.d/straight/build/org/org-clock hides
/usr/local/share/emacs/28.0.50/lisp/org/org-clock
/home/dalanicolai/.emacs.d/straight/build/org/org-mobile hides
/usr/local/share/emacs/28.0.50/lisp/org/org-mobile
/home/dalanicolai/.emacs.d/straight/build/org/ob-ebnf hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-ebnf
/home/dalanicolai/.emacs.d/straight/build/org/ob-plantuml hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-plantuml
/home/dalanicolai/.emacs.d/straight/build/org/ox-publish hides
/usr/local/share/emacs/28.0.50/lisp/org/ox-publish
/home/dalanicolai/.emacs.d/straight/build/org/org-num hides
/usr/local/share/emacs/28.0.50/lisp/org/org-num
/home/dalanicolai/.emacs.d/straight/build/org/ol-docview hides
/usr/local/share/emacs/28.0.50/lisp/org/ol-docview
/home/dalanicolai/.emacs.d/straight/build/org/ob-abc hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-abc
/home/dalanicolai/.emacs.d/straight/build/org/ob-eval hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-eval
/home/dalanicolai/.emacs.d/straight/build/org/ob-haskell hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-haskell
/home/dalanicolai/.emacs.d/straight/build/org/ob-matlab hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-matlab
/home/dalanicolai/.emacs.d/straight/build/org/org-compat hides
/usr/local/share/emacs/28.0.50/lisp/org/org-compat
/home/dalanicolai/.emacs.d/straight/build/org/ol-bibtex hides
/usr/local/share/emacs/28.0.50/lisp/org/ol-bibtex
/home/dalanicolai/.emacs.d/straight/build/org/ob-tangle hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-tangle
/home/dalanicolai/.emacs.d/straight/build/org/org-tempo hides
/usr/local/share/emacs/28.0.50/lisp/org/org-tempo
/home/dalanicolai/.emacs.d/straight/build/org/org-goto hides
/usr/local/share/emacs/28.0.50/lisp/org/org-goto
/home/dalanicolai/.emacs.d/straight/build/org/org-archive hides
/usr/local/share/emacs/28.0.50/lisp/org/org-archive
/home/dalanicolai/.emacs.d/straight/build/org/ob-J hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-J
/home/dalanicolai/.emacs.d/straight/build/org/org-timer hides
/usr/local/share/emacs/28.0.50/lisp/org/org-timer
/home/dalanicolai/.emacs.d/straight/build/org/ox-latex hides
/usr/local/share/emacs/28.0.50/lisp/org/ox-latex
/home/dalanicolai/.emacs.d/straight/build/org/org-faces hides
/usr/local/share/emacs/28.0.50/lisp/org/org-faces
/home/dalanicolai/.emacs.d/straight/build/org/ob-emacs-lisp hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-emacs-lisp
/home/dalanicolai/.emacs.d/straight/build/org/ox-icalendar hides
/usr/local/share/emacs/28.0.50/lisp/org/ox-icalendar
/home/dalanicolai/.emacs.d/straight/build/org/ol-info hides
/usr/local/share/emacs/28.0.50/lisp/org/ol-info
/home/dalanicolai/.emacs.d/straight/build/org/org-id hides
/usr/local/share/emacs/28.0.50/lisp/org/org-id
/home/dalanicolai/.emacs.d/straight/build/org/org-attach-git hides
/usr/local/share/emacs/28.0.50/lisp/org/org-attach-git
/home/dalanicolai/.emacs.d/straight/build/org/org-table hides
/usr/local/share/emacs/28.0.50/lisp/org/org-table
/home/dalanicolai/.emacs.d/straight/build/org/org-attach hides
/usr/local/share/emacs/28.0.50/lisp/org/org-attach
/home/dalanicolai/.emacs.d/straight/build/org/ob-exp hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-exp
/home/dalanicolai/.emacs.d/straight/build/org/org-macs hides
/usr/local/share/emacs/28.0.50/lisp/org/org-macs
/home/dalanicolai/.emacs.d/straight/build/org/ob-java hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-java
/home/dalanicolai/.emacs.d/straight/build/org/ob-lilypond hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-lilypond
/home/dalanicolai/.emacs.d/straight/build/org/ol-gnus hides
/usr/local/share/emacs/28.0.50/lisp/org/ol-gnus
/home/dalanicolai/.emacs.d/straight/build/org/ob-org hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-org
/home/dalanicolai/.emacs.d/straight/build/org/ob-C hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-C
/home/dalanicolai/.emacs.d/straight/build/org/ob-lua hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-lua
/home/dalanicolai/.emacs.d/straight/build/org/org-pcomplete hides
/usr/local/share/emacs/28.0.50/lisp/org/org-pcomplete
/home/dalanicolai/.emacs.d/straight/build/org/org-version hides
/usr/local/share/emacs/28.0.50/lisp/org/org-version
/home/dalanicolai/.emacs.d/straight/build/org/ox-ascii hides
/usr/local/share/emacs/28.0.50/lisp/org/ox-ascii
/home/dalanicolai/.emacs.d/straight/build/org/ob-R hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-R
/home/dalanicolai/.emacs.d/straight/build/org/ob-groovy hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-groovy
/home/dalanicolai/.emacs.d/straight/build/org/org-src hides
/usr/local/share/emacs/28.0.50/lisp/org/org-src
/home/dalanicolai/.emacs.d/straight/build/org/ob-perl hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-perl
/home/dalanicolai/.emacs.d/straight/build/org/ob-css hides
/usr/local/share/emacs/28.0.50/lisp/org/ob-css
/home/dalanicolai/.emacs.d/straight/build/org/ox-beamer hides
/usr/local/share/emacs/28.0.50/lisp/org/ox-beamer
/home/dalanicolai/.emacs.d/straight/build/org/ol-w3m hides
/usr/local/share/emacs/28.0.50/lisp/org/ol-w3m
/home/dalanicolai/.emacs.d/straight/build/org/org-loaddefs hides
/usr/local/share/emacs/28.0.50/lisp/org/org-loaddefs
/home/dalanicolai/.emacs.d/straight/build/let-alist/let-alist hides
/usr/local/share/emacs/28.0.50/lisp/emacs-lisp/let-alist
Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
derived epg epg-config gnus-util rmail mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail char-fold
two-column org-element avl-tree ol-rmail ol-mhe ol-irc ol-info
rmail-loaddefs auth-source password-cache json rfc2047 rfc2045
ietf-drums text-property-search mail-utils mm-util mail-prsvr wid-edit
ol-docview doc-view jka-compr image-mode exif dired dired-loaddefs
ol-bibtex bibtex iso8601 ol-bbdb ol-w3m org ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete
org-list org-faces org-entities time-date noutline outline org-version
ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat org-macs
org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs
mule-util .emacs company-oddmuse company-keywords company-etags etags
fileloop generator xref project eieio eieio-core eieio-loaddefs
company-gtags company-dabbrev-code company-dabbrev company-files
company-clang company-capf company-cmake company-semantic
company-template company-bbdb company company-autoloads webkit-
autoloads
org-journal-autoloads embark-consult-autoloads embark-autoloads
marginalia marginalia-autoloads use-package-ensure
consult-flycheck-autoloads flycheck-autoloads let-alist-autoloads
pkg-info-autoloads epl-autoloads dash-autoloads consult-autoloads
use-package-bind-key bind-key use-package-core selectrum-prescient
selectrum minibuf-eldef map crm prescient selectrum-prescient-autoloads
prescient-autoloads selectrum-autoloads easy-mmode general
general-autoloads which-key which-key-autoloads evil evil-keybindings
evil-integration evil-maps evil-commands reveal flyspell ispell
evil-jumps evil-command-window evil-types evil-search evil-ex shell
pcomplete comint ansi-color evil-macros evil-repeat evil-states
evil-core comp comp-cstr warnings rx advice evil-common windmove
thingatpt rect evil-digraphs evil-vars ring edmacro kmacro
evil-autoloads finder-inf goto-chg-autoloads use-package-autoloads
bind-key-autoloads straight-autoloads info cl-seq cl-extra help-mode
easymenu seq byte-opt straight subr-x cl-macs gv cl-loaddefs cl-lib
bytecomp byte-compile cconv iso-transl tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer 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 composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face pcase macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process nativecomp
emacs)
Memory information:
((conses 16 302569 23769)
(symbols 48 23008 0)
(strings 32 83436 3984)
(string-bytes 1 3261315)
(vectors 16 37739)
(vector-slots 8 713121 22869)
(floats 8 187 77)
(intervals 56 648 0)
(buffers 992 16))
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#47850: 28.0.50; find-file-noselect non-nil nowarn argument effect in read-only buffers
2021-04-17 21:00 bug#47850: 28.0.50; find-file-noselect non-nil nowarn argument effect in read-only buffers dalanicolai
@ 2021-05-04 9:47 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-04 9:47 UTC (permalink / raw)
To: dalanicolai; +Cc: 47850
dalanicolai@gmail.com writes:
> Find-file-noselect buffer in non-existing directory with non-nil nowarn
> argument e.g:
>
> (switch-to-buffer (find-file-noselect "non-existing-dir/test.el" t))
>
> the buffer will open in read-only mode.
>
> Note that with a nowarn is nil argument, the buffer opens in an
> editable mode as expected.
>
> If it is not considered a technical bug then I would consider it a
> documentation bug.
I think it's a bug. It stems from this thing:
(defun after-find-file (&optional error warn noauto
_after-find-file-from-revert-buffer
nomodes)
[...]
(cond
((not warn) nil)
((and error (file-exists-p buffer-file-name))
(setq buffer-read-only t)
"File exists, but cannot be read")
((and error (file-symlink-p buffer-file-name))
"Symbolic link that points to nonexistent file")
((not buffer-read-only)
(if (and warn
Already here the code is pretty dubious, because we've already skipped
all this if warn is non-nil... Anyway, here's the problem:
[...]
(t
(setq buffer-read-only nil)
(unless (file-directory-p default-directory)
"Use M-x make-directory RET RET to create the directory and its parents")))))
We should do this action even if warn is non-nil, I think? Or more
generally, we should do all the actions in that cond, but not actually
issue the warning.
I've now done this on the trunk... this means that those file-exists-p
things are run in the nil WARN case, so the behaviour is slightly
different than before, and it's possible that this may lead to
regressions, I think, but it seems unlikely to me.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-04 9:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-17 21:00 bug#47850: 28.0.50; find-file-noselect non-nil nowarn argument effect in read-only buffers dalanicolai
2021-05-04 9:47 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).