* bug#35390: 26.2; [PATCH] `ls-lisp--dired', like `dired', should accept nil DIR-OR-LIST argument
@ 2019-04-23 12:24 Drew Adams
2019-06-23 17:25 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2019-04-23 12:24 UTC (permalink / raw)
To: 35390
The doc of command `dired' does not define the behavior if its DIRNAME
argument is not a string or a cons. `dired' just passes this arg to
`dired-noselect', and `dired-noselect' starts by doing this:
(or dir-or-list (setq dir-or-list default-directory))
This means that `dired', via `dired-noselect', handles a nil value for
DIRNAME by using the value of `default-directory' (a string).
`ls-lisp--dired' should do the same - it is a stand-in for `dired'.
Currently it raises an error if passed nil as the directory. It would
make sense to add this at the beginning of `ls-lisp--dired' (just after
the `interactive' spec):
(unless dir-or-list (setq dir-or-list default-directory))
That's the "patch" - just add that line as indicated.
[BTW, the doc string of `dired' has this as its last line, which doesn't
make sense - DIRNAME is either a directory name or a cons of a directory
name and a list of file names:
"If DIRNAME is already in a Dired buffer"...
I think it's trying to say that if _the directory specified by DIRNAME_
is already shown in a Dired buffer...]
In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
of 2019-04-13
Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749
Windowing system distributor `Microsoft Corp.', version 10.0.17134
Configured using:
`configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static -g3''
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#35390: 26.2; [PATCH] `ls-lisp--dired', like `dired', should accept nil DIR-OR-LIST argument
2019-04-23 12:24 bug#35390: 26.2; [PATCH] `ls-lisp--dired', like `dired', should accept nil DIR-OR-LIST argument Drew Adams
@ 2019-06-23 17:25 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-23 17:25 UTC (permalink / raw)
To: Drew Adams; +Cc: 35390
Drew Adams <drew.adams@oracle.com> writes:
> The doc of command `dired' does not define the behavior if its DIRNAME
> argument is not a string or a cons. `dired' just passes this arg to
> `dired-noselect', and `dired-noselect' starts by doing this:
>
> (or dir-or-list (setq dir-or-list default-directory))
>
> This means that `dired', via `dired-noselect', handles a nil value for
> DIRNAME by using the value of `default-directory' (a string).
>
> `ls-lisp--dired' should do the same - it is a stand-in for `dired'.
Makes sense.
> Currently it raises an error if passed nil as the directory. It would
> make sense to add this at the beginning of `ls-lisp--dired' (just after
> the `interactive' spec):
>
> (unless dir-or-list (setq dir-or-list default-directory))
>
> That's the "patch" - just add that line as indicated.
In the future, could you submit code changes as real patches, with
changelog entries on the normal format? Thanks.
I've now done this change manually, though.
--
(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:[~2019-06-23 17:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-23 12:24 bug#35390: 26.2; [PATCH] `ls-lisp--dired', like `dired', should accept nil DIR-OR-LIST argument Drew Adams
2019-06-23 17:25 ` 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).