From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#41097: 28.0.50; (dired-toggle-marks) not working after copy Date: Sun, 10 May 2020 09:26:01 -0700 (PDT) Message-ID: <7979fef4-5df8-4997-95fd-c5be5887ab44@default> References: <861rnybf34.fsf@protected.rcdrun.com> <20200506144423.GW24998@protected.rcdrun.com> <20200508132924.GI14650@protected.rcdrun.com> <87r1vukl86.fsf@web.de> <20200509042353.GA15309@protected.rcdrun.com> <87h7wonnuh.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> <20200510095646.GA22962@protected.rcdrun.com> <83y2pzdgt7.fsf@gnu.org> <20200510145503.GE28606@protected.rcdrun.com> <83sgg7ddtz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="129447"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael_heerdegen@web.de, tomasn@posteo.net, 41097@debbugs.gnu.org, arthur.miller@live.com To: Eli Zaretskii , Jean Louis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 10 18:29:14 2020 Return-path: Envelope-to: geb-bug-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 1jXopF-000XXb-4f for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 May 2020 18:29:13 +0200 Original-Received: from localhost ([::1]:43030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXopD-0006if-Js for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 May 2020 12:29:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXop4-0006iV-Us for bug-gnu-emacs@gnu.org; Sun, 10 May 2020 12:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38752) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXop4-00082I-Kx for bug-gnu-emacs@gnu.org; Sun, 10 May 2020 12:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jXop4-0007I7-H3 for bug-gnu-emacs@gnu.org; Sun, 10 May 2020 12:29: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: Sun, 10 May 2020 16:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41097 X-GNU-PR-Package: emacs Original-Received: via spool by 41097-submit@debbugs.gnu.org id=B41097.158912811227962 (code B ref 41097); Sun, 10 May 2020 16:29:02 +0000 Original-Received: (at 41097) by debbugs.gnu.org; 10 May 2020 16:28:32 +0000 Original-Received: from localhost ([127.0.0.1]:50298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXooL-0007GV-Jk for submit@debbugs.gnu.org; Sun, 10 May 2020 12:28:32 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:58448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXooK-0007G9-6f for 41097@debbugs.gnu.org; Sun, 10 May 2020 12:28:16 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04AGNEjg038718; Sun, 10 May 2020 16:28:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=1ThSKZb8Y1nAISF7SO3ppOyBzQqt9754cqxlKRI1IvU=; b=a5VVNbuQtR538p/j2xKyV3mVuP4BRwodEnCXSeOmTBH+I2AQ/EKv96js3/pnTYmqvJ1k XwflDelaX2tg/yNvEXI/gLBRHwro7YS8qNd0q3sr0E0PTgA3LBwjfX/DdbOjjHLTz8JD przXHY1F+CqcqQBjUn2FFZCYukfbKCqcFbrgh1/W5Mr8JOfmIxQxvcb5yQysfAtg+403 BhOXqi6AOsU3X6a5nyM8Am1ilC4LRNIAGqfQxhZS0EJ5mWfXEP+/NdTLVuHT+QDw53BB UxW8q6Y4AmipYBUUO+3JngVRxnFvrRpv0vrJVgjY9Q9hwz9MTl5taH8Oe1bt4SaLQIkb Tg== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 30x3mbhrxa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 10 May 2020 16:28:10 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04AGOSPu152780; Sun, 10 May 2020 16:26:09 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 30xbgan8v5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 10 May 2020 16:26:09 +0000 Original-Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 04AGQ2O4018710; Sun, 10 May 2020 16:26:02 GMT In-Reply-To: <83sgg7ddtz.fsf@gnu.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4993.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9617 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 spamscore=0 suspectscore=0 phishscore=0 bulkscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005100152 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9617 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 impostorscore=0 mlxscore=0 suspectscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 lowpriorityscore=0 spamscore=0 adultscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005100152 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:180015 Archived-At: > > If m is for marking then (dired-toggle-marks) should work with > > success, because why it should not work if the file is flagged with > > C, because it is not a file for deletion. > > > > If is is for marking and d for flaging means to prepare for deletion, > > then "m" does not flag, it marks, so there are no "other flags" but > > there is just one mark and other flags. If menu separates marks from > > flags, then the function should separate marks from flags too, maybe > > except for flagged files. > > > > Confusing, but I don't see a logic why I should not be able to toggle > > marks on files that have been recently copied or renamed. >=20 > Because t toggles marks, and C is not a mark, it's a flag. This is not true. Let's please not go there. The doc has always spoken of "flagging" only for the deletion mark, `D', and that mark is also called a "flag" (_the_ flag). It is the only mark that has ever been called a "flag". It flags a possible danger -- "Hey! Over here. Watch out." But `D', `C', and any others are all marks. You can create any marks you like - use any char. It's true that, for simplicity, the operation of "marking" generally refers to marking with `*'. Command `* c' (`dired-change-marks') is specifically about changing marks - substituting one char for another. As for the general question from Jean-Louis, I (and Michael) already answered it: * If you want `t' to UNmark files that have a mark (e.g. `C') other than `*' then you need to first change those `C' marks to `*' (`* c C *' does that for `C' marks). * If you want `t' to _mark_ the files marked `C' then you need to first unmark them. You can do that in two ways, depending on what you really want: 1. Unmark ALL marks, of any kind. `U' or `M-DEL RET' does this. 2. Change just the `C' marks to ` ' (space char). `* c C SPC' or `M-DEL SPC' does this. ("Marking" with a space char =3D unmarking.) Why/when would you ever want to use `* c C *' instead of `U'? When you also had some other marks (`D', `E' or whatever), which you did _not_ want to change to `*'. And yes, unmarking applies also to `D' marks (aka flags). Unmarking (unflagging) is not something dangerous or noteworthy. Flagging (`D') is. Dired copy-file commands mark with `C' in the target directory listing. This is a feature, not a bug. And `t' toggles only files marked `*' and unmarked files. This is also a feature. The most common, most active, use of marks is with the `*' mark. The general "marking" commands use `*', by default. It is the default mark character, the default value of `dired-marker-char'. Its doc tells you that is is "what the do-commands look for, and what the mark-commands store". I think the doc is pretty clear, but yes, it might require some careful reading. > If the doc string which you quoted several times said this: >=20 > Toggle marks: marked files become unmarked, and vice versa. > Flagged files (indicated with flags such as =E2=80=98C=E2=80=99 and =E2= =80=98D=E2=80=99, not > with =E2=80=98*=E2=80=99) are not affected, and =E2=80=98.=E2=80=99 and= =E2=80=98..=E2=80=99 are never toggled. >=20 > would that prevent the confusion? No, that's worse. It introduces `C' as a "flag". "Flag" and "flagging" need to be reserved for `D'. It should always be about "flagging for deletion". This is important because deletion is consequential. That's presumably the reason for having always used a special term for `D' marks. "Flag", in the Dired context, is like a red flag -- a warning, of sorts: "Pay attention! This marking is particularly important." That's also the reason we font-lock `D'-marked lines specially (red!). It would probably help if the first line of the doc string explicitly called out `*' marks. Maybe something like this: Toggle `*' marks: unmark marked files, and vice versa.