From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: dired cons bug? Date: Thu, 11 Aug 2022 09:42:20 +0300 Message-ID: <83tu6jp9gz.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26235"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 11 08:43:12 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oM1uQ-0006bn-R6 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 11 Aug 2022 08:43:11 +0200 Original-Received: from localhost ([::1]:60902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oM1uP-0008JZ-RT for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 11 Aug 2022 02:43:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oM1tk-0008JM-Hk for help-gnu-emacs@gnu.org; Thu, 11 Aug 2022 02:42:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47588) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oM1tk-00028q-6L for help-gnu-emacs@gnu.org; Thu, 11 Aug 2022 02:42:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=4Dp2SgjoZzd0PSYXb/sHybZVXSH7DPpumPSYCB3E2Vs=; b=HnfeJJ/Lugsx 7PXDzzt+XcnYfBBrZSzAR8UI4IzD5n/P2nSxsTOZdC+ZYbE3XKUsTJ+bEHFIFCYdhwc8n5pZnLE+L dUggp83JfnJZYd9VzlF/GOB4wMbdhBzB6v8HR0x65rnfo+YDAah80Wc/fRoNx4Iricl1ctUqaUq+M 0Fzh4cMIhMH+MP5Oe2avJ5zbGWI4Z01IMWMCEUVqeG0ycnJ7gv390zYYm40CGBprE+fDQJqRyrYef 74D6HOZpXid9dlVEZBykVMLIZ/x+fi0l7xltluXgO39uTHA96Hgr9rfomNNoJmkugk1F5MxTYH8ki R2AZ990rsVTQE3b9IQH2iA==; Original-Received: from [87.69.77.57] (port=2270 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oM1tj-00053y-M9 for help-gnu-emacs@gnu.org; Thu, 11 Aug 2022 02:42:28 -0400 In-Reply-To: (message from Jean Louis on Thu, 11 Aug 2022 08:55:40 +0300) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138795 Archived-At: > Date: Thu, 11 Aug 2022 08:55:40 +0300 > From: Jean Louis > Cc: help-gnu-emacs@gnu.org > > * Harald Judt [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.