1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-11 00:32:06 -07:00
emacs/test/lisp
Stephen Berman 3b7d9e37ce Implement new Dired handling of errors from 'ls'
The error messages are now displayed in a popped up buffer instead
of being output in the Dired buffer and signalling an error.  The
file name bounds in Dired entries are now determined solely by the
offsets calculated by 'ls' with the --dired option and
consequently Dired now reliably recognizes file names that contain
a newline (bug#80499).

* etc/NEWS: Announce new Dired handling of errors from 'ls'.

* lisp/dired.el (dired-internal-noselect): Check Dired buffer for
file entries and if there are none kill the buffer to prevent
displaying a Dired buffer with no file entries.
(dired--ls-error-buffer): New variable.
(dired--display-ls-error): New function.
(dired, dired-other-window, dired-other-frame, dired-other-tab):
Use it to pop up buffer with error message emitted by 'ls'.

* lisp/files.el (insert-directory-clean): Remove the code that
treats lines beginning at column 0 in a Dired buffer as error
lines and consequently also remove the code using these lines to
adjust the offsets specifying the bounds of the file name in the
Dired entries.  If the buffer contains a //DIRED-OPTIONS// line
output by --dired, delete this line even when it is at BOB.
(insert-directory): Remove the code that checks the return value
of 'ls' and signals an error based on that value.  Write any error
message emitted by 'ls' to a temporary file and insert its content
into a buffer, which will be popped when invoking a Dired command
results in the 'ls' error.  Adjust the comment above this function
to accommodate file names containing a newline in Dired entries.
(insert-directory-adj-pos): Remove this now unused function.

* test/lisp/dired-tests.el (dired-test-filename-with-newline-1)
(dired-test-filename-with-newline-2)
(dired-test-ls-error-message): New tests.

* test/lisp/files-tests.el
(files-tests-file-name-non-special-insert-directory): Adjust test
to use of 'ls' error buffer instead of signaling an error.
2026-03-27 16:36:16 +01:00
..
align-resources
auth-source-resources
bookmark-resources
calc calc: Improve handling of invalid 'calc-string-maximum-character' 2026-01-17 14:48:06 +02:00
calendar Fix `diary-rrule' recurrence rule calculation (Bug#80460) 2026-02-26 14:25:22 +02:00
cedet
custom-resources
dabbrev-resources
dired-resources/insert-directory
emacs-lisp vtable truncate-string-pixelwise, ellipsis can be a string (bug#80026) 2026-03-21 12:50:04 +02:00
emulation
epg-resources
erc Add tests for erc-track-faces-normal-list regression 2026-03-23 18:16:31 -07:00
eshell Revert "Repair serious breakage in the batch tests." 2026-03-04 19:24:52 +01:00
faces-resources
files-resources
gnus Revert "Repair serious breakage in the batch tests." 2026-03-04 19:24:52 +01:00
hfy-cmap-resources
image
international
language
loadhist-resources
mail Make Rmail summary address display customizable 2026-02-21 19:30:25 +02:00
mh-e
minibuffer-resources
net Improve tramp-tests.el 2026-03-11 16:26:35 +01:00
nxml
obsolete
org
pcmpl-linux-resources
play
progmodes hideshow: New minor mode 'hs-indentation-mode'. (Bug#80179) 2026-03-19 17:11:54 +02:00
saveplace-resources
so-long-tests
term
textmodes ; Fix one of ispell-tests 2026-01-18 22:15:18 +02:00
time-resources
url
use-package ; Adjust use-package tests for :vc 2026-03-19 21:38:29 +01:00
vc Tweak recent error descriptor changes 2026-03-11 16:05:04 -04:00
xdg-resources
abbrev-tests.el
align-tests.el Fix aligning buffer regions containing multiple alignment sections 2026-02-05 10:51:16 +02:00
allout-tests.el
allout-widgets-tests.el
ansi-color-tests.el
ansi-osc-tests.el
apropos-tests.el
arc-mode-tests.el test subdirectory: Use new error-API 2026-03-10 10:48:22 -04:00
auth-source-pass-tests.el Improve last change to auth-source-pass 2026-03-26 15:05:22 +01:00
auth-source-tests.el
autoinsert-tests.el
autorevert-tests.el test subdirectory: Use new error-API 2026-03-10 10:48:22 -04:00
battery-tests.el
bookmark-tests.el
buff-menu-tests.el
button-tests.el
calculator-tests.el
char-fold-tests.el
color-tests.el
comint-tests.el
completion-preview-tests.el
completion-tests.el
cus-edit-tests.el
custom-tests.el
dabbrev-tests.el
delim-col-tests.el
descr-text-tests.el
desktop-tests.el
dired-aux-tests.el
dired-tests.el Implement new Dired handling of errors from 'ls' 2026-03-27 16:36:16 +01:00
dired-x-tests.el
dnd-tests.el
dom-tests.el
edmacro-tests.el
electric-tests.el
elide-head-tests.el
env-tests.el
epg-config-tests.el
epg-tests.el Revert "Repair serious breakage in the batch tests." 2026-03-04 19:24:52 +01:00
faces-tests.el
ffap-tests.el
filenotify-tests.el ; Instrument filenotify test 2026-01-27 18:49:37 +01:00
files-tests.el Implement new Dired handling of errors from 'ls' 2026-03-27 16:36:16 +01:00
files-x-tests.el
find-cmd-tests.el
follow-tests.el
font-lock-tests.el
format-spec-tests.el
help-fns-tests.el
help-mode-tests.el
help-tests.el
hfy-cmap-tests.el
hi-lock-tests.el
hl-line-tests.el
htmlfontify-tests.el
ibuffer-tests.el
ido-tests.el
image-file-tests.el
image-tests.el
imenu-tests.el
info-tests.el
info-xref-tests.el
isearch-tests.el
jit-lock-tests.el
json-tests.el Prefer value< with new 'sort' in json.el 2026-02-14 18:56:44 +01:00
jsonrpc-tests.el Revert "Repair serious breakage in the batch tests." 2026-03-04 19:24:52 +01:00
kmacro-tests.el
loadhist-tests.el
lpr-tests.el
ls-lisp-tests.el
man-tests.el
md4-tests.el
minibuffer-tests.el Rewrite flex completion with Gotoh algorithm 2026-02-13 23:46:11 +00:00
misc-tests.el ; Minor changes to 'truncate-string-pixelwise' (bug#80244) 2026-02-07 14:49:15 +02:00
mouse-tests.el
mwheel-tests.el
newcomment-tests.el
obarray-tests.el
paren-tests.el
password-cache-tests.el
pcmpl-linux-tests.el
pcomplete-tests.el
proced-tests.el test subdirectory: Use new error-API 2026-03-10 10:48:22 -04:00
ps-print-tests.el
register-tests.el
repeat-tests.el
replace-tests.el
rot13-tests.el
savehist-tests.el
saveplace-tests.el
scroll-lock-tests.el
server-tests.el Revert "Repair serious breakage in the batch tests." 2026-03-04 19:24:52 +01:00
ses-tests.el Check all SES local variables are always set locally. 2026-03-24 18:18:10 +01:00
shadowfile-tests.el
shell-tests.el
simple-tests.el simple-tests.el: Use kmacro function 2026-03-20 23:19:43 -04:00
sort-tests.el
soundex-tests.el
speedbar-tests.el
sqlite-tests.el
startup-tests.el
subr-tests.el ; Update tests to match rename of 'any' to 'member-if'. 2026-03-23 12:23:26 +00:00
tab-bar-tests.el Revert "Repair serious breakage in the batch tests." 2026-03-04 19:24:52 +01:00
tabify-tests.el
tar-mode-tests.el
tempo-tests.el
term-tests.el
thingatpt-tests.el
thread-tests.el
time-stamp-tests.el time-stamp-helper-string-used: New test 2026-01-05 15:23:01 -08:00
time-tests.el
timezone-tests.el
uniquify-tests.el
version-tests.el
visual-wrap-tests.el
wdired-tests.el Revert "Repair serious breakage in the batch tests." 2026-03-04 19:24:52 +01:00
which-key-tests.el
whitespace-tests.el
wid-edit-tests.el
winner-tests.el
x-dnd-tests.el
xdg-tests.el
xml-tests.el
xt-mouse-tests.el Add predicate for initial_terminal 2026-03-26 15:19:56 +01:00
yank-media-tests.el