[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dired cons bug?
From: |
Eli Zaretskii |
Subject: |
Re: dired cons bug? |
Date: |
Thu, 11 Aug 2022 09:42:20 +0300 |
> Date: Thu, 11 Aug 2022 08:55:40 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: help-gnu-emacs@gnu.org
>
> * Harald Judt <h.judt@gmx.at> [2022-08-11 08:05]:
> > Hi,
> >
> > I have a question regarding using dired programmatically in Emacs 28.1. Say
> > I
> > do the following call to open a dired buffer and insert the files:
> >
> > (dired "/home/"(cons "/home/admin" '("/home/user/tmp/test/a/a"
> > "/home/user/tmp/test/b/b" "/home/user/tmp/test/c/c")))
>
> Function is not intended to be use that way.
>
> (dired DIRNAME &optional SWITCHES)
>
> DIRNAME must be directory name. Not cons and some files inside.
Did you consult the doc string before writing the above? It says:
If DIRNAME is a string, Dired displays a list of files in DIRNAME (which
may also have shell wildcards appended to select certain files).
If DIRNAME is a cons, its first element is taken as the directory name
and the rest as an explicit list of files to make directory entries for.
In this case, SWITCHES are applied to each of the files separately, and
therefore switches that control the order of the files in the produced
listing have no effect.
So yes, passing a cons as an argument _is_ supported.
To the OP: please report this as a bug using report-emacs-bug, so that
we could fix it.