From unknown Sun Jun 22 07:50:00 2025 X-Loop: don@donarmstrong.com Subject: bug#916: 23.0.60; doc string of dired-get-marked-files Reply-To: "Drew Adams" , 916@debbugs.gnu.org Resent-From: "Drew Adams" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 07 Sep 2008 17:25:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 916 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122080784328093 (code B ref -1); Sun, 07 Sep 2008 17:25:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 7 Sep 2008 17:17:23 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m87HHKxj028087 for ; Sun, 7 Sep 2008 10:17:21 -0700 Received: from mail.gnu.org ([199.232.76.166]:59742 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KcNrM-0005Bq-1N for emacs-pretest-bug@gnu.org; Sun, 07 Sep 2008 13:15:36 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KcNsx-0008M3-J1 for emacs-pretest-bug@gnu.org; Sun, 07 Sep 2008 13:17:19 -0400 Received: from agminet01.oracle.com ([141.146.126.228]:34807) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KcNsx-0008Lp-5P for emacs-pretest-bug@gnu.org; Sun, 07 Sep 2008 13:17:15 -0400 Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m87HHBhp001230 for ; Sun, 7 Sep 2008 12:17:12 -0500 Received: from acsmt700.oracle.com (acsmt700.oracle.com [141.146.40.70]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m87HH9HF021240 for ; Sun, 7 Sep 2008 11:17:09 -0600 Received: from dradamslap1 (/24.23.165.218) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 07 Sep 2008 10:17:09 -0700 From: "Drew Adams" To: Date: Sun, 7 Sep 2008 10:17:10 -0700 Message-ID: <001d01c9110d$9062a240$0200a8c0@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AckRDY/+pvUIgq81Su+bynYFGKbcYw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 The doc string says this about optional arg ARG: Optional second argument arg specifies files near point instead of marked files. If arg is an integer, use the next arg files. If arg is otherwise non-nil, use file. Usually arg comes from the command's prefix arg. This is not correct, or at least it is incomplete. It says that the current file is used if ARG is non-nil but not an integer, which is true, but it suggests that no file is used if ARG is nil. That is, the entire ARG description suggests that a singleton list of the current file is returned only when ARG is non-nil. It suggests that if ARG is nil then the empty list is returnedl. In fact, if ARG is nil, the current file is used. That is, (dired-get-marked-files) in Dired returns the singleton list of the file where the cursor is. This behavior is not a bug; it is the doc string that is incomplete by not covering this case. The doc string should say something like this regarding ARG: Optional second argument arg specifies files near point instead of marked files. If arg is an integer, use the next arg files. Otherwise, use the file on the current line. Usually arg comes from the command's prefix arg. `dired-get-marked-files' uses `dired-map-over-marks', and the doc string of that function correctly states "If no marked file could be found, execute body on the current line." In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-08-29 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping' From unknown Sun Jun 22 07:50:00 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: "Drew Adams" Subject: bug#916 closed by Chong Yidong (Re: 23.0.60; doc string of dired-get-marked-files) Message-ID: References: <87tzb4bbzn.fsf@cyd.mit.edu> <001d01c9110d$9062a240$0200a8c0@us.oracle.com> X-Emacs-PR-Message: they-closed 916 X-Emacs-PR-Package: emacs Reply-To: 916@debbugs.gnu.org Content-Type: multipart/mixed; boundary="----------=_1224708303-2372-1" This is a multi-part message in MIME format... ------------=_1224708303-2372-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #916: 23.0.60; doc string of dired-get-marked-files It has been closed by Chong Yidong . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Chong Yidong by replying to this email. --=20 916: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D916 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1224708303-2372-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From cyd@stupidchicken.com Wed Oct 22 13:39:41 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.9 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 916-done) by emacsbugs.donarmstrong.com; 22 Oct 2008 20:39:41 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9MKdcL8001153 for <916-done@emacsbugs.donarmstrong.com>; Wed, 22 Oct 2008 13:39:39 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id A0EE857E04B; Wed, 22 Oct 2008 16:39:40 -0400 (EDT) From: Chong Yidong To: "Drew Adams" Cc: 916-done@debbugs.gnu.org Subject: Re: 23.0.60; doc string of dired-get-marked-files Date: Wed, 22 Oct 2008 16:39:40 -0400 Message-ID: <87tzb4bbzn.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > The doc string says this about optional arg ARG: > > Optional second argument arg specifies files near point > instead of marked files. If arg is an integer, use the next arg files. > If arg is otherwise non-nil, use file. Usually arg comes from > the command's prefix arg. > > This is not correct, or at least it is incomplete. It is correct, because of the word "instead": if ARG is non-nil, it modifies the behavior of the function. I fixed the doc string to make this distinction clearer, and to prevent similar confusion. ------------=_1224708303-2372-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From drew.adams@oracle.com Sun Sep 7 10:17:23 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 7 Sep 2008 17:17:23 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m87HHKxj028087 for ; Sun, 7 Sep 2008 10:17:21 -0700 Received: from mail.gnu.org ([199.232.76.166]:59742 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KcNrM-0005Bq-1N for emacs-pretest-bug@gnu.org; Sun, 07 Sep 2008 13:15:36 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KcNsx-0008M3-J1 for emacs-pretest-bug@gnu.org; Sun, 07 Sep 2008 13:17:19 -0400 Received: from agminet01.oracle.com ([141.146.126.228]:34807) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KcNsx-0008Lp-5P for emacs-pretest-bug@gnu.org; Sun, 07 Sep 2008 13:17:15 -0400 Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m87HHBhp001230 for ; Sun, 7 Sep 2008 12:17:12 -0500 Received: from acsmt700.oracle.com (acsmt700.oracle.com [141.146.40.70]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m87HH9HF021240 for ; Sun, 7 Sep 2008 11:17:09 -0600 Received: from dradamslap1 (/24.23.165.218) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 07 Sep 2008 10:17:09 -0700 From: "Drew Adams" To: Subject: 23.0.60; doc string of dired-get-marked-files Date: Sun, 7 Sep 2008 10:17:10 -0700 Message-ID: <001d01c9110d$9062a240$0200a8c0@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AckRDY/+pvUIgq81Su+bynYFGKbcYw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 The doc string says this about optional arg ARG: Optional second argument arg specifies files near point instead of marked files. If arg is an integer, use the next arg files. If arg is otherwise non-nil, use file. Usually arg comes from the command's prefix arg. This is not correct, or at least it is incomplete. It says that the current file is used if ARG is non-nil but not an integer, which is true, but it suggests that no file is used if ARG is nil. That is, the entire ARG description suggests that a singleton list of the current file is returned only when ARG is non-nil. It suggests that if ARG is nil then the empty list is returnedl. In fact, if ARG is nil, the current file is used. That is, (dired-get-marked-files) in Dired returns the singleton list of the file where the cursor is. This behavior is not a bug; it is the doc string that is incomplete by not covering this case. The doc string should say something like this regarding ARG: Optional second argument arg specifies files near point instead of marked files. If arg is an integer, use the next arg files. Otherwise, use the file on the current line. Usually arg comes from the command's prefix arg. `dired-get-marked-files' uses `dired-map-over-marks', and the doc string of that function correctly states "If no marked file could be found, execute body on the current line." In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-08-29 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping' ------------=_1224708303-2372-1--