X-Loop: help-debbugs@HIDDEN
Subject: bug#76307: [PATCH] Add 'project-forget-projects-under-dirs', limit dir selection to relevant dirs
Resent-From: Ship Mints <shipmints@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 15 Feb 2025 17:51:02 +0000
Resent-Message-ID: <handler.76307.B.17396418452473 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 76307
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: 76307 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.17396418452473
(code B ref -1); Sat, 15 Feb 2025 17:51:02 +0000
Received: (at submit) by debbugs.gnu.org; 15 Feb 2025 17:50:45 +0000
Received: from localhost ([127.0.0.1]:57795 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1tjMJQ-0000dp-Sh
for submit <at> debbugs.gnu.org; Sat, 15 Feb 2025 12:50:45 -0500
Received: from lists.gnu.org ([2001:470:142::17]:50840)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
id 1tjMJO-0000dZ-Du
for submit <at> debbugs.gnu.org; Sat, 15 Feb 2025 12:50:43 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <shipmints@HIDDEN>)
id 1tjMJF-0006xW-ML
for bug-gnu-emacs@HIDDEN; Sat, 15 Feb 2025 12:50:33 -0500
Received: from mail-ua1-x935.google.com ([2607:f8b0:4864:20::935])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from <shipmints@HIDDEN>)
id 1tjMJC-0007CR-Se
for bug-gnu-emacs@HIDDEN; Sat, 15 Feb 2025 12:50:33 -0500
Received: by mail-ua1-x935.google.com with SMTP id
a1e0cc1a2514c-86714f41f5bso939537241.3
for <bug-gnu-emacs@HIDDEN>; Sat, 15 Feb 2025 09:50:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1739641829; x=1740246629; darn=gnu.org;
h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
:date:message-id:reply-to;
bh=D5PGwtbmjVDcr6u9CI8XCTwU7wakZw8OO12YOKPe028=;
b=Wx39o5zcvAEtqXtxLPrjqj7DXK6pz4WDVdeAPDBN1dy8W03+rC5APUDu0aSgXT7SDq
iFqZauytCZTXHsasGJMA6/t1YTGoi9zUdF9AEkpxDcWAU0n4xAMIF3AAq2ZtCLaYjLqG
K+sp+hal85nTF2VpGJvdqd2UbI6aSKmPOSCMVrOB3ccjlmhkNgypt+pJy+tyDTFxx8yS
Hubecv2Eqn9lPGNe+WIJyNl2dfo7vQeGx1aGQMpEvhBos96RP0fb3j04gaNUTxoVdfJO
gQgRtB3h+phazIsIVwtaF3LG1VDr5ImcFCEWYPWHv2timH9+6rnNYDlvnqhQwoLy/cGz
UEzQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1739641829; x=1740246629;
h=to:subject:message-id:date:from:mime-version:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=D5PGwtbmjVDcr6u9CI8XCTwU7wakZw8OO12YOKPe028=;
b=Yl1vkOVtNAPh/0GL2zfwm/H51Z3OMX5MrQMpvK8DrSJXBbXsUK0QjgmOdbqoue4nol
qDbXhMU6k7omo9/UwDXiKeyGDW5HpQuL/yRGP8DPwbdHnImpqRXF4CgVlV3/ICiqobTH
m5uCTj2vYsjgsdrQHiHLjxG2DOnkIl7gJT6UwofIcOtXYKM7qi02HS0mPNyB5q0TJZvx
7N6hXtwJ+g51ZFx3Tzgd16k+yF6ri1ogBlHru0n44mDQKDGTpLpMHfllBiW61ZJRJI9d
uoi9y2xCO4WJAsjfxX2L46w7NlFDRBOBHzowFIZ98E/MetX2R9SlS422ng6mWWCLiNhH
wIDQ==
X-Gm-Message-State: AOJu0YwD71nHBq1lUs/J+f97KaSjBQVAZIg9N5EFx34G8gGlkzrQEKdR
PcMla5WB/KNZwsgRzYJ6wC19vUxxIRFFBMz2vIZadQTdX0OnQRypaOwzv9//cB2Xd0qB9Xfl/V1
1yXqM15vJOouF3Qo0rbzgLCnj3vWaDUXC
X-Gm-Gg: ASbGncsFNRr0ffyAGxaWPpcRJoHiw0xyprr8tjphIS88Gxlhd/vlBbOLkp2IwfR21Go
7igkDU0A2kJP/dFh+TzbDklnppxyhNXBL10Lnk4AFMXSRNTlgvOJb49IK0KNJ5Hb3bCrHV1pj
X-Google-Smtp-Source: AGHT+IE6J/s4a2fWvLpL5kNg9sBW1qRmN5bNQlgfcQfGJJ0Lkus9n37SmHOR0PU65zC08zfVfkOdMRYFqVQmynZN2jc=
X-Received: by 2002:a05:6102:d90:b0:4b2:5c0a:92c0 with SMTP id
ada2fe7eead31-4bd3fc8b8d0mr2431585137.13.1739641827914; Sat, 15 Feb 2025
09:50:27 -0800 (PST)
MIME-Version: 1.0
From: Ship Mints <shipmints@HIDDEN>
Date: Sat, 15 Feb 2025 12:50:16 -0500
X-Gm-Features: AWEUYZnjaGWuBEK0tMowyhLieDrfuPpudw-wBbqTLmMFmJJs_IixIYypgzdKD3g
Message-ID: <CAN+1Hbqgnc7kaLfXqBV5XbNnSyY2-7ygKFREa4enmLqzStrBjg@HIDDEN>
Content-Type: multipart/mixed; boundary="000000000000309aa2062e31ed70"
Received-SPF: pass client-ip=2607:f8b0:4864:20::935;
envelope-from=shipmints@HIDDEN; helo=mail-ua1-x935.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)
--000000000000309aa2062e31ed70
Content-Type: multipart/alternative; boundary="000000000000309a9f062e31ed6e"
--000000000000309a9f062e31ed6e
Content-Type: text/plain; charset="UTF-8"
*** Improved directory selection in 'project-forget-projects-under'.
This command now prompts using a directory list limited to those in the
remembered project list. Previously, it would prompt using general
directories from the file system.
I hope this isn't controversial...it made limited sense to me that the
prompt candidates had no relationship to remembered projects.
*** New command 'project-forget-projects-under-dirs'.
This command prompts for multiple directories under which to forget
remembered projects. The candidate directory list is limited to those
in the remembered project list.
-Stephane
--000000000000309a9f062e31ed6e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac=
e">*** Improved directory selection in 'project-forget-projects-under&#=
39;.</div><div class=3D"gmail_default" style=3D"font-family:monospace"><br>=
This command now prompts using a directory list limited to those in the<br>=
remembered project list.=C2=A0 Previously, it would prompt using general<br=
>directories from the file system.</div><div class=3D"gmail_default" style=
=3D"font-family:monospace"><br></div><div class=3D"gmail_default" style=3D"=
font-family:monospace">I hope this isn't controversial...it made limite=
d sense to me that the prompt candidates had no relationship to remembered =
projects.<br><br>*** New command 'project-forget-projects-under-dirs=
9;.</div><div class=3D"gmail_default" style=3D"font-family:monospace"><br>T=
his command prompts for multiple directories under which to forget<br>remem=
bered projects.=C2=A0 The candidate directory list is limited to those<br>i=
n the remembered project list.</div><div class=3D"gmail_default" style=3D"f=
ont-family:monospace"><br></div><div class=3D"gmail_default" style=3D"font-=
family:monospace">-Stephane</div></div>
--000000000000309a9f062e31ed6e--
--000000000000309aa2062e31ed70
Content-Type: application/octet-stream;
name="0001-Add-project-forget-projects-under-dirs-limit-dir-sel.patch"
Content-Disposition: attachment;
filename="0001-Add-project-forget-projects-under-dirs-limit-dir-sel.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_m76hss1z0>
X-Attachment-Id: f_m76hss1z0
RnJvbSBhOGIwNzFjMzg0ZDYwYzFiZTFkMTgzZWE3OGNjZGZiYmY1ZWZjZWZiIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBzaGlwbWludHMgPHNoaXBtaW50c0BnbWFpbC5jb20+CkRhdGU6
IFNhdCwgMTUgRmViIDIwMjUgMTI6MTc6MzEgLTA1MDAKU3ViamVjdDogW1BBVENIXSBBZGQgJ3By
b2plY3QtZm9yZ2V0LXByb2plY3RzLXVuZGVyLWRpcnMnLCBsaW1pdCBkaXIgc2VsZWN0aW9uCiB0
byBwcm9qZWN0LS1saXN0CgoqIGxpc3AvcHJvZ21vZGVzL3Byb2plY3QuZWwKKHByb2plY3QtLWZp
bGUtY29tcGxldGlvbi10YWJsZSk6IEFkZCAmb3B0aW9uYWwgbm8tc29ydC4KKHByb2plY3QtLWxp
c3QtY29tbW9uLWRpci1wcmVmaXhlcyk6IE5ldyBwcml2YXRlIGZ1bmN0aW9uLgoocHJvamVjdC1m
b3JnZXQtcHJvamVjdHMtdW5kZXIpOiBMaW1pdCBkaXJzIHRvIHByb2plY3QtLWxpc3QuCihwcm9q
ZWN0LWZvcmdldC1wcm9qZWN0cy11bmRlci1kaXJzKTogTmV3IGNvbW1hbmQuCi0tLQogZXRjL05F
V1MgICAgICAgICAgICAgICAgICB8IDEyICsrKysrKysKIGxpc3AvcHJvZ21vZGVzL3Byb2plY3Qu
ZWwgfCA3NCArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKystLS0KIDIgZmlsZXMg
Y2hhbmdlZCwgODEgaW5zZXJ0aW9ucygrKSwgNSBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9l
dGMvTkVXUyBiL2V0Yy9ORVdTCmluZGV4IDMxMTA5ZjA4NTdjLi5iMDE2MDZiMjk1OCAxMDA2NDQK
LS0tIGEvZXRjL05FV1MKKysrIGIvZXRjL05FV1MKQEAgLTI3OCw2ICsyNzgsMTggQEAgZG9jc3Ry
aW5nIGZvciBhcmd1bWVudHMgcGFzc2VkIHRvIGEgaGVscC10ZXh0IGZ1bmN0aW9uLgogKioqIE5l
dyBjb21tYW5kICdwcm9qZWN0LXJvb3QtZmluZC1maWxlJy4KIEl0IGlzIGVxdWl2YWxlbnQgdG8g
cnVubmluZyDigJhwcm9qZWN0LWFueS1jb21tYW5k4oCZIHdpdGgg4oCYZmluZC1maWxl4oCZLgog
CistLS0KKyoqKiBJbXByb3ZlZCBkaXJlY3Rvcnkgc2VsZWN0aW9uIGluICdwcm9qZWN0LWZvcmdl
dC1wcm9qZWN0cy11bmRlcicuCitUaGlzIGNvbW1hbmQgbm93IHByb21wdHMgdXNpbmcgYSBkaXJl
Y3RvcnkgbGlzdCBsaW1pdGVkIHRvIHRob3NlIGluIHRoZQorcmVtZW1iZXJlZCBwcm9qZWN0IGxp
c3QuICBQcmV2aW91c2x5LCBpdCB3b3VsZCBwcm9tcHQgdXNpbmcgZ2VuZXJhbAorZGlyZWN0b3Jp
ZXMgZnJvbSB0aGUgZmlsZSBzeXN0ZW0uCisKKy0tLQorKioqIE5ldyBjb21tYW5kICdwcm9qZWN0
LWZvcmdldC1wcm9qZWN0cy11bmRlci1kaXJzJy4KK1RoaXMgY29tbWFuZCBwcm9tcHRzIGZvciBt
dWx0aXBsZSBkaXJlY3RvcmllcyB1bmRlciB3aGljaCB0byBmb3JnZXQKK3JlbWVtYmVyZWQgcHJv
amVjdHMuICBUaGUgY2FuZGlkYXRlIGRpcmVjdG9yeSBsaXN0IGlzIGxpbWl0ZWQgdG8gdGhvc2UK
K2luIHRoZSByZW1lbWJlcmVkIHByb2plY3QgbGlzdC4KKwogLS0tCiAqKiogSW1wcm92ZWQgcHJv
bXB0IGZvciAncHJvamVjdC1zd2l0Y2gtcHJvamVjdCcuCiBUaGUgcHJvbXB0IG5vdyBkaXNwbGF5
cyB0aGUgY2hvc2VuIHByb2plY3Qgb24gd2hpY2ggdG8gaW52b2tlIGEgY29tbWFuZC4KZGlmZiAt
LWdpdCBhL2xpc3AvcHJvZ21vZGVzL3Byb2plY3QuZWwgYi9saXNwL3Byb2dtb2Rlcy9wcm9qZWN0
LmVsCmluZGV4IDM1YmY2NmM5ZmZiLi44ZDg3OThhMmI4MSAxMDA2NDQKLS0tIGEvbGlzcC9wcm9n
bW9kZXMvcHJvamVjdC5lbAorKysgYi9saXNwL3Byb2dtb2Rlcy9wcm9qZWN0LmVsCkBAIC0zMjAs
MTEgKzMyMCwxMyBAQCBwcm9qZWN0LWlnbm9yZXMKICAgICAgICAoZ3JlcC1maW5kLWlnbm9yZWQt
ZmlsZXMgZGlyKQogICAgICBncmVwLWZpbmQtaWdub3JlZC1maWxlcykpKQogCi0oZGVmdW4gcHJv
amVjdC0tZmlsZS1jb21wbGV0aW9uLXRhYmxlIChhbGwtZmlsZXMpCisoZGVmdW4gcHJvamVjdC0t
ZmlsZS1jb21wbGV0aW9uLXRhYmxlIChhbGwtZmlsZXMgJm9wdGlvbmFsIG5vLXNvcnQpCiAgIChs
YW1iZGEgKHN0cmluZyBwcmVkIGFjdGlvbikKICAgICAoY29uZAogICAgICAoKGVxIGFjdGlvbiAn
bWV0YWRhdGEpCi0gICAgICAnKG1ldGFkYXRhIC4gKChjYXRlZ29yeSAuIHByb2plY3QtZmlsZSkp
KSkKKyAgICAgIGAobWV0YWRhdGEgLiAsKGNvbnMgJyhjYXRlZ29yeSAuIHByb2plY3QtZmlsZSkK
KyAgICAgICAgICAgICAgICAgICAgICAgICAgKHdoZW4gbm8tc29ydAorICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICcoKGRpc3BsYXktc29ydC1mdW5jdGlvbiAuIGlkZW50aXR5KSkpKSkpCiAg
ICAgICh0CiAgICAgICAoY29tcGxldGUtd2l0aC1hY3Rpb24gYWN0aW9uIGFsbC1maWxlcyBzdHJp
bmcgcHJlZCkpKSkpCiAKQEAgLTE5MTMsNyArMTkxNSw4IEBAIHByb2plY3QtLXJlbW92ZS1mcm9t
LXByb2plY3QtbGlzdAogZnJvbSB0aGUgbGlzdCB1c2luZyBSRVBPUlQtTUVTU0FHRSwgd2hpY2gg
aXMgYSBmb3JtYXQgc3RyaW5nCiBwYXNzZWQgdG8gYG1lc3NhZ2UnIGFzIGl0cyBmaXJzdCBhcmd1
bWVudC4iCiAgIChwcm9qZWN0LS1lbnN1cmUtcmVhZC1wcm9qZWN0LWxpc3QpCi0gICh3aGVuLWxl
dCogKChlbnQgKGFzc29jIChhYmJyZXZpYXRlLWZpbGUtbmFtZSBwcm9qZWN0LXJvb3QpIHByb2pl
Y3QtLWxpc3QpKSkKKyAgKHdoZW4tbGV0KiAoKG5vbi1lc3NlbnRpYWwgdCkgOyBpbmhpYml0IHJl
bW90ZS1maWxlIGFjdGlvbnMganVzdCB0byBhYmJyZXZpYXRlIHRoZSBmaWxlIG5hbWUKKyAgICAg
ICAgICAgICAgKGVudCAoYXNzb2MgKGFiYnJldmlhdGUtZmlsZS1uYW1lIHByb2plY3Qtcm9vdCkg
cHJvamVjdC0tbGlzdCkpKQogICAgIChzZXRxIHByb2plY3QtLWxpc3QgKGRlbHEgZW50IHByb2pl
Y3QtLWxpc3QpKQogICAgIChtZXNzYWdlIHJlcG9ydC1tZXNzYWdlIHByb2plY3Qtcm9vdCkKICAg
ICAocHJvamVjdC0td3JpdGUtcHJvamVjdC1saXN0KSkpCkBAIC0yMDkwLDYgKzIwOTMsMjkgQEAg
cHJvamVjdC1yZW1lbWJlci1wcm9qZWN0cy11bmRlcgogICAgICAgICAgICAgICAgICAgICAgICAg
IGNvdW50KSBjb3VudCkpCiAgICAgY291bnQpKQogCisoZGVmdW4gcHJvamVjdC0tbGlzdC1jb21t
b24tZGlyLXByZWZpeGVzICgpCisgICJSZXR1cm4gYSBsaXN0IG9mIGNvbW1vbiBkaXJlY3Rvcnkg
cHJlZml4ZXMgZnJvbSBgcHJvamVjdC0tbGlzdCcuCitUaGUgcmV0dXJuZWQgbGlzdCBpcyBsZXhp
Y2FsbHkgc29ydGVkLiIKKyAgKHByb2plY3QtLWVuc3VyZS1yZWFkLXByb2plY3QtbGlzdCkKKyAg
KGxldCAoKG5vbi1lc3NlbnRpYWwgdCkgOyBpbmhpYml0IHJlbW90ZS1maWxlIGFjdGlvbnMKKyAg
ICAgICAgKGZpbGUtbmFtZS1oYW5kbGVyLWFsaXN0IG5pbCkgOyBkaXR0bworICAgICAgICAoZGly
cyAoc2VxLXVuaXEKKyAgICAgICAgICAgICAgIChtYXBjYXIgKGxhbWJkYSAoeCkKKyAgICAgICAg
ICAgICAgICAgICAgICAgICAoZXhwYW5kLWZpbGUtbmFtZSAoZmlsZS1uYW1lLWFzLWRpcmVjdG9y
eSAoY2FyIHgpKSkpCisgICAgICAgICAgICAgICAgICAgICAgIHByb2plY3QtLWxpc3QpKSkKKyAg
ICAgICAgKHByZWZpeGVzKSkKKyAgICA7OyBTdXJlbHksIHRoZXJlJ3MgYSBiZXR0ZXIgYWxnb3Jp
dGhtIHRoYW4gbl4yLgorICAgIChkb2xpc3QgKGRpciBkaXJzKQorICAgICAgKGRvbGlzdCAoZGly
MiBkaXJzKQorICAgICAgICA7OyBkaXIgZXF1YWwgZGlyMiBtaWdodCBiZSBhIHNpbmdsZXQgd2Ug
d2FudCwgc28gZG9uJ3QgcHJ1bmUuCisgICAgICAgICh3aGVuLWxldCogKChjb21tb24tcHJlZml4
CisgICAgICAgICAgICAgICAgICAgICAoZmlsbC1jb21tb24tc3RyaW5nLXByZWZpeCBkaXIgZGly
MikpCisgICAgICAgICAgICAgICAgICAgICgoc3RyaW5nLXN1ZmZpeC1wICIvIiBjb21tb24tcHJl
Zml4KSkgOyBpZ25vcmUgbmFrZWQgcmVtb3RlICI6IiBwcmVmaXhlcworICAgICAgICAgICAgICAg
ICAgICAoY29tbW9uLXByZWZpeCAoYWJicmV2aWF0ZS1maWxlLW5hbWUgY29tbW9uLXByZWZpeCkp
CisgICAgICAgICAgICAgICAgICAgICgobm90IChtZW1iZXIgY29tbW9uLXByZWZpeCBwcmVmaXhl
cykpKSkKKyAgICAgICAgICAocHVzaCBjb21tb24tcHJlZml4IHByZWZpeGVzKSkpKQorICAgIChz
b3J0IHByZWZpeGVzICMnc3RyaW5nPCkpKQorCiAoZGVmdW4gcHJvamVjdC1mb3JnZXQtem9tYmll
LXByb2plY3RzICgpCiAgICJGb3JnZXQgYWxsIGtub3duIHByb2plY3RzIHRoYXQgZG9uJ3QgZXhp
c3QgYW55IG1vcmUuIgogICAoaW50ZXJhY3RpdmUpCkBAIC0yMDk5LDEzICsyMTI1LDI1IEBAIHBy
b2plY3QtZm9yZ2V0LXpvbWJpZS1wcm9qZWN0cwogCiAoZGVmdW4gcHJvamVjdC1mb3JnZXQtcHJv
amVjdHMtdW5kZXIgKGRpciAmb3B0aW9uYWwgcmVjdXJzaXZlKQogICAiRm9yZ2V0IGFsbCBrbm93
biBwcm9qZWN0cyBiZWxvdyBhIGRpcmVjdG9yeSBESVIuCi1JbnRlcmFjdGl2ZWx5LCBwcm9tcHQg
Zm9yIERJUi4KK0ludGVyYWN0aXZlbHksIHByb21wdCBmb3IgRElSLCBhbmQgZGVmYXVsdCB0byB0
aGUgY3VycmVudCBkaXJlY3RvcnkuCiBPcHRpb25hbCBhcmd1bWVudCBSRUNVUlNJVkUsIGlmIG5v
bi1uaWwgKGludGVyYWN0aXZlbHksIHRoZSBwcmVmaXgKIGFyZ3VtZW50KSwgbWVhbnMgcmVjdXJz
ZSBpbnRvIHN1YmRpcmVjdG9yaWVzIHVuZGVyIERJUgogdG8gcmVtb3ZlIHRob3NlIHByb2plY3Rz
IGZyb20gdGhlIGluZGV4LgogRGlzcGxheSBhIG1lc3NhZ2UgYXQgdGhlIGVuZCBzdW1tYXJpemlu
ZyB3aGF0IHdhcyBmb3Jnb3R0ZW4uCiBSZXR1cm4gdGhlIG51bWJlciBvZiBmb3Jnb3R0ZW4gcHJv
amVjdHMuIgotICAoaW50ZXJhY3RpdmUgIkREaXJlY3Rvcnk6IFxuUCIpCisgIChpbnRlcmFjdGl2
ZQorICAgKGxpc3QKKyAgICAobGV0KiAoKGNhbmRpZGF0ZXMKKyAgICAgICAgICAgIChhcHBlbmQg
KGxpc3QgKGFiYnJldmlhdGUtZmlsZS1uYW1lCisgICAgICAgICAgICAgICAgICAgICAgICAgICAo
ZmlsZS1uYW1lLWFzLWRpcmVjdG9yeQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1
bHQtZGlyZWN0b3J5KSkpCisgICAgICAgICAgICAgICAgICAgIChwcm9qZWN0LS1saXN0LWNvbW1v
bi1kaXItcHJlZml4ZXMpKSkKKyAgICAgICAgICAgKGNvbXBzCisgICAgICAgICAgICAoY29tcGxl
dGluZy1yZWFkICJEaXJlY3Rvcnk6ICIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBy
b2plY3QtLWZpbGUtY29tcGxldGlvbi10YWJsZSBjYW5kaWRhdGVzICduby1zb3J0KQorICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICBuaWwgdCkpCisgICAgICAgICAgIGNvbXBzKSkKKyAgICAo
bm90IChudWxsIGN1cnJlbnQtcHJlZml4LWFyZykpKSkKICAgKGxldCAoKGNvdW50IDApKQogICAg
IChpZiByZWN1cnNpdmUKICAgICAgICAgKGRvbGlzdCAocHJvaiAocHJvamVjdC1rbm93bi1wcm9q
ZWN0LXJvb3RzKSkKQEAgLTIxMjQsNiArMjE2MiwzMiBAQCBwcm9qZWN0LWZvcmdldC1wcm9qZWN0
cy11bmRlcgogICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50KSBjb3VudCkpCiAgICAgY291
bnQpKQogCisoZGVmdW4gcHJvamVjdC1mb3JnZXQtcHJvamVjdHMtdW5kZXItZGlycyAoZGlycyAm
b3B0aW9uYWwgcmVjdXJzaXZlKQorICAiRm9yZ2V0IGFsbCBrbm93biBwcm9qZWN0cyBiZWxvdyBl
YWNoIGRpcmVjdG9yeSBpbiBESVJTLgorSW50ZXJhY3RpdmVseSwgcHJvbXB0IGZvciBESVJTLgor
T3B0aW9uYWwgYXJndW1lbnQgUkVDVVJTSVZFLCBpZiBub24tbmlsIChpbnRlcmFjdGl2ZWx5LCB0
aGUgcHJlZml4Cithcmd1bWVudCksIG1lYW5zIHJlY3Vyc2UgaW50byBzdWJkaXJlY3RvcmllcyB1
bmRlciBESVJTCit0byByZW1vdmUgdGhvc2UgcHJvamVjdHMgZnJvbSB0aGUgaW5kZXguCitEaXNw
bGF5IG1lc3NhZ2VzIGF0IHRoZSBlbmQgb2YgcHJvY2Vzc2luZyBlYWNoIGRpcmVjdG9yeSBzdW1t
YXJpemluZword2hhdCB3YXMgZm9yZ290dGVuLiIKKyAgKGludGVyYWN0aXZlCisgICAobGlzdAor
ICAgIChvciAobGV0KiAoKGNvbXBzCisgICAgICAgICAgICAgICAgKGxldCAoKGNhbmRpZGF0ZXMg
KHByb2plY3QtLWxpc3QtY29tbW9uLWRpci1wcmVmaXhlcykpKQorICAgICAgICAgICAgICAgICAg
KGNvbXBsZXRpb24tYWxsLWNvbXBsZXRpb25zCisgICAgICAgICAgICAgICAgICAgKGNvbXBsZXRp
bmctcmVhZCAiRGlyZWN0b3JpZXM6ICIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIChwcm9qZWN0LS1maWxlLWNvbXBsZXRpb24tdGFibGUgY2FuZGlkYXRlcykKKyAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5pbCBuaWwpCisgICAgICAgICAgICAgICAgICAg
Y2FuZGlkYXRlcyBuaWwgbmlsKSkpCisgICAgICAgICAgICAgICAoXyAod2hlbiAoY2RyIChsYXN0
IGNvbXBzKSkgKHNldGNkciAobGFzdCBjb21wcykgbmlsKSkpCisgICAgICAgICAgICAgICAoY29t
cHMgKHNlcS11bmlxIChtYXBjYXIgKGxhbWJkYSAoeCkgKHN1YnN0cmluZy1uby1wcm9wZXJ0aWVz
IHgpKSBjb21wcykpKSkKKyAgICAgICAgICBjb21wcykKKyAgICAgICAgKHVzZXItZXJyb3IgIk5v
IGRpcmVjdG9yaWVzIHNlbGVjdGVkIikpCisgICAgKG5vdCAobnVsbCBjdXJyZW50LXByZWZpeC1h
cmcpKSkpCisgIChtYXBjYXIgKGxhbWJkYSAoZGlyKQorICAgICAgICAgICAgKHByb2plY3QtZm9y
Z2V0LXByb2plY3RzLXVuZGVyIGRpciByZWN1cnNpdmUpKQorICAgICAgICAgIGRpcnMpKQorCiAM
CiA7OzsgUHJvamVjdCBzd2l0Y2hpbmcKIAotLSAKMi40Ny4xCgo=
--000000000000309aa2062e31ed70--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Ship Mints <shipmints@HIDDEN> Subject: bug#76307: Acknowledgement ([PATCH] Add 'project-forget-projects-under-dirs', limit dir selection to relevant dirs) Message-ID: <handler.76307.B.17396418452473.ack <at> debbugs.gnu.org> References: <CAN+1Hbqgnc7kaLfXqBV5XbNnSyY2-7ygKFREa4enmLqzStrBjg@HIDDEN> X-Gnu-PR-Message: ack 76307 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 76307 <at> debbugs.gnu.org Date: Sat, 15 Feb 2025 17:51:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 76307 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 76307: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D76307 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN
Subject: bug#76307: [PATCH] Add 'project-forget-projects-under-dirs', limit dir selection to relevant dirs
Resent-From: Eshel Yaron <me@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 15 Feb 2025 19:19:03 +0000
Resent-Message-ID: <handler.76307.B76307.173964708318243 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76307
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Ship Mints <shipmints@HIDDEN>
Cc: 76307 <at> debbugs.gnu.org
Received: via spool by 76307-submit <at> debbugs.gnu.org id=B76307.173964708318243
(code B ref 76307); Sat, 15 Feb 2025 19:19:03 +0000
Received: (at 76307) by debbugs.gnu.org; 15 Feb 2025 19:18:03 +0000
Received: from localhost ([127.0.0.1]:57933 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1tjNfv-0004kB-9I
for submit <at> debbugs.gnu.org; Sat, 15 Feb 2025 14:18:03 -0500
Received: from mail.eshelyaron.com ([107.175.124.16]:39418 helo=eshelyaron.com)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1tjNfs-0004jk-RE
for 76307 <at> debbugs.gnu.org; Sat, 15 Feb 2025 14:18:01 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
s=mail; t=1739647080;
bh=YXvmPS2+twWp5pLsy01TYdwqLxKBOtZJ1qeFhIesLhk=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=srAm5Kh/R1y5mEk3JLT5HQ8mfn5JTKfdcA9GMWH6fiR1nqbtPasoGmakVzKV2eJWv
/3iRGMY/5OYHnC3QGX3VB1Qr+qYVhyHTS8bxx0jhepdPYMQ5tgwtLx0ATIJI/eBV9R
kChhS3rbMXQNfBHkAJjcXHmLtfo8EXBNo84eMK5aBIoJMDensTHQ0MKqTkA0V7jPLm
CSW8f1zEvvKhU98ejuIG3uexLnGubvTBfITlkeQZJCXNQax7AZCNzB+4s5afv4qWH4
+7CH4nJwup2RrnvLm0E9JgBrxP7QYPMXmjgChbKFislFa1Pt1rT1/SETaEpb/kgucA
RBwv1syuE3Zxw==
From: Eshel Yaron <me@HIDDEN>
In-Reply-To: <CAN+1Hbqgnc7kaLfXqBV5XbNnSyY2-7ygKFREa4enmLqzStrBjg@HIDDEN>
References: <CAN+1Hbqgnc7kaLfXqBV5XbNnSyY2-7ygKFREa4enmLqzStrBjg@HIDDEN>
Date: Sat, 15 Feb 2025 20:17:57 +0100
Message-ID: <m1seofdnkq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
Hi there,
Ship Mints <shipmints@HIDDEN> writes:
> *** Improved directory selection in 'project-forget-projects-under'.
>
> This command now prompts using a directory list limited to those in the
> remembered project list. Previously, it would prompt using general
> directories from the file system.
>
> I hope this isn't controversial...it made limited sense to me that the prompt candidates had no relationship to
> remembered projects.
I fully agree, the project-forget-projects-under prompt could be more helpful.
> +(defun project--list-common-dir-prefixes ()
> + "Return a list of common directory prefixes from `project--list'.
> +The returned list is lexically sorted."
> + (project--ensure-read-project-list)
> + (let ((non-essential t) ; inhibit remote-file actions
> + (file-name-handler-alist nil) ; ditto
> + (dirs (seq-uniq
> + (mapcar (lambda (x)
> + (expand-file-name (file-name-as-directory (car x))))
> + project--list)))
> + (prefixes))
> + ;; Surely, there's a better algorithm than n^2.
> + (dolist (dir dirs)
> + (dolist (dir2 dirs)
> + ;; dir equal dir2 might be a singlet we want, so don't prune.
> + (when-let* ((common-prefix
> + (fill-common-string-prefix dir dir2))
> + ((string-suffix-p "/" common-prefix)) ; ignore naked remote ":" prefixes
> + (common-prefix (abbreviate-file-name common-prefix))
> + ((not (member common-prefix prefixes))))
> + (push common-prefix prefixes))))
> + (sort prefixes #'string<)))
> +
> (defun project-forget-zombie-projects ()
> "Forget all known projects that don't exist any more."
> (interactive)
> @@ -2099,13 +2125,25 @@ project-forget-zombie-projects
>
> (defun project-forget-projects-under (dir &optional recursive)
> "Forget all known projects below a directory DIR.
> -Interactively, prompt for DIR.
> +Interactively, prompt for DIR, and default to the current directory.
> Optional argument RECURSIVE, if non-nil (interactively, the prefix
> argument), means recurse into subdirectories under DIR
> to remove those projects from the index.
> Display a message at the end summarizing what was forgotten.
> Return the number of forgotten projects."
> - (interactive "DDirectory: \nP")
> + (interactive
> + (list
> + (let* ((candidates
> + (append (list (abbreviate-file-name
> + (file-name-as-directory
> + default-directory)))
> + (project--list-common-dir-prefixes)))
> + (comps
> + (completing-read "Directory: "
> + (project--file-completion-table candidates 'no-sort)
> + nil t))
> + comps))
> + (not (null current-prefix-arg))))
> (let ((count 0))
> (if recursive
> (dolist (proj (project-known-project-roots))
ISTM that we can stick to read-directory-name, but add a completion
predicate that only keeps directories that lead to project roots.
Here's how that could look:
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 35bf66c9ffb..b20e3d5981d 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -2097,6 +2097,18 @@ project-forget-zombie-projects
(unless (file-exists-p proj)
(project-forget-project proj))))
+(defun project-read-ancestor-directory (prompt)
+ "Prompt with PROMPT for an ancestor directory of one or more project roots."
+ (project--ensure-read-project-list)
+ (read-directory-name
+ prompt nil nil nil nil
+ (let ((ps (mapcar (lambda (p) (expand-file-name (car p))) project--list)))
+ (lambda (dir)
+ (catch 'ball
+ (dolist (p ps)
+ (when (string-prefix-p (expand-file-name dir) p)
+ (throw 'ball t))))))))
+
(defun project-forget-projects-under (dir &optional recursive)
"Forget all known projects below a directory DIR.
Interactively, prompt for DIR.
@@ -2105,7 +2117,9 @@ project-forget-projects-under
to remove those projects from the index.
Display a message at the end summarizing what was forgotten.
Return the number of forgotten projects."
- (interactive "DDirectory: \nP")
+ (interactive
+ (list (project-read-ancestor-directory "Forget projects under directory: ")
+ current-prefix-arg))
(let ((count 0))
(if recursive
(dolist (proj (project-known-project-roots))
Best,
Eshel
X-Loop: help-debbugs@HIDDEN
Subject: bug#76307: [PATCH] Add 'project-forget-projects-under-dirs', limit dir selection to relevant dirs
Resent-From: Ship Mints <shipmints@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 15 Feb 2025 19:33:01 +0000
Resent-Message-ID: <handler.76307.B76307.173964796221013 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76307
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Eshel Yaron <me@HIDDEN>
Cc: 76307 <at> debbugs.gnu.org
Received: via spool by 76307-submit <at> debbugs.gnu.org id=B76307.173964796221013
(code B ref 76307); Sat, 15 Feb 2025 19:33:01 +0000
Received: (at 76307) by debbugs.gnu.org; 15 Feb 2025 19:32:42 +0000
Received: from localhost ([127.0.0.1]:57958 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1tjNu5-0005Sq-MD
for submit <at> debbugs.gnu.org; Sat, 15 Feb 2025 14:32:42 -0500
Received: from mail-ua1-x934.google.com ([2607:f8b0:4864:20::934]:54347)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
id 1tjNu2-0005SV-7p
for 76307 <at> debbugs.gnu.org; Sat, 15 Feb 2025 14:32:39 -0500
Received: by mail-ua1-x934.google.com with SMTP id
a1e0cc1a2514c-868f35fdd27so600482241.0
for <76307 <at> debbugs.gnu.org>; Sat, 15 Feb 2025 11:32:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1739647952; x=1740252752; darn=debbugs.gnu.org;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:from:to:cc:subject:date:message-id:reply-to;
bh=OzgHIBOZ6aVzbIETYHxFz0RscG+Pf/lKO2ad8egeR/A=;
b=c7Nuo0QTFHsvrHzzeLo0+eC6DJosRjsqMk1Oct2428Mc5vfoEj6vz0x3LMeZI+0xHR
cvp73hYs3Rw6711yY7vKp9GOGF1tWQ1rA6fityvb+XKhbmZlWUokcL3Sgut7DoY/8PkJ
kgBIRgDQajGbOslpfZ8khcbEkFWCheYQHDiY/jotkCXbqbz8i5ZTqn2PXIRk/R11V4L9
E2xXYklDYNblu7H04lJxtJUIhObBKOOwxEaHHvE3XT+BNksFBBXniDoZr53kHXx/UrUh
lFgvdjCFhshvRX7VsqZ8rVXz/Ud18Ze3cnAQUpgUsJIs73tO7enDgRgat1frsh7R0luE
Yx0w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1739647952; x=1740252752;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=OzgHIBOZ6aVzbIETYHxFz0RscG+Pf/lKO2ad8egeR/A=;
b=AmjwvAvHcGCLka0t5siBJrp0hnwKS/OxFwJa7eaDX8of+El8MumiXob3PD+W8up8iy
KuLo/Y5YO0CLJFZM4REtMO8T26Ae6LZO9rMvBwlCG96pLQ6oPbxNxVxFXryOnTZ7SskX
7cZaqpCnwTZYU3JK65FRTRdJEAmzxV8yi/RCNTpdWwCB2mUmCZo1jU7Gcq+6smlf9v6j
Nkjc5OplyqBbVqssKn7/JDwfiFZlPr/01FfxHZeUUCo4mX8W87eUy8YE2zLGDHDGvWT7
mB77dU03dfFJkbekHE/pG4g8Itabmx9nsxweK4C7OwI6Fa75ZQdPp4HgpjDRNJ6aOJ/o
EXdA==
X-Gm-Message-State: AOJu0Yw1/jwekSc41rRBHcO3PMzFqDpmrXQ32AgYeHY0AV8493uwUkS7
dHl7B9HflkvqsgxDPhBPTSJ+bWkigRQhW/WeRrSf6hDSV7xoWbe4dID+KjKjRshgjr3Aa3EsBuJ
PiqZqLSv9C+9QjD1XljcXfboqMtoiCw==
X-Gm-Gg: ASbGncsKPwHaAbzAkZEv7Hf8YCAMzk+mmiSPzP0hRB1ypoOxCjrblNjuqELkOTJZNzp
Nf5ghyn8WQXDiaiIhDN9CVvxCep+ZztkT4u16HY8ukq6wI+w1p3k6x3s0/6fem7MiVOPfYpyr
X-Google-Smtp-Source: AGHT+IFjKncZ1Pjmn6YuFqOTPRZgxWQLHP+wU2PtV177ZCiugW1Arc/l9/Z5uP5MunnClEpIdneUDLNfUiBIg7lMN80=
X-Received: by 2002:a05:6102:290a:b0:4b9:bc52:e050 with SMTP id
ada2fe7eead31-4bd3fc66f5cmr2562367137.2.1739647952472; Sat, 15 Feb 2025
11:32:32 -0800 (PST)
MIME-Version: 1.0
References: <CAN+1Hbqgnc7kaLfXqBV5XbNnSyY2-7ygKFREa4enmLqzStrBjg@HIDDEN>
<m1seofdnkq.fsf@HIDDEN>
In-Reply-To: <m1seofdnkq.fsf@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Sat, 15 Feb 2025 14:32:21 -0500
X-Gm-Features: AWEUYZkz8qHdZoR22o39GBPwYo0-IWHiqEfTpOcsOx_aEBEwfWpEEEpZA_-D4wU
Message-ID: <CAN+1HbpGR_=HSszd7xAY7M6zXiZ04aCjAo_VtAVfzZAnL5Wkjg@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000003dd1f5062e335a5c"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
--0000000000003dd1f5062e335a5c
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Sat, Feb 15, 2025 at 2:18=E2=80=AFPM Eshel Yaron <me@HIDDEN> wro=
te:
> Hi there,
>
> Ship Mints <shipmints@HIDDEN> writes:
>
> > *** Improved directory selection in 'project-forget-projects-under'.
> >
> > This command now prompts using a directory list limited to those in the
> > remembered project list. Previously, it would prompt using general
> > directories from the file system.
> >
> > I hope this isn't controversial...it made limited sense to me that the
> prompt candidates had no relationship to
> > remembered projects.
>
> I fully agree, the project-forget-projects-under prompt could be more
> helpful.
>
> > +(defun project--list-common-dir-prefixes ()
> > + "Return a list of common directory prefixes from `project--list'.
> > +The returned list is lexically sorted."
> > + (project--ensure-read-project-list)
> > + (let ((non-essential t) ; inhibit remote-file actions
> > + (file-name-handler-alist nil) ; ditto
> > + (dirs (seq-uniq
> > + (mapcar (lambda (x)
> > + (expand-file-name (file-name-as-directory (ca=
r
> x))))
> > + project--list)))
> > + (prefixes))
> > + ;; Surely, there's a better algorithm than n^2.
> > + (dolist (dir dirs)
> > + (dolist (dir2 dirs)
> > + ;; dir equal dir2 might be a singlet we want, so don't prune.
> > + (when-let* ((common-prefix
> > + (fill-common-string-prefix dir dir2))
> > + ((string-suffix-p "/" common-prefix)) ; ignore
> naked remote ":" prefixes
> > + (common-prefix (abbreviate-file-name common-prefix=
))
> > + ((not (member common-prefix prefixes))))
> > + (push common-prefix prefixes))))
> > + (sort prefixes #'string<)))
> > +
> > (defun project-forget-zombie-projects ()
> > "Forget all known projects that don't exist any more."
> > (interactive)
> > @@ -2099,13 +2125,25 @@ project-forget-zombie-projects
> >
> > (defun project-forget-projects-under (dir &optional recursive)
> > "Forget all known projects below a directory DIR.
> > -Interactively, prompt for DIR.
> > +Interactively, prompt for DIR, and default to the current directory.
> > Optional argument RECURSIVE, if non-nil (interactively, the prefix
> > argument), means recurse into subdirectories under DIR
> > to remove those projects from the index.
> > Display a message at the end summarizing what was forgotten.
> > Return the number of forgotten projects."
> > - (interactive "DDirectory: \nP")
> > + (interactive
> > + (list
> > + (let* ((candidates
> > + (append (list (abbreviate-file-name
> > + (file-name-as-directory
> > + default-directory)))
> > + (project--list-common-dir-prefixes)))
> > + (comps
> > + (completing-read "Directory: "
> > + (project--file-completion-table candidate=
s
> 'no-sort)
> > + nil t))
> > + comps))
> > + (not (null current-prefix-arg))))
> > (let ((count 0))
> > (if recursive
> > (dolist (proj (project-known-project-roots))
>
> ISTM that we can stick to read-directory-name, but add a completion
> predicate that only keeps directories that lead to project roots.
>
> Here's how that could look:
>
> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
> index 35bf66c9ffb..b20e3d5981d 100644
> --- a/lisp/progmodes/project.el
> +++ b/lisp/progmodes/project.el
> @@ -2097,6 +2097,18 @@ project-forget-zombie-projects
> (unless (file-exists-p proj)
> (project-forget-project proj))))
>
> +(defun project-read-ancestor-directory (prompt)
> + "Prompt with PROMPT for an ancestor directory of one or more project
> roots."
> + (project--ensure-read-project-list)
> + (read-directory-name
> + prompt nil nil nil nil
> + (let ((ps (mapcar (lambda (p) (expand-file-name (car p)))
> project--list)))
> + (lambda (dir)
> + (catch 'ball
> + (dolist (p ps)
> + (when (string-prefix-p (expand-file-name dir) p)
> + (throw 'ball t))))))))
> +
> (defun project-forget-projects-under (dir &optional recursive)
> "Forget all known projects below a directory DIR.
> Interactively, prompt for DIR.
> @@ -2105,7 +2117,9 @@ project-forget-projects-under
> to remove those projects from the index.
> Display a message at the end summarizing what was forgotten.
> Return the number of forgotten projects."
> - (interactive "DDirectory: \nP")
> + (interactive
> + (list (project-read-ancestor-directory "Forget projects under
> directory: ")
> + current-prefix-arg))
> (let ((count 0))
> (if recursive
> (dolist (proj (project-known-project-roots))
>
Thank you for your thoughtful feedback.
A couple of things stand out. First, calling completing-read directly means
we can reuse the project-file completion category (and if you use something
like marginalia, you get nice metadata in your completion list), and which
also now can inhibit sorting the completion candidate list, which I find
can be annoying for this kind of use case.
Second, since this is forget "under" directories, prompting with the common
prefixes that allow one to forget under the whole shebang makes more sense
to me. Perhaps your ancestor list generator can be more efficient than the
common-prefix code that I quickly wrote, and it would be helpful for it to
show all common prefixes, don't you agree?
-Stephane
--0000000000003dd1f5062e335a5c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Sat, Feb 15, 2025 at 2:18=E2=80=AFPM Eshel Yaron <<a href=3D"mailto:m=
e@HIDDEN">me@HIDDEN</a>> wrote:</span></div></div><div c=
lass=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quote=
" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);=
padding-left:1ex">Hi there,<br>
<br>
Ship Mints <<a href=3D"mailto:shipmints@HIDDEN" target=3D"_blank">shi=
pmints@HIDDEN</a>> writes:<br>
<br>
> *** Improved directory selection in 'project-forget-projects-under=
'.<br>
><br>
> This command now prompts using a directory list limited to those in th=
e<br>
> remembered project list.=C2=A0 Previously, it would prompt using gener=
al<br>
> directories from the file system.<br>
><br>
> I hope this isn't controversial...it made limited sense to me that=
the prompt candidates had no relationship to<br>
> remembered projects.<br>
<br>
I fully agree, the project-forget-projects-under prompt could be more helpf=
ul.<br>
<br>
> +(defun project--list-common-dir-prefixes ()<br>
> +=C2=A0 "Return a list of common directory prefixes from `project=
--list'.<br>
> +The returned list is lexically sorted."<br>
> +=C2=A0 (project--ensure-read-project-list)<br>
> +=C2=A0 (let ((non-essential t) ; inhibit remote-file actions<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 (file-name-handler-alist nil) ; ditto<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 (dirs (seq-uniq<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(mapcar (lambd=
a (x)<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0(expand-file-name (file-name-as-directory (car x))))<b=
r>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0project--list)))<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 (prefixes))<br>
> +=C2=A0 =C2=A0 ;; Surely, there's a better algorithm than n^2.<br>
> +=C2=A0 =C2=A0 (dolist (dir dirs)<br>
> +=C2=A0 =C2=A0 =C2=A0 (dolist (dir2 dirs)<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; dir equal dir2 might be a singlet we w=
ant, so don't prune.<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 (when-let* ((common-prefix<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0(fill-common-string-prefix dir dir2))<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
((string-suffix-p "/" common-prefix)) ; ignore naked remote &quo=
t;:" prefixes<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
(common-prefix (abbreviate-file-name common-prefix))<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
((not (member common-prefix prefixes))))<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (push common-prefix prefixes))))<b=
r>
> +=C2=A0 =C2=A0 (sort prefixes #'string<)))<br>
> +<br>
>=C2=A0 (defun project-forget-zombie-projects ()<br>
>=C2=A0 =C2=A0 "Forget all known projects that don't exist any =
more."<br>
>=C2=A0 =C2=A0 (interactive)<br>
> @@ -2099,13 +2125,25 @@ project-forget-zombie-projects<br>
>=C2=A0 <br>
>=C2=A0 (defun project-forget-projects-under (dir &optional recursiv=
e)<br>
>=C2=A0 =C2=A0 "Forget all known projects below a directory DIR.<br=
>
> -Interactively, prompt for DIR.<br>
> +Interactively, prompt for DIR, and default to the current directory.<=
br>
>=C2=A0 Optional argument RECURSIVE, if non-nil (interactively, the pref=
ix<br>
>=C2=A0 argument), means recurse into subdirectories under DIR<br>
>=C2=A0 to remove those projects from the index.<br>
>=C2=A0 Display a message at the end summarizing what was forgotten.<br>
>=C2=A0 Return the number of forgotten projects."<br>
> -=C2=A0 (interactive "DDirectory: \nP")<br>
> +=C2=A0 (interactive<br>
> +=C2=A0 =C2=A0(list<br>
> +=C2=A0 =C2=A0 (let* ((candidates<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (append (list (abbreviate-f=
ile-name<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0(file-name-as-directory<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 default-directory)))<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
(project--list-common-dir-prefixes)))<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(comps<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (completing-read "Dire=
ctory: "<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(project--file-completion-table candidat=
es 'no-sort)<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nil t))<br>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0comps))<br>
> +=C2=A0 =C2=A0 (not (null current-prefix-arg))))<br>
>=C2=A0 =C2=A0 (let ((count 0))<br>
>=C2=A0 =C2=A0 =C2=A0 (if recursive<br>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (dolist (proj (project-known-project=
-roots))<br>
<br>
ISTM that we can stick to read-directory-name, but add a completion<br>
predicate that only keeps directories that lead to project roots.<br>
<br>
Here's how that could look:<br>
<br>
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el<br>
index 35bf66c9ffb..b20e3d5981d 100644<br>
--- a/lisp/progmodes/project.el<br>
+++ b/lisp/progmodes/project.el<br>
@@ -2097,6 +2097,18 @@ project-forget-zombie-projects<br>
=C2=A0 =C2=A0 =C2=A0(unless (file-exists-p proj)<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0(project-forget-project proj))))<br>
<br>
+(defun project-read-ancestor-directory (prompt)<br>
+=C2=A0 "Prompt with PROMPT for an ancestor directory of one or more p=
roject roots."<br>
+=C2=A0 (project--ensure-read-project-list)<br>
+=C2=A0 (read-directory-name<br>
+=C2=A0 =C2=A0prompt nil nil nil nil<br>
+=C2=A0 =C2=A0(let ((ps (mapcar (lambda (p) (expand-file-name (car p))) pro=
ject--list)))<br>
+=C2=A0 =C2=A0 =C2=A0(lambda (dir)<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0(catch 'ball<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(dolist (p ps)<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when (string-prefix-p (expand-fi=
le-name dir) p)<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(throw 'ball t))))))))=
<br>
+<br>
=C2=A0(defun project-forget-projects-under (dir &optional recursive)<br=
>
=C2=A0 =C2=A0"Forget all known projects below a directory DIR.<br>
=C2=A0Interactively, prompt for DIR.<br>
@@ -2105,7 +2117,9 @@ project-forget-projects-under<br>
=C2=A0to remove those projects from the index.<br>
=C2=A0Display a message at the end summarizing what was forgotten.<br>
=C2=A0Return the number of forgotten projects."<br>
-=C2=A0 (interactive "DDirectory: \nP")<br>
+=C2=A0 (interactive<br>
+=C2=A0 =C2=A0(list (project-read-ancestor-directory "Forget projects =
under directory: ")<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0current-prefix-arg))<br>
=C2=A0 =C2=A0(let ((count 0))<br>
=C2=A0 =C2=A0 =C2=A0(if recursive<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(dolist (proj (project-known-project-root=
s))<br></blockquote><div><br></div><div class=3D"gmail_default" style=3D"fo=
nt-family:monospace">Thank you for your thoughtful feedback.</div><div clas=
s=3D"gmail_default" style=3D"font-family:monospace"><br></div><div class=3D=
"gmail_default" style=3D"font-family:monospace">A couple of things stand ou=
t. First, calling completing-read directly means we can reuse the project-f=
ile completion category (and if you use something like marginalia, you get =
nice metadata in your completion list), and which also now can inhibit sort=
ing the completion candidate list,=C2=A0which I find can be annoying for=C2=
=A0this kind of use case.</div><div class=3D"gmail_default" style=3D"font-f=
amily:monospace"><br></div><div class=3D"gmail_default" style=3D"font-famil=
y:monospace">Second, since this is forget "under" directories, pr=
ompting with the common prefixes that allow one to forget under the whole s=
hebang makes more sense to me. Perhaps your ancestor list generator can be =
more efficient than the common-prefix code that I quickly wrote, and it wou=
ld be helpful for it to show all common prefixes, don't you agree?</div=
><div class=3D"gmail_default" style=3D"font-family:monospace"><br></div><di=
v class=3D"gmail_default" style=3D"font-family:monospace">-Stephane</div></=
div></div>
--0000000000003dd1f5062e335a5c--
X-Loop: help-debbugs@HIDDEN
Subject: bug#76307: [PATCH] Add 'project-forget-projects-under-dirs', limit dir selection to relevant dirs
Resent-From: Eshel Yaron <me@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 15 Feb 2025 22:10:01 +0000
Resent-Message-ID: <handler.76307.B76307.173965737220432 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76307
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Ship Mints <shipmints@HIDDEN>
Cc: 76307 <at> debbugs.gnu.org
Received: via spool by 76307-submit <at> debbugs.gnu.org id=B76307.173965737220432
(code B ref 76307); Sat, 15 Feb 2025 22:10:01 +0000
Received: (at 76307) by debbugs.gnu.org; 15 Feb 2025 22:09:32 +0000
Received: from localhost ([127.0.0.1]:58384 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1tjQLr-0005JT-Qj
for submit <at> debbugs.gnu.org; Sat, 15 Feb 2025 17:09:32 -0500
Received: from mail.eshelyaron.com ([107.175.124.16]:45430 helo=eshelyaron.com)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1tjQLp-0005JJ-Jh
for 76307 <at> debbugs.gnu.org; Sat, 15 Feb 2025 17:09:30 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
s=mail; t=1739657368;
bh=vN3wLcr1uKCBcVeuvOYOLBMdG7DK5SDrx7//w/idXyI=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=jJVJZZ9+TSIOUL3/qSIyJy1vCjtMYzSZQrBbZeac9JlF+205di4Ptr6SkqgjvzO7F
CSQay27TpLX6jd3uFz3JacMZSWq1lCRbUQ4MRKe5FF6rgJzgsEUloDYrgjErDUlxwu
3abqI9NlDAbmmOYt6DUUvSDsB0j2rMjd/JUlfA+jj22JlCyzHGkmwlIZcUM/J1pf7F
1hsIR/ffnkoILHZmB5EmRMJr8EWz0GRF3pMVe6ZMG3FzvYQryiqZPr8nKsDmHTBLCk
dUFxQeUHgWKujNBXXoyR9lWo3waPODnMLic/KdMZrL95mmfKQCVPZqmP2uvtei6Ota
T/pLdSFHAT6Hw==
From: Eshel Yaron <me@HIDDEN>
In-Reply-To: <CAN+1HbpGR_=HSszd7xAY7M6zXiZ04aCjAo_VtAVfzZAnL5Wkjg@HIDDEN>
References: <CAN+1Hbqgnc7kaLfXqBV5XbNnSyY2-7ygKFREa4enmLqzStrBjg@HIDDEN>
<m1seofdnkq.fsf@HIDDEN>
<CAN+1HbpGR_=HSszd7xAY7M6zXiZ04aCjAo_VtAVfzZAnL5Wkjg@HIDDEN>
Date: Sat, 15 Feb 2025 23:09:26 +0100
Message-ID: <m1tt8uc12h.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
Ship Mints <shipmints@HIDDEN> writes:
> Thank you for your thoughtful feedback.
>
> A couple of things stand out. First, calling completing-read directly means we can reuse the project-file
> completion category (and if you use something like marginalia, you get nice metadata in your completion list),
In my suggested approach we get the "file" completion category, which
AFAICT marginalia picks up just as well and provides the same kind of
completion annotations.
> and which also now can inhibit sorting the completion candidate list, which I find can be annoying for this kind of
> use case.
Sorry, I'm not sure I understand the problem.
FWIW there are several ways to control sorting besides specifying
display-sort-function in the completion metadata, like completions-sort,
completion-category-overrides and completion-extra-properties.
> Second, since this is forget "under" directories, prompting with the common prefixes that allow one to forget
> under the whole shebang makes more sense to me.
You could still select a common ancestor directory (prefix) to forget
all projects under it, if that's what you mean.
> Perhaps your ancestor list generator can be more efficient than the
> common-prefix code that I quickly wrote, and it would be helpful for
> it to show all common prefixes, don't you agree?
I don't see a lot of benefit in the flat list of all possible choices in
this case, but no strong objection either, just a personal preference.
Eshel
X-Loop: help-debbugs@HIDDEN
Subject: bug#76307: [PATCH] Add 'project-forget-projects-under-dirs', limit dir selection to relevant dirs
Resent-From: Ship Mints <shipmints@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 16 Feb 2025 12:27:02 +0000
Resent-Message-ID: <handler.76307.B76307.173970879611700 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76307
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Eshel Yaron <me@HIDDEN>
Cc: 76307 <at> debbugs.gnu.org
Received: via spool by 76307-submit <at> debbugs.gnu.org id=B76307.173970879611700
(code B ref 76307); Sun, 16 Feb 2025 12:27:02 +0000
Received: (at 76307) by debbugs.gnu.org; 16 Feb 2025 12:26:36 +0000
Received: from localhost ([127.0.0.1]:60722 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1tjdjI-00032d-2K
for submit <at> debbugs.gnu.org; Sun, 16 Feb 2025 07:26:36 -0500
Received: from mail-vs1-xe2d.google.com ([2607:f8b0:4864:20::e2d]:48253)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
id 1tjdjD-00032K-QC
for 76307 <at> debbugs.gnu.org; Sun, 16 Feb 2025 07:26:33 -0500
Received: by mail-vs1-xe2d.google.com with SMTP id
ada2fe7eead31-4be4de0c038so154836137.0
for <76307 <at> debbugs.gnu.org>; Sun, 16 Feb 2025 04:26:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1739708786; x=1740313586; darn=debbugs.gnu.org;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:from:to:cc:subject:date:message-id:reply-to;
bh=irMfuDJ9QsU9pHHd9/zJofhK41Rak/yl02UOKin9k6s=;
b=fG63MhHQP61CMYpjf04oVXAMavDeVPiN5yy2pROrk62eRDxDoVfz3wZsO66WCo+G50
Ub2/2Pm3TO8zxH0jcVTBdfth+GMlQNLxyymFEoqFfRQyT+JZKSnV0UJ7AupCpGo3KZ2o
gJA5axq3o2tY0Ov/6wFhOmHj8EoX+DLCxTjRkVyQtegymry75cb2EB98AXCsthv9Ix+R
8wy5qFvaNxM0UxReIw04NCjH/RpSFBDgKqbvX1Q/gmSvNAL+3PMj1vdjIstKXv/lskcT
65NyKtXbangNlUKEb9kH8h+u23PictQh1JENaV2CO6W93gswdaFkqLA33MwbfkN52R/c
WDgQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1739708786; x=1740313586;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=irMfuDJ9QsU9pHHd9/zJofhK41Rak/yl02UOKin9k6s=;
b=qA+pBaEKP9YCXy5DgoPaBdP8I5WG9Cy/WQdWVmghutryOfX5mRjWiXw9jCGQnfAzeY
deGdsJaXS7jGtdlWyyWcA2E5PEdWMBgX525tfPW+eTzNW+7wHHZ1c9//px+YCt44QJsU
wlgG3DQ+a5eXjkfoVWapL5StKhkX1whrfVhkwG0xyOJydO/7qy/dLuPjrC0kPjjn0I9/
C1uQOcZp3IaJ1Jl6BuciNRx2kmHhYFQcvh2c+F2sZTceZX+aetP9ekEtJx/szPLBIrMY
aKYTCxfxjjpxcXlbTipLNfAzRo3KVm7+9X34doLgzmNh9/UB9JgHexmFjFLQAu98TEDi
6RRQ==
X-Gm-Message-State: AOJu0Yzg9Dv3Gg5PACy5ASND1Rppb8sByB4ktjRE9kBuY2Dk9SARYqh1
BJntDMmNMgwNwKqaJ1ycPInJSR/bWg91X19SK6xlqI3Y6AFDiaznHupbuRdPGdMUHuPdbathKCm
X4/a+j/I+sSR/nxIzc+jqkPjL268=
X-Gm-Gg: ASbGncuti5aMNK9+gzA51M9JUaTe4zjR6eXLJV+/54sBM9IaeSbmMxFYue3QA/3kVYq
9idLYBW2Y5MY0fP0BqatHP6aF/GBAUF5N8BVF5MjGCq5Sh8+b6dwE9e2p8j0HinmtYCG8Fh7G
X-Google-Smtp-Source: AGHT+IE7IU18zU0Jr/062sSZt3rGXfbpdRQdDn7sFRKoFUBo1zyv10DUgijrphyTExutrilwA9nb2oJfXRK2iBWYuto=
X-Received: by 2002:a05:6102:91a:b0:4b2:48ba:9943 with SMTP id
ada2fe7eead31-4bd3fe2f7e8mr2847065137.24.1739708785845; Sun, 16 Feb 2025
04:26:25 -0800 (PST)
MIME-Version: 1.0
References: <CAN+1Hbqgnc7kaLfXqBV5XbNnSyY2-7ygKFREa4enmLqzStrBjg@HIDDEN>
<m1seofdnkq.fsf@HIDDEN>
<CAN+1HbpGR_=HSszd7xAY7M6zXiZ04aCjAo_VtAVfzZAnL5Wkjg@HIDDEN>
<m1tt8uc12h.fsf@HIDDEN>
In-Reply-To: <m1tt8uc12h.fsf@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Sun, 16 Feb 2025 07:26:14 -0500
X-Gm-Features: AWEUYZm2SLM9JR5Os7zzaMx9mP5N_OnZoVXq_BCaLP8eBjgcIAvkIUFtBmwn4-s
Message-ID: <CAN+1HbpyCkm86RzZZaKMiXCHYGGD7o_CboBxLZmA-3Q=diZEaQ@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000316e8f062e41845f"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
--000000000000316e8f062e41845f
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Sat, Feb 15, 2025 at 5:09=E2=80=AFPM Eshel Yaron <me@HIDDEN> wro=
te:
> Ship Mints <shipmints@HIDDEN> writes:
>
> > Thank you for your thoughtful feedback.
> >
> > A couple of things stand out. First, calling completing-read directly
> means we can reuse the project-file
> > completion category (and if you use something like marginalia, you get
> nice metadata in your completion list),
>
> In my suggested approach we get the "file" completion category, which
> AFAICT marginalia picks up just as well and provides the same kind of
> completion annotations.
>
> > and which also now can inhibit sorting the completion candidate list,
> which I find can be annoying for this kind of
> > use case.
>
> Sorry, I'm not sure I understand the problem.
>
> FWIW there are several ways to control sorting besides specifying
> display-sort-function in the completion metadata, like completions-sort,
> completion-category-overrides and completion-extra-properties.
>
Hewing to the style of the project.el code base, considered choices like a
dedicated project-file category, and reusing/improving its own code seem
like good things to me. I'm not one of its maintainers, so I try to keep it
easy for those who are.
> > Second, since this is forget "under" directories, prompting with the
> common prefixes that allow one to forget
> > under the whole shebang makes more sense to me.
>
> You could still select a common ancestor directory (prefix) to forget
> all projects under it, if that's what you mean.
>
> > Perhaps your ancestor list generator can be more efficient than the
> > common-prefix code that I quickly wrote, and it would be helpful for
> > it to show all common prefixes, don't you agree?
>
> I don't see a lot of benefit in the flat list of all possible choices in
> this case, but no strong objection either, just a personal preference.
>
Not sure the common-prefix list is "flatter" than any other kind of list,
but it is convenient when one wants to forget projects on a remote host en
masse, or in the root of a directory tree that has script-kiddie git repos
everywhere (one day, they'll all learn that monorepos are the way) and I
want to forget everything I've seen (for more than one reason!).
--000000000000316e8f062e41845f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Sat, Feb 15, 2025 at 5:09=E2=80=AFPM Eshel Yaron <<a href=3D"mailto:m=
e@HIDDEN">me@HIDDEN</a>> wrote:</span></div></div><div c=
lass=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quote=
" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);=
padding-left:1ex">Ship Mints <<a href=3D"mailto:shipmints@HIDDEN" tar=
get=3D"_blank">shipmints@HIDDEN</a>> writes:<br>
<br>
> Thank you for your thoughtful feedback.<br>
><br>
> A couple of things stand out. First, calling completing-read directly =
means we can reuse the project-file<br>
> completion category (and if you use something like marginalia, you get=
nice metadata in your completion list),<br>
<br>
In my suggested approach we get the "file" completion category, w=
hich<br>
AFAICT marginalia picks up just as well and provides the same kind of<br>
completion annotations.<br>
<br>
> and which also now can inhibit sorting the completion candidate list, =
which I find can be annoying for this kind of<br>
> use case.<br>
<br>
Sorry, I'm not sure I understand the problem.<br>
<br>
FWIW there are several ways to control sorting besides specifying<br>
display-sort-function in the completion metadata, like completions-sort,<br=
>
completion-category-overrides and completion-extra-properties.<br></blockqu=
ote><div><br></div><div><div class=3D"gmail_default" style=3D"font-family:m=
onospace">Hewing to the style of the project.el code base, considered choic=
es like a dedicated project-file category, and reusing/improving its=C2=A0o=
wn code seem like good things to=C2=A0me. I'm not one of its maintainer=
s, so I try to keep it easy for those who are.</div></div><div>=C2=A0</div>=
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">
> Second, since this is forget "under" directories, prompting =
with the common prefixes that allow one to forget<br>
> under the whole shebang makes more sense to me. <br>
<br>
You could still select a common ancestor directory (prefix) to forget<br>
all projects under it, if that's what you mean.<br>
<br>
> Perhaps your ancestor list generator can be more efficient than the<br=
>
> common-prefix code that I quickly wrote, and it would be helpful for<b=
r>
> it to show all common prefixes, don't you agree?<br>
<br>
I don't see a lot of benefit in the flat list of all possible choices i=
n<br>
this case, but no strong objection either, just a personal preference.<br><=
/blockquote><div><br></div><div class=3D"gmail_default" style=3D"font-famil=
y:monospace">Not sure the common-prefix list is "flatter" than an=
y other kind of list, but it is convenient when one wants to forget project=
s on a remote host en masse, or in the root of a directory tree that has sc=
ript-kiddie git repos everywhere (one day, they'll all learn that monor=
epos are the way) and I want to forget everything I've seen (for more t=
han one reason!).</div></div></div>
--000000000000316e8f062e41845f--
X-Loop: help-debbugs@HIDDEN
Subject: bug#76307: [PATCH] Add 'project-forget-projects-under-dirs', limit dir selection to relevant dirs
Resent-From: Eshel Yaron <me@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 16 Feb 2025 13:33:02 +0000
Resent-Message-ID: <handler.76307.B76307.173971274614439 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76307
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Ship Mints <shipmints@HIDDEN>
Cc: 76307 <at> debbugs.gnu.org
Received: via spool by 76307-submit <at> debbugs.gnu.org id=B76307.173971274614439
(code B ref 76307); Sun, 16 Feb 2025 13:33:02 +0000
Received: (at 76307) by debbugs.gnu.org; 16 Feb 2025 13:32:26 +0000
Received: from localhost ([127.0.0.1]:32787 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1tjel0-0003kn-5s
for submit <at> debbugs.gnu.org; Sun, 16 Feb 2025 08:32:26 -0500
Received: from mail.eshelyaron.com ([107.175.124.16]:43336 helo=eshelyaron.com)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1tjekv-0003kb-DF
for 76307 <at> debbugs.gnu.org; Sun, 16 Feb 2025 08:32:23 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
s=mail; t=1739712740;
bh=T5yuJgjz4AYz0+5lWHtL6rrXyZhV4OsfgaQ/gDwJe2U=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=qKb+T0s43syQqkeRwgJ7lNb8t+9JLq62VezjuPD4hySabI/xVz6aw7jCKkynHkU8L
Rb91G6+v3VSRp0aCoqJROj8ZnxGkegnOrIIVMP9gplAxmT0z0qfHDbfqKTSNhAQD+o
bNff/U7+LS7unwwkIQ/HfLyfSx2CaaffymCcfDbHEuFXxC53N5zYOLjO6q0CwrXraM
QYjiWRGAxfQR3cKg31Mvsw/BuZfKrEI6wdwJOby6iZOkkZbm19MhxR2IjZ+ZvP706X
pqCbq3ka8+CmoxzQ0zgdN312eC5JpVL4G57CJUr177QgTp1cLcDl8TR6W7EvgFL2y5
OYhflfRhESL9Q==
From: Eshel Yaron <me@HIDDEN>
In-Reply-To: <CAN+1HbpyCkm86RzZZaKMiXCHYGGD7o_CboBxLZmA-3Q=diZEaQ@HIDDEN>
References: <CAN+1Hbqgnc7kaLfXqBV5XbNnSyY2-7ygKFREa4enmLqzStrBjg@HIDDEN>
<m1seofdnkq.fsf@HIDDEN>
<CAN+1HbpGR_=HSszd7xAY7M6zXiZ04aCjAo_VtAVfzZAnL5Wkjg@HIDDEN>
<m1tt8uc12h.fsf@HIDDEN>
<CAN+1HbpyCkm86RzZZaKMiXCHYGGD7o_CboBxLZmA-3Q=diZEaQ@HIDDEN>
Date: Sun, 16 Feb 2025 14:32:18 +0100
Message-ID: <m1y0y6582l.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
Hi,
Ship Mints <shipmints@HIDDEN> writes:
> Not sure the common-prefix list is "flatter" than any other kind of list, but it is convenient when one wants to
> forget projects on a remote host en masse, or in the root of a directory tree that has script-kiddie git repos
> everywhere (one day, they'll all learn that monorepos are the way) and I want to forget everything I've seen
> (for more than one reason!).
I'm confused. You can do those things in the current implementation,
and in my proposal too.
Could you perhaps spell out the benefit of your suggested implementation
for a concrete use case? That might help to clear the confusion.
Thanks,
Eshel
X-Loop: help-debbugs@HIDDEN
Subject: bug#76307: [PATCH] Add 'project-forget-projects-under-dirs', limit dir selection to relevant dirs
Resent-From: Ship Mints <shipmints@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 16 Feb 2025 17:36:01 +0000
Resent-Message-ID: <handler.76307.B76307.173972730423853 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76307
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Eshel Yaron <me@HIDDEN>
Cc: 76307 <at> debbugs.gnu.org
Received: via spool by 76307-submit <at> debbugs.gnu.org id=B76307.173972730423853
(code B ref 76307); Sun, 16 Feb 2025 17:36:01 +0000
Received: (at 76307) by debbugs.gnu.org; 16 Feb 2025 17:35:04 +0000
Received: from localhost ([127.0.0.1]:36878 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1tjiXn-0006Ca-SF
for submit <at> debbugs.gnu.org; Sun, 16 Feb 2025 12:35:04 -0500
Received: from mail-ua1-x929.google.com ([2607:f8b0:4864:20::929]:57689)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
id 1tjiXk-0006Bc-GY
for 76307 <at> debbugs.gnu.org; Sun, 16 Feb 2025 12:35:01 -0500
Received: by mail-ua1-x929.google.com with SMTP id
a1e0cc1a2514c-8671d8a9c3eso2213089241.3
for <76307 <at> debbugs.gnu.org>; Sun, 16 Feb 2025 09:35:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1739727295; x=1740332095; darn=debbugs.gnu.org;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:from:to:cc:subject:date:message-id:reply-to;
bh=ytNRdPJzVrnopO/5P0RUQYSemA+3N3Vv5MOrsSHupyA=;
b=LMuhyVJXhEeH+16FG3KKwm9vCVYT01wsUnqUn24jnqE+KMJC9kM2pLis00fTlo6NGL
76QJ7madWjp5r2E3ZinUrc/XItLFwohcm4El8p0LyNqVk+BhRQdnm8ywcXffPqSsco+Z
LJUclSxZoyIKqQbYSrNAldmkogJANZcIMixBufjWN5XXTHD4YPtaO0u93VhlcTN8HLvG
vp/e/PqEIeVDjBgtI4jOgnl55Wpm0LXfBW9/XTJtmSJjbj1RS5YXbzEdJJPhySx4pthN
snON6mDuB16GNn3MoQxJkghzTeg1MP1iosrmHQiaNPZb8fx+LUJXFRDjVCXZOnVXj9kC
kcOQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1739727295; x=1740332095;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=ytNRdPJzVrnopO/5P0RUQYSemA+3N3Vv5MOrsSHupyA=;
b=NV/+GpIAoqSvv9rtnE9LJDjvB6+PJUcLFC+oU7lAbXztLo16H9TEjd3wkGcsI45LUG
wz/wV9tFdkhgJuru7up4SEyiOJIBV9x+pB5CcPEElvnPnNQ5Dy8YXS+FleMRvSkbd3c7
67QIagB6GCLOUorokJgyAA/3+aVNslkuaYlhBSkPOZatbUw2hoNKtL0/u5rMykDVtWAf
UAu8g7fxn2BhVYGcthUq3uCh97yC+use2j8odmR9/KkRRL7JQqKWOQZWXfa1OzElJL6Q
gTA/Wq/dNDziuO9vP+XOMe22P1T82VcYuzdK9/PK3oXp1FdnLd9uWsNyKt6Bmes9ItGb
+hdg==
X-Gm-Message-State: AOJu0Ywfcgk4dx6m63M1LZNNO9BY6o1SvPU7RpyU9qmVXwUqrmo/EkZr
0VWcHHHBQ5CwoW6wwj8LB9Z8fDBtsp1Ubj720m7rsclYYclhun1iRXvvU4UmCw+nLdGMHszD4P4
9T5MnyvVYnLLTt3/2n6N0d9R23LZKsfbN
X-Gm-Gg: ASbGnctxFg+/fZYSVZDi1MS5MOLr92JP2DrfCsmrTeXLq5r6zyVsgJGDKUC86iR/lFg
KJwSC1/XLSqLZnJneHXSimcGd6xPObN0sdAMad1FHXljWXulqcWVLg4eYXcxEOYtlM+leMi/7
X-Google-Smtp-Source: AGHT+IGmEYBd6b1j5bgZp8SD8qjmNHj9tJneIRrLNkx3WGMp3a5GLRZy93kfcykN1YUwMp+73l5b4RwbBhh+OzFrEOw=
X-Received: by 2002:a05:6102:4b12:b0:4bb:c24b:b61a with SMTP id
ada2fe7eead31-4bd3ff43e7bmr3800995137.19.1739727294805; Sun, 16 Feb 2025
09:34:54 -0800 (PST)
MIME-Version: 1.0
References: <CAN+1Hbqgnc7kaLfXqBV5XbNnSyY2-7ygKFREa4enmLqzStrBjg@HIDDEN>
<m1seofdnkq.fsf@HIDDEN>
<CAN+1HbpGR_=HSszd7xAY7M6zXiZ04aCjAo_VtAVfzZAnL5Wkjg@HIDDEN>
<m1tt8uc12h.fsf@HIDDEN>
<CAN+1HbpyCkm86RzZZaKMiXCHYGGD7o_CboBxLZmA-3Q=diZEaQ@HIDDEN>
<m1y0y6582l.fsf@HIDDEN>
In-Reply-To: <m1y0y6582l.fsf@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Sun, 16 Feb 2025 12:34:43 -0500
X-Gm-Features: AWEUYZmFl6ouFjRWFpGQUCkrVhnq11OmD60hqJ5UOY0TPdRl_AxTLViyX2cLDII
Message-ID: <CAN+1HbqRC3Rh=MCVqfQqovryZXe1+AoMO9Di4LHMdHyAhmmE+g@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000069be6a062e45d3d7"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
--00000000000069be6a062e45d3d7
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
I tried your code to do a side-by-side but:
Debugger entered--Lisp error: (wrong-number-of-arguments
read-directory-name 6)
(read-directory-name prompt nil nil nil nil (let ((ps (mapcar #'(lambda
(p) (expand-file-name ...)) project--list))) #'(lambda (dir) (catch 'ball
(let ((tail ps)) (while tail (let ... ... ...)))))))
In any case, my approach produces all legitimate possibilities a user could
want to clear projects under any common prefix, including "/" (which means
forget everything), common prefixes for remote directories, common roots
for multiple projects at the same level and common roots up the tree for
projects that are in a deeper hierarchy. This is effectively what I think
people would want, and I assume you agree. If your code produces the same
and is more efficient, that's great.
-Stephane
On Sun, Feb 16, 2025 at 8:32=E2=80=AFAM Eshel Yaron <me@HIDDEN> wro=
te:
> Hi,
>
> Ship Mints <shipmints@HIDDEN> writes:
>
> > Not sure the common-prefix list is "flatter" than any other kind of
> list, but it is convenient when one wants to
> > forget projects on a remote host en masse, or in the root of a director=
y
> tree that has script-kiddie git repos
> > everywhere (one day, they'll all learn that monorepos are the way) and =
I
> want to forget everything I've seen
> > (for more than one reason!).
>
> I'm confused. You can do those things in the current implementation,
> and in my proposal too.
>
> Could you perhaps spell out the benefit of your suggested implementation
> for a concrete use case? That might help to clear the confusion.
>
>
> Thanks,
>
> Eshel
>
--00000000000069be6a062e45d3d7
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac=
e">I tried your code to do a side-by-side but:</div><div class=3D"gmail_def=
ault" style=3D"font-family:monospace"><br></div><div class=3D"gmail_default=
" style=3D"font-family:monospace">Debugger entered--Lisp error: (wrong-numb=
er-of-arguments read-directory-name 6)<br>=C2=A0 (read-directory-name promp=
t nil nil nil nil (let ((ps (mapcar #'(lambda (p) (expand-file-name ...=
)) project--list))) #'(lambda (dir) (catch 'ball (let ((tail ps)) (=
while tail (let ... ... ...)))))))<br></div><div class=3D"gmail_default" st=
yle=3D"font-family:monospace"><br></div><div class=3D"gmail_default" style=
=3D"font-family:monospace">In any case, my approach produces all legitimate=
possibilities a user could want to clear projects under any common prefix,=
including "/" (which means forget everything), common prefixes f=
or remote directories, common roots for multiple projects at the same level=
and common roots up the tree for projects that are in a deeper hierarchy.=
=C2=A0 This is effectively what I think people would want, and I assume you=
agree.=C2=A0 If your code produces the same and is more efficient, that=
9;s great.</div><div class=3D"gmail_default" style=3D"font-family:monospace=
"><br></div><div class=3D"gmail_default" style=3D"font-family:monospace">-S=
tephane</div><div class=3D"gmail_default" style=3D"font-family:monospace"><=
br></div><div class=3D"gmail_default" style=3D"font-family:monospace"><br><=
/div></div><br><div class=3D"gmail_quote gmail_quote_container"><div dir=3D=
"ltr" class=3D"gmail_attr">On Sun, Feb 16, 2025 at 8:32=E2=80=AFAM Eshel Ya=
ron <<a href=3D"mailto:me@HIDDEN">me@HIDDEN</a>> wrot=
e:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Ship Mints <<a href=3D"mailto:shipmints@HIDDEN" target=3D"_blank">shi=
pmints@HIDDEN</a>> writes:<br>
<br>
> Not sure the common-prefix list is "flatter" than any other =
kind of list, but it is convenient when one wants to<br>
> forget projects on a remote host en masse, or in the root of a directo=
ry tree that has script-kiddie git repos<br>
> everywhere (one day, they'll all learn that monorepos are the way)=
and I want to forget everything I've seen<br>
> (for more than one reason!).<br>
<br>
I'm confused.=C2=A0 You can do those things in the current implementati=
on,<br>
and in my proposal too.<br>
<br>
Could you perhaps spell out the benefit of your suggested implementation<br=
>
for a concrete use case?=C2=A0 That might help to clear the confusion.<br>
<br>
<br>
Thanks,<br>
<br>
Eshel<br>
</blockquote></div>
--00000000000069be6a062e45d3d7--
X-Loop: help-debbugs@HIDDEN
Subject: bug#76307: [PATCH] Add 'project-forget-projects-under-dirs', limit dir selection to relevant dirs
Resent-From: Eshel Yaron <me@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 16 Feb 2025 18:02:01 +0000
Resent-Message-ID: <handler.76307.B76307.173972888811592 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76307
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Ship Mints <shipmints@HIDDEN>
Cc: 76307 <at> debbugs.gnu.org
Received: via spool by 76307-submit <at> debbugs.gnu.org id=B76307.173972888811592
(code B ref 76307); Sun, 16 Feb 2025 18:02:01 +0000
Received: (at 76307) by debbugs.gnu.org; 16 Feb 2025 18:01:28 +0000
Received: from localhost ([127.0.0.1]:37073 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1tjixL-00030s-On
for submit <at> debbugs.gnu.org; Sun, 16 Feb 2025 13:01:28 -0500
Received: from mail.eshelyaron.com ([107.175.124.16]:49816 helo=eshelyaron.com)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1tjixJ-00030c-EC
for 76307 <at> debbugs.gnu.org; Sun, 16 Feb 2025 13:01:26 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
s=mail; t=1739728884;
bh=SCxkkcBImaCjZFgNtFcCk1OghDcG1ZEwytQoFPV3lv4=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=WCHPYEATZqxfG8Uu5BnTni52FsdaiRN9ibzFc069yrkC+wVdhZHxFsoM1v3llqIoF
/VsbdOOHolNht9aSObuhYfODSdbSNQHAPPUSf52BNNRHZYKIJQXy2N7Z3QI28nUM4E
oDhjVR5F7gS4JYD4Bil00BkGgKkss+Qacrih3B928PpIxGL+XRqx5LyE1syDnP9iok
6+PqZu9Zue+A4i4OufpcFKPXITv9C7fx6aqy/mo7gBCFETA42rfBO1u12a0LaSILVP
Awzrh4VdYXbvUXGM4LkXUvfVzquxWypt01JoJne5bNvYBsIvh13TWO/79ZGokyRLmJ
2dc/07jDVaakg==
From: Eshel Yaron <me@HIDDEN>
In-Reply-To: <CAN+1HbqRC3Rh=MCVqfQqovryZXe1+AoMO9Di4LHMdHyAhmmE+g@HIDDEN>
References: <CAN+1Hbqgnc7kaLfXqBV5XbNnSyY2-7ygKFREa4enmLqzStrBjg@HIDDEN>
<m1seofdnkq.fsf@HIDDEN>
<CAN+1HbpGR_=HSszd7xAY7M6zXiZ04aCjAo_VtAVfzZAnL5Wkjg@HIDDEN>
<m1tt8uc12h.fsf@HIDDEN>
<CAN+1HbpyCkm86RzZZaKMiXCHYGGD7o_CboBxLZmA-3Q=diZEaQ@HIDDEN>
<m1y0y6582l.fsf@HIDDEN>
<CAN+1HbqRC3Rh=MCVqfQqovryZXe1+AoMO9Di4LHMdHyAhmmE+g@HIDDEN>
Date: Sun, 16 Feb 2025 19:01:22 +0100
Message-ID: <m1frkd6a6l.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
Hi,
Ship Mints <shipmints@HIDDEN> writes:
> I tried your code to do a side-by-side but:
>
> Debugger entered--Lisp error: (wrong-number-of-arguments read-directory-name 6)
> (read-directory-name prompt nil nil nil nil (let ((ps (mapcar #'(lambda (p) (expand-file-name ...))
> project--list))) #'(lambda (dir) (catch 'ball (let ((tail ps)) (while tail (let ... ... ...)))))))
Try with a current build from master :)
> In any case, my approach produces all legitimate possibilities a user could want to clear projects under any
> common prefix, including "/" (which means forget everything), common prefixes for remote directories, common
> roots for multiple projects at the same level and common roots up the tree for projects that are in a deeper
> hierarchy. This is effectively what I think people would want, and I assume you agree.
I don't: that's the flat list which I find inappropriate in this case.
Projects may (and do) reside all over the filesystem, so producing all
possible prefixes of one or more project roots amounts to a huge list
with potentially many irrelevant entries. Here I prefer completing the
directory name incrementally, by following the filesystem hierarchy,
with the usual Emacs file/directory name completion.
> If your code produces the same and is more efficient, that's great.
My suggestion basically preserves the current behavior, it just filters
the directories you can complete at each level to only include those
that actually lead to one or more project roots.
Best,
Eshel
X-Loop: help-debbugs@HIDDEN
Subject: bug#76307: [PATCH] Add 'project-forget-projects-under-dirs', limit dir selection to relevant dirs
Resent-From: Eshel Yaron <me@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 16 Feb 2025 18:10:02 +0000
Resent-Message-ID: <handler.76307.B76307.173972936713812 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76307
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Ship Mints <shipmints@HIDDEN>
Cc: 76307 <at> debbugs.gnu.org
Received: via spool by 76307-submit <at> debbugs.gnu.org id=B76307.173972936713812
(code B ref 76307); Sun, 16 Feb 2025 18:10:02 +0000
Received: (at 76307) by debbugs.gnu.org; 16 Feb 2025 18:09:27 +0000
Received: from localhost ([127.0.0.1]:37121 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1tjj54-0003ac-P6
for submit <at> debbugs.gnu.org; Sun, 16 Feb 2025 13:09:27 -0500
Received: from mail.eshelyaron.com ([107.175.124.16]:60436 helo=eshelyaron.com)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1tjj52-0003aP-B9
for 76307 <at> debbugs.gnu.org; Sun, 16 Feb 2025 13:09:25 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
s=mail; t=1739729363;
bh=pdDZZ+xWzlgJCMYxjdaYrP7vXwlAFDGnG6sjkMOL+Tk=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=wsFGTKwv0ul8hH54yXcMr4BNDz1LRn+59+ZeyfbnlIT2tUbzpaX6mfwyKe/oVw+OH
OzkT272uyAXvX8+blutT5cV9xNpRi0zdaW3uhgX/CqVOnHCp3kTdDAu55tSy1EzY1B
utTTZ5BwecFCUoBfe2+Rd0o17n92sRXTVS9s7VeYv6Ya/RmKUhtfP7ni33kSPBHiIj
WD61TIkt9qRrXJDMw4pBZOPxNySxzWYqa9GI4rt/IqctdWItd6zEs+QPbOVhnnYRN1
a3z4y+uQcylODtVDMSEIRqEdu3uACEQdWqwHGr4KHS/Mz7pfRXXFl2wfQh16FIjuFA
xYa2gmG7JRSiw==
From: Eshel Yaron <me@HIDDEN>
In-Reply-To: <m1frkd6a6l.fsf@HIDDEN>
References: <CAN+1Hbqgnc7kaLfXqBV5XbNnSyY2-7ygKFREa4enmLqzStrBjg@HIDDEN>
<m1seofdnkq.fsf@HIDDEN>
<CAN+1HbpGR_=HSszd7xAY7M6zXiZ04aCjAo_VtAVfzZAnL5Wkjg@HIDDEN>
<m1tt8uc12h.fsf@HIDDEN>
<CAN+1HbpyCkm86RzZZaKMiXCHYGGD7o_CboBxLZmA-3Q=diZEaQ@HIDDEN>
<m1y0y6582l.fsf@HIDDEN>
<CAN+1HbqRC3Rh=MCVqfQqovryZXe1+AoMO9Di4LHMdHyAhmmE+g@HIDDEN>
<m1frkd6a6l.fsf@HIDDEN>
Date: Sun, 16 Feb 2025 19:09:21 +0100
Message-ID: <m17c5p69ta.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
Eshel Yaron <me@HIDDEN> writes:
> Hi,
>
> Ship Mints <shipmints@HIDDEN> writes:
>
>> I tried your code to do a side-by-side but:
>>
>> Debugger entered--Lisp error: (wrong-number-of-arguments read-directory-name 6)
>> (read-directory-name prompt nil nil nil nil (let ((ps (mapcar #'(lambda (p) (expand-file-name ...))
>> project--list))) #'(lambda (dir) (catch 'ball (let ((tail ps)) (while tail (let ... ... ...)))))))
>
> Try with a current build from master :)
>
>> In any case, my approach produces all legitimate possibilities a user could want to clear projects under any
>> common prefix, including "/" (which means forget everything), common prefixes for remote directories, common
>> roots for multiple projects at the same level and common roots up the tree for projects that are in a deeper
>> hierarchy. This is effectively what I think people would want, and I assume you agree.
>
> I don't: that's the flat list which I find inappropriate in this case.
> Projects may (and do) reside all over the filesystem, so producing all
> possible prefixes of one or more project roots amounts to a huge list
> with potentially many irrelevant entries. Here I prefer completing the
> directory name incrementally, by following the filesystem hierarchy,
> with the usual Emacs file/directory name completion.
>
>> If your code produces the same and is more efficient, that's great.
>
> My suggestion basically preserves the current behavior, it just filters
> the directories you can complete at each level to only include those
> that actually lead to one or more project roots.
BTW, here's a slightly improved project-read-ancestor-directory, it uses
try-completion to check if a candidate directory is a prefix of any
project root, which seems to be faster than the Lisp implementation I
tried at first:
--8<---------------cut here---------------start------------->8---
(defun project-read-ancestor-directory (prompt)
"Prompt with PROMPT for an ancestor directory of one or more project roots."
(project--ensure-read-project-list)
(read-directory-name
prompt nil nil nil nil
(let ((ps (mapcar (lambda (p) (expand-file-name (car p))) project--list)))
(lambda (dir) (try-completion (expand-file-name dir) ps)))))
--8<---------------cut here---------------end--------------->8---
X-Loop: help-debbugs@HIDDEN
Subject: bug#76307: [PATCH] Add 'project-forget-projects-under-dirs', limit dir selection to relevant dirs
Resent-From: Ship Mints <shipmints@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 16 Feb 2025 19:42:02 +0000
Resent-Message-ID: <handler.76307.B76307.17397348749515 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76307
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Eshel Yaron <me@HIDDEN>
Cc: 76307 <at> debbugs.gnu.org
Received: via spool by 76307-submit <at> debbugs.gnu.org id=B76307.17397348749515
(code B ref 76307); Sun, 16 Feb 2025 19:42:02 +0000
Received: (at 76307) by debbugs.gnu.org; 16 Feb 2025 19:41:14 +0000
Received: from localhost ([127.0.0.1]:37667 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1tjkVu-0002TM-4w
for submit <at> debbugs.gnu.org; Sun, 16 Feb 2025 14:41:14 -0500
Received: from mail-ua1-x92b.google.com ([2607:f8b0:4864:20::92b]:56714)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
id 1tjkVr-0002St-0Z
for 76307 <at> debbugs.gnu.org; Sun, 16 Feb 2025 14:41:11 -0500
Received: by mail-ua1-x92b.google.com with SMTP id
a1e0cc1a2514c-868e368ec74so2405332241.1
for <76307 <at> debbugs.gnu.org>; Sun, 16 Feb 2025 11:41:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1739734865; x=1740339665; darn=debbugs.gnu.org;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:from:to:cc:subject:date:message-id:reply-to;
bh=sDynLgdSQe965DwnMOEDlrDNQXtsHL2CBUu/WmQyEVs=;
b=aVNME+F7XmaLOgsBf0bYafpQYrIuueD4KK1PpBGWe4+jbDEPUYvl05sx01WBPPj20d
iFCrGNipvy86f5AsiNanIVNftkijnc6okILi0ZKsZQ2I0+4T90HuOn8A4bK8a27p1bXH
8euSxx0sBwFfFrnpH160QvOO6xAfN3OaXkg2kjb+I6Iv1XpqyWRO4Uo1Pg/wcWr2+RnK
9oVjo++tHbxbxIai0v71OSpfa3NzQ2xroTGh3vY5Tc+JfTkUt7NGDIUJgZIKeJwAl9Vd
O2PWEGiA6MhsuZRszP8Oc1mKDZ835UdwHErnRvKMiAJoJx5DUjETYIiPjnSh5LbKL7L/
6fdg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1739734865; x=1740339665;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=sDynLgdSQe965DwnMOEDlrDNQXtsHL2CBUu/WmQyEVs=;
b=XqgmtavcZmzVgH3zGimJWkx2FFpspkznjoNLfDlsfArAqLamSdzryheyZb6fFAfLeN
9iKHNTna0Lohz9APngy9rWKFru72gYdMw9OGY+k/DXmJYP8Z5xkZHo/iQe2LobEEH+93
EY5R37N46bTw6vZEgIh5BhOTrDnziq1HOb2Tat4WbYO7O+gT5+2oSDghG4qDKqnzJVW7
1DNbVC7uIguAeggE3jHOmNfLeclbfkKiHwt3my/w58lVRXNR0DeqT0o+zDIzrXQCWA7L
RVcc0SOODWHKLpI+YECEPyy7uL2P8LsG/qvKibec1Q0PgZq3dWy+WJlwlzhlbbsUMF+a
2qrA==
X-Gm-Message-State: AOJu0Yy/5epx6xwN+5AIJA9s1aJv9SkYx4JZ5+LU1f09eQ7+aNHYoNd9
K4NWqd0RPpxUIv8wnxxjKYMDS8wuEIImnyXKp+SE3VwZd3PihdM6UHwOcUFd8Y+JwbofL3rpxIe
6M2REtdPY0WjJXNwyIG2sQjxs3Vw7CA==
X-Gm-Gg: ASbGncvcTFomm4GwqpMYyy7BzLjVBErZOpQvfV+9aSrjf4+aYJVrX0VD/TgQranTCAF
oROvFeib6h/vy0BHRmSmNSB2igKDmzSZgDa19mxM6jHc3cRcuxMTV80Lj3+IvGPYGUSg0p0dm
X-Google-Smtp-Source: AGHT+IGBPKAeSj6sR8I1FzPOat329zXhplw+doEgcjr8CZC+RystQu6v4IkLW6uY4//tKvRBZ1JnFfQVrN7O1Vu70gg=
X-Received: by 2002:a05:6102:2c82:b0:4bb:eb4a:f9f0 with SMTP id
ada2fe7eead31-4bd3ffab7f1mr4336439137.24.1739734865247; Sun, 16 Feb 2025
11:41:05 -0800 (PST)
MIME-Version: 1.0
References: <CAN+1Hbqgnc7kaLfXqBV5XbNnSyY2-7ygKFREa4enmLqzStrBjg@HIDDEN>
<m1seofdnkq.fsf@HIDDEN>
<CAN+1HbpGR_=HSszd7xAY7M6zXiZ04aCjAo_VtAVfzZAnL5Wkjg@HIDDEN>
<m1tt8uc12h.fsf@HIDDEN>
<CAN+1HbpyCkm86RzZZaKMiXCHYGGD7o_CboBxLZmA-3Q=diZEaQ@HIDDEN>
<m1y0y6582l.fsf@HIDDEN>
<CAN+1HbqRC3Rh=MCVqfQqovryZXe1+AoMO9Di4LHMdHyAhmmE+g@HIDDEN>
<m1frkd6a6l.fsf@HIDDEN> <m17c5p69ta.fsf@HIDDEN>
In-Reply-To: <m17c5p69ta.fsf@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Sun, 16 Feb 2025 14:40:54 -0500
X-Gm-Features: AWEUYZlAdTCKuxnLURkz6dG1nKebqBQ2sxG9HuWWV9MYhKNRNdolg0xySc48eGc
Message-ID: <CAN+1HbpmiuhnTt-_8aKPD4DNhjvHpZgYFDKXeNT8OW_yF12yjQ@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000a58388062e47968b"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
--000000000000a58388062e47968b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Perhaps we're using different completion tools. A more expansive list
doesn't bother me.
Let's see what Dmitry and Juri have to add.
On Sun, Feb 16, 2025 at 1:09=E2=80=AFPM Eshel Yaron <me@HIDDEN> wro=
te:
> Eshel Yaron <me@HIDDEN> writes:
>
> > Hi,
> >
> > Ship Mints <shipmints@HIDDEN> writes:
> >
> >> I tried your code to do a side-by-side but:
> >>
> >> Debugger entered--Lisp error: (wrong-number-of-arguments
> read-directory-name 6)
> >> (read-directory-name prompt nil nil nil nil (let ((ps (mapcar
> #'(lambda (p) (expand-file-name ...))
> >> project--list))) #'(lambda (dir) (catch 'ball (let ((tail ps)) (while
> tail (let ... ... ...)))))))
> >
> > Try with a current build from master :)
> >
> >> In any case, my approach produces all legitimate possibilities a user
> could want to clear projects under any
> >> common prefix, including "/" (which means forget everything), common
> prefixes for remote directories, common
> >> roots for multiple projects at the same level and common roots up the
> tree for projects that are in a deeper
> >> hierarchy. This is effectively what I think people would want, and I
> assume you agree.
> >
> > I don't: that's the flat list which I find inappropriate in this case.
> > Projects may (and do) reside all over the filesystem, so producing all
> > possible prefixes of one or more project roots amounts to a huge list
> > with potentially many irrelevant entries. Here I prefer completing the
> > directory name incrementally, by following the filesystem hierarchy,
> > with the usual Emacs file/directory name completion.
> >
> >> If your code produces the same and is more efficient, that's great.
> >
> > My suggestion basically preserves the current behavior, it just filters
> > the directories you can complete at each level to only include those
> > that actually lead to one or more project roots.
>
>
> BTW, here's a slightly improved project-read-ancestor-directory, it uses
> try-completion to check if a candidate directory is a prefix of any
> project root, which seems to be faster than the Lisp implementation I
> tried at first:
>
> --8<---------------cut here---------------start------------->8---
> (defun project-read-ancestor-directory (prompt)
> "Prompt with PROMPT for an ancestor directory of one or more project
> roots."
> (project--ensure-read-project-list)
> (read-directory-name
> prompt nil nil nil nil
> (let ((ps (mapcar (lambda (p) (expand-file-name (car p)))
> project--list)))
> (lambda (dir) (try-completion (expand-file-name dir) ps)))))
> --8<---------------cut here---------------end--------------->8---
>
--000000000000a58388062e47968b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac=
e">Perhaps we're using different completion tools.=C2=A0 A more expansi=
ve list doesn't bother me.</div><div class=3D"gmail_default" style=3D"f=
ont-family:monospace"><br></div><div class=3D"gmail_default" style=3D"font-=
family:monospace">Let's see what Dmitry and Juri have to add.</div></di=
v><br><div class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" cla=
ss=3D"gmail_attr">On Sun, Feb 16, 2025 at 1:09=E2=80=AFPM Eshel Yaron <<=
a href=3D"mailto:me@HIDDEN">me@HIDDEN</a>> wrote:<br></d=
iv><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bord=
er-left:1px solid rgb(204,204,204);padding-left:1ex">Eshel Yaron <<a hre=
f=3D"mailto:me@HIDDEN" target=3D"_blank">me@HIDDEN</a>> =
writes:<br>
<br>
> Hi,<br>
><br>
> Ship Mints <<a href=3D"mailto:shipmints@HIDDEN" target=3D"_blank=
">shipmints@HIDDEN</a>> writes:<br>
><br>
>> I tried your code to do a side-by-side but:<br>
>><br>
>> Debugger entered--Lisp error: (wrong-number-of-arguments read-dire=
ctory-name 6)<br>
>>=C2=A0 =C2=A0(read-directory-name prompt nil nil nil nil (let ((ps =
(mapcar #'(lambda (p) (expand-file-name ...))<br>
>> project--list))) #'(lambda (dir) (catch 'ball (let ((tail =
ps)) (while tail (let ... ... ...)))))))<br>
><br>
> Try with a current build from master :)<br>
><br>
>> In any case, my approach produces all legitimate possibilities a u=
ser could want to clear projects under any<br>
>> common prefix, including "/" (which means forget everyth=
ing), common prefixes for remote directories, common<br>
>> roots for multiple projects at the same level and common roots up =
the tree for projects that are in a deeper<br>
>> hierarchy.=C2=A0 This is effectively what I think people would wan=
t, and I assume you agree.<br>
><br>
> I don't: that's the flat list which I find inappropriate in th=
is case.<br>
> Projects may (and do) reside all over the filesystem, so producing all=
<br>
> possible prefixes of one or more project roots amounts to a huge list<=
br>
> with potentially many irrelevant entries.=C2=A0 Here I prefer completi=
ng the<br>
> directory name incrementally, by following the filesystem hierarchy,<b=
r>
> with the usual Emacs file/directory name completion.<br>
><br>
>> If your code produces the same and is more efficient, that's g=
reat.<br>
><br>
> My suggestion basically preserves the current behavior, it just filter=
s<br>
> the directories you can complete at each level to only include those<b=
r>
> that actually lead to one or more project roots.<br>
<br>
<br>
BTW, here's a slightly improved project-read-ancestor-directory, it use=
s<br>
try-completion to check if a candidate directory is a prefix of any<br>
project root, which seems to be faster than the Lisp implementation I<br>
tried at first:<br>
<br>
--8<---------------cut here---------------start------------->8---<br>
(defun project-read-ancestor-directory (prompt)<br>
=C2=A0 "Prompt with PROMPT for an ancestor directory of one or more pr=
oject roots."<br>
=C2=A0 (project--ensure-read-project-list)<br>
=C2=A0 (read-directory-name<br>
=C2=A0 =C2=A0prompt nil nil nil nil<br>
=C2=A0 =C2=A0(let ((ps (mapcar (lambda (p) (expand-file-name (car p))) proj=
ect--list)))<br>
=C2=A0 =C2=A0 =C2=A0(lambda (dir) (try-completion (expand-file-name dir) ps=
)))))<br>
--8<---------------cut here---------------end--------------->8---<br>
</blockquote></div>
--000000000000a58388062e47968b--
X-Loop: help-debbugs@HIDDEN
Subject: bug#76307: [PATCH] Add 'project-forget-projects-under-dirs', limit dir selection to relevant dirs
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 18 Feb 2025 02:55:01 +0000
Resent-Message-ID: <handler.76307.B76307.173984729526096 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76307
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Ship Mints <shipmints@HIDDEN>, 76307 <at> debbugs.gnu.org
Received: via spool by 76307-submit <at> debbugs.gnu.org id=B76307.173984729526096
(code B ref 76307); Tue, 18 Feb 2025 02:55:01 +0000
Received: (at 76307) by debbugs.gnu.org; 18 Feb 2025 02:54:55 +0000
Received: from localhost ([127.0.0.1]:52282 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1tkDl8-0006mq-U3
for submit <at> debbugs.gnu.org; Mon, 17 Feb 2025 21:54:55 -0500
Received: from fhigh-b8-smtp.messagingengine.com ([202.12.124.159]:45875)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1tkDl6-0006mR-2N
for 76307 <at> debbugs.gnu.org; Mon, 17 Feb 2025 21:54:52 -0500
Received: from phl-compute-04.internal (phl-compute-04.phl.internal
[10.202.2.44])
by mailfhigh.stl.internal (Postfix) with ESMTP id 7ED3525400DE;
Mon, 17 Feb 2025 21:54:46 -0500 (EST)
Received: from phl-mailfrontend-02 ([10.202.2.163])
by phl-compute-04.internal (MEProxy); Mon, 17 Feb 2025 21:54:46 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
:content-transfer-encoding:content-type:content-type:date:date
:from:from:in-reply-to:in-reply-to:message-id:mime-version
:references:reply-to:subject:subject:to:to; s=fm2; t=1739847286;
x=1739933686; bh=uH9XHzDSzkYZrongmKpmKQf6BpvgQvFvZNMTE6oiGyA=; b=
OOborxr5U4jRRDJ9UUMgHm1LUmWgpQOy3UfjuVNhMdcr/TlaTe9DMPAz6jvtrLAT
AT5OjYkUlL1Vmmfv6IZRS+A1YB8t0SrN5737ZgjrFQccDdepC7C/TeL+V3Jhi1Pj
EFC1ynUMII53nAf53uEdePxiBIZsq2uCOfFEtyeu+aGZDv+bfKfYfho7zfBLEU3Y
5iQNyGbwsivj7M7HOTkJJgngc2lr6CgFYldfMGlfCdWJ2x6vUhXKZb39jeqEn5bG
DgV7rBPMXBYTzt7lpu4jrKjmUILJpam79noHh8lKeLEQ7NQvPP8PZCL4nbaxBJ9f
bAp74lDhGJxqnO2M5EB/ig==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
messagingengine.com; h=cc:content-transfer-encoding:content-type
:content-type:date:date:feedback-id:feedback-id:from:from
:in-reply-to:in-reply-to:message-id:mime-version:references
:reply-to:subject:subject:to:to:x-me-proxy:x-me-sender
:x-me-sender:x-sasl-enc; s=fm3; t=1739847286; x=1739933686; bh=u
H9XHzDSzkYZrongmKpmKQf6BpvgQvFvZNMTE6oiGyA=; b=CNLRBkeEabpbkg+HX
2M8To3jeJvA8x0uSUD+NpEZ4bYgwplaAH6+xVn3cq+N3yKxVWpCjaOKJP4zs30Uh
ZszfnI4Xu1EOi6gMpg5H5E2GR+JoTBehOpVl70r158M0MHJAprKnEyTJWnXgVyk5
vF3rFz1K6dc2XK8pZTbmBbuUTq2WsTJPBWcWJp9d1NySlUBddt8pxQk3hiZ/OFSe
PZ/u62Zcu7pcmQnxwbTtgVrWsndHF4kbeoNLrZFPoHC/++o2iEO/wd4WQdmnCJsu
EsutDgE3Tz+R3Mzgov18UGCZ6+IDS11lfGfc+OZYQBlJSZSbR390OAqldu90tMW3
C8GUA==
X-ME-Sender: <xms:dvazZ966usP5mxf8wg7ynsN81_sPT0YHjdrVQ7RmyMwhQIV8OYBImQ>
<xme:dvazZ64gAyusS10OFwgaK7DiP9Ntv0O61IySX4Jve5SaA9T1-SUZ7lsLQ-yvqs3pN
FlGraK2f0SCZtemND8>
X-ME-Received: <xmr:dvazZ0eWeRujYSWqK2W8UIKkm2jbvpITVi3IKHO6vLOaxnRssI6E3uF67pn2Mu_QlTg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeitdduhecutefuodetggdotefrod
ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp
uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg
hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtvdej
necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug
gvvheqnecuggftrfgrthhtvghrnhepgeeugeetffduvdejvedvleeliedtfedtudfhfeef
ffejudekveejvdeffffgveegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe
hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho
pedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehshhhiphhmihhnthhssehgmh
grihhlrdgtohhmpdhrtghpthhtohepjeeifedtjeesuggvsggsuhhgshdrghhnuhdrohhr
gh
X-ME-Proxy: <xmx:dvazZ2IyIFDqHVi8FzIPWT26oZ-mALFs91kGsdQM-dtzheeBRG_q1g>
<xmx:dvazZxJElbVoeVWkQ4n_vQeKcBQdhqrin1Cwb0wO3FHiNMtvSy7GBw>
<xmx:dvazZ_zDNElbgRQorGDS0D4r99rax_h-HAnHTL9QbkKexG7zDjAPZw>
<xmx:dvazZ9JreTqdy6Coh80yxqtRiDDsGzy3egZafZh-jWazXLrQ05i8VQ>
<xmx:dvazZ4UB6t7A3pckkCsEMK8eP1J4hh4RmrAyGE6trdVKtJY00v7W05ZU>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
17 Feb 2025 21:54:45 -0500 (EST)
Message-ID: <3a3d227e-95e6-47fb-af05-e2819ed0abfd@HIDDEN>
Date: Tue, 18 Feb 2025 04:54:43 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
References: <CAN+1Hbqgnc7kaLfXqBV5XbNnSyY2-7ygKFREa4enmLqzStrBjg@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <CAN+1Hbqgnc7kaLfXqBV5XbNnSyY2-7ygKFREa4enmLqzStrBjg@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
Hi!
On 15/02/2025 19:50, Ship Mints wrote:
> *** Improved directory selection in 'project-forget-projects-under'.
>
> This command now prompts using a directory list limited to those in the
> remembered project list. Previously, it would prompt using general
> directories from the file system.
>
> I hope this isn't controversial...it made limited sense to me that the
> prompt candidates had no relationship to remembered projects.
This is interesting. I'm not sure that we should reuse the same helper
(project--file-completion-table) or the category, but reading from a
more limited list seems like a good idea.
> *** New command 'project-forget-projects-under-dirs'.
>
> This command prompts for multiple directories under which to forget
> remembered projects. The candidate directory list is limited to those
> in the remembered project list.
This last one might be overkill. How often would one have to "forget
project dirs" for us to make sense to optimize this scenario, rather
than simply have them call the command multiple times?
X-Loop: help-debbugs@HIDDEN
Subject: bug#76307: [PATCH] Add 'project-forget-projects-under-dirs', limit dir selection to relevant dirs
Resent-From: Dmitry Gutov <dmitry@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 18 Feb 2025 03:10:02 +0000
Resent-Message-ID: <handler.76307.B76307.173984819630698 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76307
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Eshel Yaron <me@HIDDEN>, Ship Mints <shipmints@HIDDEN>
Cc: 76307 <at> debbugs.gnu.org
Received: via spool by 76307-submit <at> debbugs.gnu.org id=B76307.173984819630698
(code B ref 76307); Tue, 18 Feb 2025 03:10:02 +0000
Received: (at 76307) by debbugs.gnu.org; 18 Feb 2025 03:09:56 +0000
Received: from localhost ([127.0.0.1]:52370 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1tkDzg-0007z2-2o
for submit <at> debbugs.gnu.org; Mon, 17 Feb 2025 22:09:56 -0500
Received: from fhigh-b8-smtp.messagingengine.com ([202.12.124.159]:33649)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1tkDzb-0007yY-Sj
for 76307 <at> debbugs.gnu.org; Mon, 17 Feb 2025 22:09:54 -0500
Received: from phl-compute-04.internal (phl-compute-04.phl.internal
[10.202.2.44])
by mailfhigh.stl.internal (Postfix) with ESMTP id 54EBC25400D8;
Mon, 17 Feb 2025 22:09:45 -0500 (EST)
Received: from phl-mailfrontend-02 ([10.202.2.163])
by phl-compute-04.internal (MEProxy); Mon, 17 Feb 2025 22:09:45 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
:cc:content-transfer-encoding:content-type:content-type:date
:date:from:from:in-reply-to:in-reply-to:message-id:mime-version
:references:reply-to:subject:subject:to:to; s=fm2; t=1739848185;
x=1739934585; bh=/r5YLYqXCPVau75/gCYpD7giw4Th3Lu9bFletHMNK3A=; b=
MZidKOSlOq7B5nCqzGejZTfIOCGOudd72AInzs/Qy9NX3yCP8kIAskRmTXpB91sB
I7sgOfLSgTVjlKVHOCHyHGKr2Xcn8IEo4HNFOQE7UGg/VLtExXXkYsctQFU+m3Uw
mMKp9wGk8V7VMxiiXYhtvHHWXyftK18X5y58DgPy5TlDAGFvpas+Tc1jrIBQ9bTx
Yd7v7Vxxxdjkk0hBKxzpUlLBVqT83xAgfFN9sZe2hoEDT+yAs5qcUkpySovjSRQS
Surk4Fgs2RJ5Wwkd/drBG9i6GN8SAGZyA4s4SXqcSnd7Bmdd9qYbz+yB3LJ80TBw
UH170/YUXi5qlkjSF5v2LA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
messagingengine.com; h=cc:cc:content-transfer-encoding
:content-type:content-type:date:date:feedback-id:feedback-id
:from:from:in-reply-to:in-reply-to:message-id:mime-version
:references:reply-to:subject:subject:to:to:x-me-proxy
:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739848185; x=
1739934585; bh=/r5YLYqXCPVau75/gCYpD7giw4Th3Lu9bFletHMNK3A=; b=K
6dWhEYRdV7a1zDs4DeKoKXmHZiAq9yn2K9UoGsDh6Py9lVvu460oTnytQHrLtgAy
8vtQqsAW7mL5dTbBYUQx2JO5IkJQSn8Q2rfL97E9WBfQ7kPtQBOo4Qg/tCSpR2pf
HPpxPjk4C/7cYg8w3jeU/yL8oV37qpM6LfKJ9xLR1MSQpejcrrAHOHom0uP2UEiE
r4cfVEZ2zP1sCj3VPAunNFYNMAre0PJBfKtpB6SWE3UYzcQIe3A3wl2TWpG5JpWH
fLIxM5lXiqFMb0OSg0wmHyhIuGwaV4glvFOjtk436zsKZMXcsZ72e62KHZb2DFnK
0Per/x3Cb4oWgoKK54/6g==
X-ME-Sender: <xms:-PmzZ--QQZllAI9nENWXG7JZjt4JIoaSx2XIEKs61knjeemsJiAhGQ>
<xme:-PmzZ-uLa09VH2s1yqqSmD0pHksrubMJi0uSJHGPL1x5cI57LsO-ftQP8FIg-es1-
Fgi9tQVuJT7JoycFBg>
X-ME-Received: <xmr:-PmzZ0ANhC74sdzUit1n9EHjK62vsLIzEd1YNwG6tuuJrmhtxfa9BJENZsSQ4C8lPAs>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeitddukecutefuodetggdotefrod
ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp
uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg
hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddv
jeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrd
guvghvqeenucggtffrrghtthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeu
fedtvddtveefhfdvveegudejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh
epmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthht
ohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepmhgvsegvshhhvghlhigrrh
honhdrtghomhdprhgtphhtthhopehshhhiphhmihhnthhssehgmhgrihhlrdgtohhmpdhr
tghpthhtohepjeeifedtjeesuggvsggsuhhgshdrghhnuhdrohhrgh
X-ME-Proxy: <xmx:-PmzZ2eQBG516LHbDQoupiV_xZRo-i1AsC9wKAs-aavCraZjedkhcg>
<xmx:-PmzZzPK5Z6-qt4FbnCrNUQ12mam3TApzzHq3uHLmVAPV9JXNkzuBw>
<xmx:-PmzZwmGaz0YZ6vQgxrvNvLkPaKc46sJb0B5J4I8k0GCgxQa9Joaxg>
<xmx:-PmzZ1u5HZKf0gpFJ38XittqKRj-0ZyYyP3CKAofIz16ZzdjUSVP1A>
<xmx:-fmzZ8pDEY-B4lHNRqmJKMEm6mbx0R-0Unj4_WF5YqiaVwvo0esifp22>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
17 Feb 2025 22:09:43 -0500 (EST)
Message-ID: <f84017dd-d035-49ea-b180-f91d74fe7007@HIDDEN>
Date: Tue, 18 Feb 2025 05:09:41 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
References: <CAN+1Hbqgnc7kaLfXqBV5XbNnSyY2-7ygKFREa4enmLqzStrBjg@HIDDEN>
<m1seofdnkq.fsf@HIDDEN>
<CAN+1HbpGR_=HSszd7xAY7M6zXiZ04aCjAo_VtAVfzZAnL5Wkjg@HIDDEN>
<m1tt8uc12h.fsf@HIDDEN>
<CAN+1HbpyCkm86RzZZaKMiXCHYGGD7o_CboBxLZmA-3Q=diZEaQ@HIDDEN>
<m1y0y6582l.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <m1y0y6582l.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
On 16/02/2025 15:32, Eshel Yaron via Bug reports for GNU Emacs, the
Swiss army knife of text editors wrote:
>> Not sure the common-prefix list is "flatter" than any other kind of list, but it is convenient when one wants to
>> forget projects on a remote host en masse, or in the root of a directory tree that has script-kiddie git repos
>> everywhere (one day, they'll all learn that monorepos are the way) and I want to forget everything I've seen
>> (for more than one reason!).
> I'm confused. You can do those things in the current implementation,
> and in my proposal too.
>
> Could you perhaps spell out the benefit of your suggested implementation
> for a concrete use case? That might help to clear the confusion.
ISTM the proposal aims at allowing to easily choose a directory at a
remote host, for example. The current read-directory-name UI makes that
not too trivial.
Received: (at control) by debbugs.gnu.org; 23 Feb 2025 00:01:00 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 22 19:01:00 2025 Received: from localhost ([127.0.0.1]:57865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tlzQZ-0007py-Ot for submit <at> debbugs.gnu.org; Sat, 22 Feb 2025 19:01:00 -0500 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:50336) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1tlzQX-0007YR-3T for control <at> debbugs.gnu.org; Sat, 22 Feb 2025 19:00:57 -0500 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5e04064af07so4538192a12.0 for <control <at> debbugs.gnu.org>; Sat, 22 Feb 2025 16:00:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740268851; x=1740873651; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=lQEPrBEdLl55+8VHAdDGIyMJMttcJCG51asQc7xrspk=; b=SLUTubwqLmgjN9dmiPv1HruUgYwqdMkowioVdysM60CpJTT1VOPHkPvyMw4v5QVhUQ CcM+ARNilGnV1LXV4iycdmeFSa+TmuYsEg7NPbMla0tmvdRKeGLCIxPmkGz5sRAEK06C q+zEYs9qrL+qMyXMAgHd/GSESvIaw3p2eNw9JIGxlwY5nCDSLbWRdSPaZt8Q8xnTQJgR WDtNR+g/kzi7tyfUI27prgEBwEuVjK0HyHBBT9ALH0SGm6K5FUwyLe7QXpRsQZY6QOxG 4ynJg3GcbdeXo/2LOh+ddwWM9Dg/RSFULPkQMPmi82cU0Y+y8rRQ/PeI80PoGfxoMHb9 7Dew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740268851; x=1740873651; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=lQEPrBEdLl55+8VHAdDGIyMJMttcJCG51asQc7xrspk=; b=Nm+74axSTTJPGE6gTP/HrsU+KfYH2VIPE/AfvCeLZqU7suU9p4OENnJVK4JhfB6syr U1YbMBk7tenVLocSeB0cih4pgW690kD9OBdYzGGK9AI9/W8OA/+0W8/2B+zLuaLGHvAQ Ql4GzDrVLHwOWfjTkeSOQ5n/1Wyodk8HB6Dx9+42ehHnX5dgFnyj1gloLCXRip1oYTd1 IsciSa6YyhiX/SkbeiGlRJVZVuGxqg89ANBCa3Wsj70dMKgIOSKYpwr48joTwEZDF1np 32E8/Qxfi2lYlXoY528Rf2cair1AbNn/3Hh5p5LrZCrc7DFj/BBnMp9sZxv8Sa2MlnaX HV7Q== X-Gm-Message-State: AOJu0Yw9lF53AQYXgjYxdnQr4YV07TmerPTyPLe8DdXS9wiatPZYG3dd j0k6bTE+ur771K3Y3Ult/1m0rIDy+ntHUL2dQ6TCXxgJnxN+bBc/F2zpmZ3BdaoY5dc1eQMm2zc TcB8uYa0qrOrPtdCoUca/iOu2CO+UibTovdQ= X-Gm-Gg: ASbGnctcliQxKTAo4bLwFacin2shFwwfAcw8FDMl+vcpKBRrWI2aQatb+hab8Sm9c1J qMI6IHZDryVEaGOrBJ2yoB47v4VEyNTM2GF06jZ0S0w8XktZBmc2t9ojx2D+xDDhU1bcNrm/ZgB eaMyGKn+94 X-Google-Smtp-Source: AGHT+IHiY0Xcmv0BU4Nzwir8Pnx+T6sGKq5mxc3UTRyTuCqc/cp58v2aw02VrWuuxi66I4fsF/1fT6NaOTBOKxDc3qc= X-Received: by 2002:a05:6402:40cd:b0:5de:3c29:e82e with SMTP id 4fb4d7f45d1cf-5e0b710bd19mr8988903a12.18.1740268850985; Sat, 22 Feb 2025 16:00:50 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 23 Feb 2025 00:00:50 +0000 From: Stefan Kangas <stefankangas@HIDDEN> MIME-Version: 1.0 Date: Sun, 23 Feb 2025 00:00:50 +0000 X-Gm-Features: AWEUYZlvqXmGYaHFQfP1Ri7Z9R9GlSdudvN0sGEwyH262klKIH40iF5h4GsEkAo Message-ID: <CADwFkm=sNuwfoRk+Z2a98W+zmVYNxtLnTBUpDGWU9xPP0mR7KA@HIDDEN> Subject: control message for bug #76307 To: control <at> debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) severity 76307 wishlist quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.