From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#27465: 24.5; `dired-mark-unmarked-files' with non-nil UNFLAG-P Date: Fri, 23 Jun 2017 15:44:21 -0700 (PDT) Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1498257915 7683 195.159.176.226 (23 Jun 2017 22:45:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 23 Jun 2017 22:45:15 +0000 (UTC) To: 27465@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 24 00:45:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOXK9-0001gE-Mz for geb-bug-gnu-emacs@m.gmane.org; Sat, 24 Jun 2017 00:45:09 +0200 Original-Received: from localhost ([::1]:37534 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOXKD-00016z-AF for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Jun 2017 18:45:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOXK6-00015r-M4 for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2017 18:45:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOXK2-0006Bt-NU for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2017 18:45:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60419) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dOXK2-0006Bk-JP for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2017 18:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dOXK2-0005rW-70 for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2017 18:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jun 2017 22:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27465 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.149825788522490 (code B ref -1); Fri, 23 Jun 2017 22:45:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Jun 2017 22:44:45 +0000 Original-Received: from localhost ([127.0.0.1]:34863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOXJk-0005qf-Vj for submit@debbugs.gnu.org; Fri, 23 Jun 2017 18:44:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43188) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dOXJh-0005qR-7M for submit@debbugs.gnu.org; Fri, 23 Jun 2017 18:44:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOXJb-0005oD-9e for submit@debbugs.gnu.org; Fri, 23 Jun 2017 18:44:36 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:39067) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dOXJb-0005o4-6K for submit@debbugs.gnu.org; Fri, 23 Jun 2017 18:44:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOXJa-00013y-5D for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2017 18:44:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOXJW-0005mb-75 for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2017 18:44:34 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:29516) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dOXJV-0005ls-TV for bug-gnu-emacs@gnu.org; Fri, 23 Jun 2017 18:44:30 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v5NMiQrI019069 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 23 Jun 2017 22:44:27 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v5NMiQHj029193 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 23 Jun 2017 22:44:26 GMT Original-Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id v5NMiNxA020592 for ; Fri, 23 Jun 2017 22:44:25 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6770.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133837 Archived-At: AFAICT this could never have worked. 1. Prior to Emacs 24, the interactive spec was just "P", which could of course not work interactively. In Emacs 24 it was changed to read the REGEXP and use the prefix arg for UNFLAG-P. That "P" was an indication that the command never worked interactively and was probably ill-conceived for that. And that "P" remained from Emacs 20 (if not before) through 23. 2. There are no occurrences in the Elisp sources that use non-nil UNFLAG-P. 3. Non-nil UNFLAG-P does nothing, AFAICT. It _cannot_ do anything. Certainly it cannot unflag, which means change a deletion flag (`D') to a space char. Why? Because the replacement is applied only to lines that already have a space char (not a `D'). Its effect in that case is indeed to post a space char. But it does so only for lines that already have a space char! This is the call: (dired-mark-if (and (looking-at-p " ") ; <=3D=3D=3D Mark (with a SPC) only if already the= re! (let ((fn (dired-get-filename localp t))) (and fn (string-match-p regexp fn)))) msg) What to do? I suggest NOT trying to have any "unflag" behavior here. If it were fixed, so that it actually replaced `D' with ` ' when there is a prefix arg, I think that behavior would be confusing. IOW, better not to fix the implementation to fix an awful design. Mark-if-unmarked should not mean unflag sometimes. But if you really want to fix this so that it does what the doc says, that's OK by me. Something should be done about it, anyway. (BTW, the comment "uninteresting" is backward wrt the comment "not already marked". The files that are checked are those that are not already marked and are interesting, i.e, match.) In GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/usr --host=3Di686-pc-mingw32'