* 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
* bug#18836: 25.0.50; `insert-directory' barfs on nonexistent file, but not for `ls-lisp-insert-directory'
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
2022-01-25 14:13 ` Lars Ingebrigtsen
1 sibling, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-30 14:56 UTC (permalink / raw)
To: Drew Adams; +Cc: 18836
Drew Adams <drew.adams@oracle.com> writes:
> Would it be possible to make vanilla `insert-directory' more tolerant,
> i.e., make it act like `ls-lisp-insert-directory', in this respect?
I have no opinion on that, but: What on Earth is that function (and all
its adjacent functions) doing in files.el?
(insert-directory "." "-l")
=>
drwxrwxr-x 22 larsi larsi 4096 april 30 16:49 .
This doesn't seem like a very ... useful general function.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#18836: 25.0.50; `insert-directory' barfs on nonexistent file, but not for `ls-lisp-insert-directory'
2016-04-30 14:56 ` Lars Ingebrigtsen
@ 2016-04-30 15:39 ` Eli Zaretskii
2016-04-30 15:46 ` Lars Ingebrigtsen
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2016-04-30 15:39 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 18836
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Sat, 30 Apr 2016 16:56:19 +0200
> Cc: 18836@debbugs.gnu.org
>
> > Would it be possible to make vanilla `insert-directory' more tolerant,
> > i.e., make it act like `ls-lisp-insert-directory', in this respect?
>
> I have no opinion on that, but: What on Earth is that function (and all
> its adjacent functions) doing in files.el?
Where else would you like them to be?
> (insert-directory "." "-l")
> =>
> drwxrwxr-x 22 larsi larsi 4096 april 30 16:49 .
>
> This doesn't seem like a very ... useful general function.
Then how come dired.el calls it?
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#18836: 25.0.50; `insert-directory' barfs on nonexistent file, but not for `ls-lisp-insert-directory'
2016-04-30 15:39 ` Eli Zaretskii
@ 2016-04-30 15:46 ` Lars Ingebrigtsen
2016-04-30 15:53 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-30 15:46 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 18836
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Date: Sat, 30 Apr 2016 16:56:19 +0200
>> Cc: 18836@debbugs.gnu.org
>>
>> > Would it be possible to make vanilla `insert-directory' more tolerant,
>> > i.e., make it act like `ls-lisp-insert-directory', in this respect?
>>
>> I have no opinion on that, but: What on Earth is that function (and all
>> its adjacent functions) doing in files.el?
>
> Where else would you like them to be?
In dired.el.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#18836: 25.0.50; `insert-directory' barfs on nonexistent file, but not for `ls-lisp-insert-directory'
2016-04-30 15:46 ` Lars Ingebrigtsen
@ 2016-04-30 15:53 ` Eli Zaretskii
2016-04-30 16:05 ` Lars Ingebrigtsen
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2016-04-30 15:53 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 18836
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: 18836@debbugs.gnu.org
> Date: Sat, 30 Apr 2016 17:46:10 +0200
>
> >> I have no opinion on that, but: What on Earth is that function (and all
> >> its adjacent functions) doing in files.el?
> >
> > Where else would you like them to be?
>
> In dired.el.
Dired isn't preloaded.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#18836: 25.0.50; `insert-directory' barfs on nonexistent file, but not for `ls-lisp-insert-directory'
2016-04-30 15:53 ` Eli Zaretskii
@ 2016-04-30 16:05 ` Lars Ingebrigtsen
2016-04-30 16:20 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-30 16:05 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 18836
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Cc: 18836@debbugs.gnu.org
>> Date: Sat, 30 Apr 2016 17:46:10 +0200
>>
>> >> I have no opinion on that, but: What on Earth is that function (and all
>> >> its adjacent functions) doing in files.el?
>> >
>> > Where else would you like them to be?
>>
>> In dired.el.
>
> Dired isn't preloaded.
But does anything other than dired use it? I see that other packages
(like ange-ftp) instrument it... it that the reason it's in files.el?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#18836: 25.0.50; `insert-directory' barfs on nonexistent file, but not for `ls-lisp-insert-directory'
2016-04-30 16:05 ` Lars Ingebrigtsen
@ 2016-04-30 16:20 ` Eli Zaretskii
0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2016-04-30 16:20 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 18836
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: 18836@debbugs.gnu.org
> Date: Sat, 30 Apr 2016 18:05:06 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Lars Ingebrigtsen <larsi@gnus.org>
> >> Cc: 18836@debbugs.gnu.org
> >> Date: Sat, 30 Apr 2016 17:46:10 +0200
> >>
> >> >> I have no opinion on that, but: What on Earth is that function (and all
> >> >> its adjacent functions) doing in files.el?
> >> >
> >> > Where else would you like them to be?
> >>
> >> In dired.el.
> >
> > Dired isn't preloaded.
>
> But does anything other than dired use it? I see that other packages
> (like ange-ftp) instrument it... it that the reason it's in files.el?
Yes. Also, ls-lisp.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#18836: 25.0.50; `insert-directory' barfs on nonexistent file, but not for `ls-lisp-insert-directory'
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
@ 2022-01-25 14:13 ` Lars Ingebrigtsen
2022-01-25 16:07 ` bug#18836: [External] : " Drew Adams
1 sibling, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-25 14:13 UTC (permalink / raw)
To: Drew Adams; +Cc: 18836
Drew Adams <drew.adams@oracle.com> writes:
> 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 has changed between reporting this bug and now -- both now signal
errors currently, so I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#18836: [External] : Re: bug#18836: 25.0.50; `insert-directory' barfs on nonexistent file, but not for `ls-lisp-insert-directory'
2022-01-25 14:13 ` Lars Ingebrigtsen
@ 2022-01-25 16:07 ` Drew Adams
0 siblings, 0 replies; 9+ messages in thread
From: Drew Adams @ 2022-01-25 16:07 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 18836@debbugs.gnu.org
> This has changed between reporting this bug and now -- both now signal
> errors currently, so I'm closing this bug report.
Thanks.
I've filed bug #53524 for the additional improvement.
Users should be able to create the listing, with the
missing file/dir. An error should be raised only if
and when you try to visit that file/dir.
^ 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).