From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#48883: [External] : bug#48883: dired marking bugs Date: Sun, 6 Jun 2021 22:12:20 +0000 Message-ID: References: <20210606203356.muhmgel5m2jwmzpj@E15-2016.optimum.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21229"; mail-complaints-to="usenet@ciao.gmane.io" To: Boruch Baum , "48883@debbugs.gnu.org" <48883@debbugs.gnu.org> Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 07 00:13:18 2021 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 1lq11C-0005Ks-2u for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 07 Jun 2021 00:13:18 +0200 Original-Received: from localhost ([::1]:37370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lq11B-0001r1-2H for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Jun 2021 18:13:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lq10x-0001o7-Ug for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2021 18:13:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42561) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lq10x-0002n3-O2 for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2021 18:13:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lq10x-0003hb-J0 for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2021 18:13:03 -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, 06 Jun 2021 22:13:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48883 X-GNU-PR-Package: emacs Original-Received: via spool by 48883-submit@debbugs.gnu.org id=B48883.162301755514151 (code B ref 48883); Sun, 06 Jun 2021 22:13:03 +0000 Original-Received: (at 48883) by debbugs.gnu.org; 6 Jun 2021 22:12:35 +0000 Original-Received: from localhost ([127.0.0.1]:54098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lq10V-0003gA-FM for submit@debbugs.gnu.org; Sun, 06 Jun 2021 18:12:35 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:38598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lq10S-0003fu-0l for 48883@debbugs.gnu.org; Sun, 06 Jun 2021 18:12:34 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 156MCNpb100096; Sun, 6 Jun 2021 22:12:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=JtKYD3KMUBr2eX1F8WwiLGkwJDNb3MfrTterkDQfylU=; b=iSq/nLs54Ypl1sqU1WnRifpto0ZA5V1kWBNW4xJkucqE4pTX3kfKMJH+uDAV3vLRlOxj qZ/7CCu8L9xb4w3jCq1id9lyIXIHkTi9AqNUWYR3i7MTeFpyeJ6qSsFqZj6cJbu4b7TZ 1tMcMc+ik8RG2DJiG69sjqqpUaCl4aJsZ/Ze9RwB1lTHlmU2dTUP5CI+LO/QsUCAP6AN 4GBUmsRlJyU1y+tlx4DL8jPpCbbdvJflwPdJYU6EL1EGw7TfwTbHwMgqzItiNi0A8B+7 2bCdJxbtV1Um49hnw5d0Em7h+x516c6BGJ+1TCPv7Jjuw0XM2992pK5pyzSeiunLxX8H Pg== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 3900ps1hhq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 06 Jun 2021 22:12:23 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 156MB3Vq003851; Sun, 6 Jun 2021 22:12:22 GMT Original-Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2177.outbound.protection.outlook.com [104.47.58.177]) by aserp3030.oracle.com with ESMTP id 38yya9psnw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 06 Jun 2021 22:12:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jnC0Pi8cpuobgaNOVIuDqaQksRCvGv0SHhN1fyjnN5z3CCjL8mSfuXyRjqzIze8g1KMv/6Mhq63tmiNDpYYBEypxK9c7DgJYhp0aRsuC87IC1iFDP3EZTR+TBz/0Pl/I2H39y9YfglpFwbG86nM+5YqkHykO9ETjf/ck652cfxxYM51Kc9QX9IgA6kvDevdXGWdbs70bPPCiOkj2umW+JgBSmf27cJY+VLp6s9/rudHphjB/+W2zfCvEo1yNs6eeWxESS4KE0UgiyRVe9QGhInllO2WFlAPd4Dz45DBYkb2X/x7FkLDGQ7+IDdpMYjkVPM0BeP5m6EGLkLh1LZgEZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JtKYD3KMUBr2eX1F8WwiLGkwJDNb3MfrTterkDQfylU=; b=kqK6LRW3K2odKtj42J7ECZS7AxPnDgZaAD8RnQKt8zMs7C1/R8ZwWbhfSNpoB48ANx8gvkF3fmmhtqPOp9p9qSNwqvrrFWu+N7jvupVAeNwJ5KseOignTt/sGf3dS4dMryhD2Ljanh0fjqalHzdI4Jtneq9I1l7Qe8viKzw5bFCk6GMXSxnuACeY2oHBE2enThuKcypGKi8MsL8nBxbwKyQBxI2kk5BPBNcRO2FiQiqJ0lrpaMof2I8TpApAT/+q9BCraJmLeiVdkV6nMA6DUU9EJUnzUZeC9/RpTGb5EkFmIn0wDaqieahkm/lMF4dmpcQ7jWeTGVw3FMydjH6Uyw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JtKYD3KMUBr2eX1F8WwiLGkwJDNb3MfrTterkDQfylU=; b=l56o5zQpF5TEpofSzH0BSP5SV3C1nvO6wJWMmVvr76CIvNYBoFgyKs6YoCO8+zLGyPELc2ekuMLZIeVVkvqz4j8iZ05Sc1zcHbJYJ9KlI+zMXgsrTQ9JyBd0laLvqxRvRjhpnd4g3xJ5sk1xJR80Spq+4AMIfFIMJbJFA1Og9Tc= Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SA2PR10MB4809.namprd10.prod.outlook.com (2603:10b6:806:113::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.20; Sun, 6 Jun 2021 22:12:20 +0000 Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::2109:9725:fd4a:6494]) by SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::2109:9725:fd4a:6494%6]) with mapi id 15.20.4195.030; Sun, 6 Jun 2021 22:12:20 +0000 Thread-Topic: [External] : bug#48883: dired marking bugs Thread-Index: AQHXWxNxZw55YcgJskGCstGPkFzX+qsHebfQ In-Reply-To: <20210606203356.muhmgel5m2jwmzpj@E15-2016.optimum.net> Accept-Language: en-US Content-Language: en-US authentication-results: gmx.com; dkim=none (message not signed) header.d=none;gmx.com; dmarc=none action=none header.from=oracle.com; x-originating-ip: [73.170.83.28] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: dcebdc81-461d-4562-9b67-08d929382758 x-ms-traffictypediagnostic: SA2PR10MB4809: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: V8+TG5w260T5U5SL1w0sQrzc71Fpx/6RC28pPa2Y4pIZKn5h0mTsE+smr7+Rz48jNONItbAPOa6U3EMc8+qf41d9EPXZQgzvpamOlP6vMk1ATVhWZ6WtN7Bw+Ml1pgF5YokWAuGTNSCJlz3u2TrlcF3wnrQTZJooMfFsrgdJb7Scsa3gfPYiOpWKwh7XqgZZymOXt1gMkiwMnzr40bNlVzglrT37YxcOyK29w87LcynKhZVQjHitPZuXUDUqkRPPiVbKtOEyrkSw/wjM0UDMyHVv6aSUH4NlIxLAFnVTMI5FV1EXQfjpQsB2M7/xJmo+vwca/3GAORIN9yqR/VG8k0nsW0NoLeJwg9NeLjIbnOoKYtKKIrqcql+EmCYUhUYACwAAi4n36t9i9msJl/svDCbp4aAn2w+yWOVVLkxUZrVavo7jvHfCxNzryS1tQt+5PFG74A5z5SYioSkGRiW6H+ip6BuiKpUpeap0PK0xCELCmKZ2uRmks8cAaa69Og4K8IsgxRoP75kgsrqoiAdSX+DOO1IoQXDPVvW+oKbbZHCj78KhPZio90OOT8oD+UMS7LIB8FB4ge9u61BDodd9ybzSETbhHA5wgTPJmKRAdrc= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(376002)(39860400002)(136003)(396003)(366004)(83380400001)(316002)(9686003)(76116006)(186003)(110136005)(38100700002)(66946007)(64756008)(122000001)(5660300002)(86362001)(66556008)(71200400001)(33656002)(66476007)(8936002)(7696005)(6506007)(44832011)(52536014)(8676002)(2906002)(26005)(478600001)(55016002)(66446008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: cZqe7wpS4S52s28PMciO88XUyZVLVu6y1RM89/AbwHFyc9P0hSbj3OCmB1Pwku9NSgchKSxvjYp4i78PuiqfYDp6KNrX5z87RbyOxlAFkgmGvm4P/RwzO8GCUw+vLb5JD5ey0EyuTGtjjYAQrqF3e9OtbYtOQ/yfvnrU4f2RukgJZNjNtQRAVhZIkExjqygR8fPHzY/gfvmRCT8GVQXRu1u3eZU1CFHpzWvOKCHD0ye9PhPuhiCvy3ocJ6l35k8fAfFoCRhy8+TpckJAgPuUGAI48RpjeHQqoa2iQoBIzR4NydJkcKXaYaiHc7QH3p71ih+/CFbAu2Fo8QEsq12PsaN2MxUH5TlDUXcq5G0+zHAZm7vA+6HSLBFgfyrvkbNi1TwAXtwICr2pD4lSjsR6H4ULaLfMn2doJpsrgoAV0IAednLdgc+8y3lAJsxMPghR+McQ9xOj+iNAEZAkIP8rmlFSrizuM9ceYroqRJzY5Z0bQ4RBrcMdcA4KRaFZ8/chFvfkoedgRUeSSvIVmOcUaSn0ip7+LDhTRMXeEomq6Oh21qHoO546E37xueb/ZgCxUC9+f+Y/yJ4sprhjhOxE+LMlG98jYgMzHo9XPPLOJfzt0/v++1RI9i/KhGVJHY/BS6H9C0OXKTKSkXwDqPMlkLTCfoDaW5j2Za8CzE0EzVYcIQup9MafdysQBME5TMukA0ygChlb4oBYVk9L6+xYEyQD1jAZIJqKVa/+JIRtcPnaTmcd6no2ZrokvMBD 00/p+RKCLVvmfaXcwWG07kaSwo+JdEaLSg1n2Tl7sWdYeqGXvbnQFlRPajlBGCRtlII5HTgHEIBH12Ad8KCZGCmLLOPmL8gYLX x-ms-exchange-transport-forked: True X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dcebdc81-461d-4562-9b67-08d929382758 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jun 2021 22:12:20.3825 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: RjCn3IDMDHlQ/6lzq+kEEgOym66hiavDkDKpWDysP0t5Hwk9PBXixSFSnZcenpHFvJcnov6+z7mvEynR8ElNQw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4809 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10007 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 spamscore=0 adultscore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106060181 X-Proofpoint-GUID: yqO_XVqLWyDgK4DK6Nwtz4eYCGIZ3gX4 X-Proofpoint-ORIG-GUID: yqO_XVqLWyDgK4DK6Nwtz4eYCGIZ3gX4 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10007 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 clxscore=1011 bulkscore=0 spamscore=0 mlxscore=0 adultscore=0 malwarescore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 mlxlogscore=999 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106060181 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:208163 Archived-At: I'll chime in here, unsolicited - feel free to ignore. Glad you reported this, Boruch. Congratulations on finding a decades-old problem! > I'm coming across the following bugs > reproducable in \emacs -Q -nw: >=20 > 1) Improper marking of directory heading line >=20 > 1.1) The correct and expected behavior of dired is that when one > navigates to a directory heading line (eg. the first line of a > simple dired buffer) and presses 'm', all "real" files of that > directory are marked, [IMPORTANT] the lines for the "not-real" > files '.' and '..' are not marked, and [IMPORTANT] the directory > line itself is not marked. >=20 > 1.2) Likewise, typing 'u' on that line unmarks all said lines. (You don't say so, but I think/hope you agree that 1.1 and 1.2 are OK, not something improper.) > 1.3) Now, advance one line, to the line typically presenting a > summary, beginning with the word 'total', and press the sequence > 'C-u -1 m'. >=20 > 1.4) Why is there now a mark on the prior line, the directory line? > Note that the result differs from actually performing 'm' on > that line also in that none of the "real" files in the directory > are marked. Note also that performing 'u' on the line does not > remove the mark, but performing 'U' on the buffer does. Agreed - a bug. This change to `dired-repeat-over-lines' seems to take care of that OK: In the second `while' (the one for negative movement), change (save-excursion (funcall function)) to this: (when (dired-get-filename nil t) ; <=3D=3D=3D=3D=3D=3D=3D (save-excursion (funcall function))) [I've added `dired-repeat-over-lines' to dired+.el and made that change. If this gets fixed in vanilla Dired too (hopefully) then I'll be able to remove that dired+.el change - except for older Emacs versions.]=20 > 1.5) Attempting to perform an operation on the marked directory line > (eg. 'C' to copy it) returns the message "No files specified" IMO, that's not a problem. (I assume here you're talking about point being on the dir heading line and no (other) files being marked.) There _are_ (should be) no files specified. > 2) Improper marking of "not-real" files '.' and '..' >=20 > 2.1) See paragraph 1.1. >=20 > 2.2) However, those lines can be manually marked using the 'm' > command, and attempting to perform an operation on them (eg. 'C' > to copy them) returns messaging indicating a willingness to > overwrite whatever target directory is chosen. I haven't risked > let it operate. >=20 > 2.3) As in paragraph 1.3, it is possible to mark the two lines using > a negative prefix argument. IMO, there's nothing wrong with marking `.' or `..', and nothing wrong with Dired having some operations that work on them. It's fine for it to have some other operations that don't work for them, of course. In that case, users can be informed about that when they try those ops. > 3) Improper advancing to (point-max) >=20 > 3.1) Marking the final entry in a dired buffer advances POINT to a > blank line, which is pretty much never desirable to a user. I don't see that as a problem. FWIW, with my code (`dired+.el') a user can optionally wrap around from the last line to the first, and vice versa, using the line motion commands (e.g. `SPC', `down').