From unknown Sat Sep 20 13:35:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35390: 26.2; [PATCH] `ls-lisp--dired', like `dired', should accept nil DIR-OR-LIST argument Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Apr 2019 12:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35390 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 35390@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155602231121602 (code B ref -1); Tue, 23 Apr 2019 12:26:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Apr 2019 12:25:11 +0000 Received: from localhost ([127.0.0.1]:52657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIuU3-0005cM-66 for submit@debbugs.gnu.org; Tue, 23 Apr 2019 08:25:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35085) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIuU1-0005c3-D5 for submit@debbugs.gnu.org; Tue, 23 Apr 2019 08:25:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:58450) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hIuTw-0000fZ-6w for submit@debbugs.gnu.org; Tue, 23 Apr 2019 08:25:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIuTv-0002Sf-0l for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 08:25:03 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_MED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hIuTt-0000eW-Ui for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 08:25:02 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:60010) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hIuTt-0000dZ-Ma for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 08:25:01 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3NCOF46005668 for ; Tue, 23 Apr 2019 12:24:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=Yb2Q+D/BdNCY6E6KEyOVfu2OYGkGwBi0Obp6sUZWM88=; b=qflQnF4Xajwe4Fk9glgI7BITpfFgVQdTEM7fhOCmcYV1FjJl3siB+3iozzqPXZA7c5Hd 0mwpbsxqpXTI0ATHJu7JRT4L79RdgcwHCtY3NsHMS6gvvzjGXoTmCDsLKKOM7h9W7Gh7 csCA9Qt9W4MCGhxoHG5pXOT/i7cnXRejXMbxtLPyEmytQIb/K2AuBI+MtgmM1DjzAB9/ VA3HGrLJbAJuODwJjtT1R/sPY7QMS1Gul9Xw9kfNyWdxIoJb7jUSdJ3jbwJjXRduvUoL T+nEelsCl+KwuSDPpuFMeyG00eWD7NnX5eabEARhiUrvnbbsfYiyCjTIE2xBRB1D36Sz JA== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2130.oracle.com with ESMTP id 2ryrxcuyxf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 23 Apr 2019 12:24:59 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3NCOUY5040472 for ; Tue, 23 Apr 2019 12:24:58 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 2s0f0vfe06-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 23 Apr 2019 12:24:58 +0000 Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x3NCOvKr010061 for ; Tue, 23 Apr 2019 12:24:57 GMT MIME-Version: 1.0 Message-ID: Date: Tue, 23 Apr 2019 05:24:56 -0700 (PDT) From: Drew Adams X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4834.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9235 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904230086 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9235 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904230087 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 141.146.126.79 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3'' From unknown Sat Sep 20 13:35:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35390: 26.2; [PATCH] `ls-lisp--dired', like `dired', should accept nil DIR-OR-LIST argument Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Jun 2019 17:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35390 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 35390@debbugs.gnu.org Received: via spool by 35390-submit@debbugs.gnu.org id=B35390.156131072227472 (code B ref 35390); Sun, 23 Jun 2019 17:26:02 +0000 Received: (at 35390) by debbugs.gnu.org; 23 Jun 2019 17:25:22 +0000 Received: from localhost ([127.0.0.1]:54425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hf6F0-000791-FF for submit@debbugs.gnu.org; Sun, 23 Jun 2019 13:25:22 -0400 Received: from quimby.gnus.org ([80.91.231.51]:44032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hf6Ey-00078r-Ky for 35390@debbugs.gnu.org; Sun, 23 Jun 2019 13:25:20 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hf6Eu-0008QB-4A; Sun, 23 Jun 2019 19:25:18 +0200 From: Lars Ingebrigtsen References: Date: Sun, 23 Jun 2019 19:25:15 +0200 In-Reply-To: (Drew Adams's message of "Tue, 23 Apr 2019 05:24:56 -0700 (PDT)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Drew Adams 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 [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Drew Adams 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 23 13:25:29 2019 Received: (at control) by debbugs.gnu.org; 23 Jun 2019 17:25:29 +0000 Received: from localhost ([127.0.0.1]:54428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hf6F6-00079M-Qa for submit@debbugs.gnu.org; Sun, 23 Jun 2019 13:25:29 -0400 Received: from quimby.gnus.org ([80.91.231.51]:44048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hf6F5-00079E-51 for control@debbugs.gnu.org; Sun, 23 Jun 2019 13:25:27 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hf6F2-0008QJ-L8 for control@debbugs.gnu.org; Sun, 23 Jun 2019 19:25:26 +0200 Date: Sun, 23 Jun 2019 19:25:24 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #35390 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 35390 fixed close 35390 27.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 35390 fixed close 35390 27.1 quit