unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18836: 25.0.50; `insert-directory' barfs on nonexistent file, but not for `ls-lisp-insert-directory'
@ 2014-10-25 19:55 Drew Adams
  2016-04-30 14:56 ` Lars Ingebrigtsen
  2022-01-25 14:13 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 9+ messages in thread
From: Drew Adams @ 2014-10-25 19:55 UTC (permalink / raw)
  To: 18836

It seems that at least on some platforms (e.g. GNU/Linux), if you give
an explicit list of files and dirs to `dired', to list (which you do by
passing a cons as argument DIRNAME), the command fails with an error:
(file-error "Reading directory"
            "no such file or directory"
            "/usr/foo/no-such-file.txt")

No such error is raised on platforms that use `ls-lisp'.

This non-`ls-lisp' behavior is not as friendly as it could be, and not
as friendly as the `ls-lisp-insert-directory' behavior, which simply
displays a message and then calls `ding':
(message "%s: doesn't exist or is inaccessible" file)

Would it be possible to make vanilla `insert-directory' more tolerant,
i.e., make it act like `ls-lisp-insert-directory', in this respect?
Failing to access a single file should not prevent listing the others,
if this can be handled properly.  But maybe it's not feasible; dunno.

[FWIW, I would even prefer to see the file or dir listed in the Dired
buffer, even if it does not (yet) exist.  Let user attempts to actually
access it raise an error, and let no error be raised if the file is
created after creating the Dired buffer but before the user tries to
access the file.]

In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
 of 2014-10-20 on LEG570
Bzr revision: 118168 rgm@gnu.org-20141020195941-icp42t8ttcnud09g
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking=yes,glyphs CPPFLAGS=-DGLYPH_DEBUG=1'





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-01-25 16:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-25 19:55 bug#18836: 25.0.50; `insert-directory' barfs on nonexistent file, but not for `ls-lisp-insert-directory' Drew Adams
2016-04-30 14:56 ` Lars Ingebrigtsen
2016-04-30 15:39   ` Eli Zaretskii
2016-04-30 15:46     ` Lars Ingebrigtsen
2016-04-30 15:53       ` Eli Zaretskii
2016-04-30 16:05         ` Lars Ingebrigtsen
2016-04-30 16:20           ` Eli Zaretskii
2022-01-25 14:13 ` Lars Ingebrigtsen
2022-01-25 16:07   ` bug#18836: [External] : " Drew Adams

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).