From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: [External] : Re: Q: Is there a built-in way to read multiple file names? Date: Mon, 15 Jul 2024 19:44:11 +0000 Message-ID: References: <875xthfyz3.fsf@localhost> <87a5it6vr6.fsf@localhost> <86r0c5196r.fsf@gnu.org> <877cdx6ryu.fsf@localhost> <86o77914sh.fsf@gnu.org> <874j916qlv.fsf@localhost> <86ikxh13yc.fsf@gnu.org> <87wmlppf7e.fsf@localhost> <875xt8jgho.fsf@localhost> <87o76yiivc.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20289"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , "mardani29@yahoo.es" , "emacs-devel@gnu.org" To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 15 21:45:09 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sTRdE-00052q-Fm for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Jul 2024 21:45:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTRcV-0007XX-Kx; Mon, 15 Jul 2024 15:44:23 -0400 Original-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 ) id 1sTRcU-0007XL-9v for emacs-devel@gnu.org; Mon, 15 Jul 2024 15:44:22 -0400 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sTRcS-0004ov-38; Mon, 15 Jul 2024 15:44:21 -0400 Original-Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46FENp6l020580; Mon, 15 Jul 2024 19:44:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; s= corp-2023-11-20; bh=jhoMCcTOVOh6S6o3eeVAwwXQIZ5HW0LpN1wQjvuLD38=; b= aO0FAzErEzdAW0mbpnOz88TGozOzFX4Ck3JJ7dAZwW+5CmoTMrzcV5e5kSLsMSU3 UFQ3pIcPtKIoBp9xRFE8fMelMr/N7X6tyxS2pDY0xVuum1JUx2oMyR04aVdqzbKf yMcI73tIWAeXqHd2qcPMJ7fzs1WxBPUFzyDS8hCArDafKLkNZYkX9ddOVhMMREf7 zI0/ZtfRXqqs8Ph7BTZLZ2f3BY4e3qGdkWRcTOczR/N0gQh/9CPFctSpw4jz6/tn ODMvC/xYeqohYh9XH5obdTxhQahhtefKGX/rQQ+ovz4mqoMAXHbCC5YGsfqK4F53 eJdSSsFsxA36c4JrUttbIw== Original-Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 40bhf9bua4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Jul 2024 19:44:15 +0000 (GMT) Original-Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 46FI2Epf023622; Mon, 15 Jul 2024 19:44:13 GMT Original-Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2041.outbound.protection.outlook.com [104.47.56.41]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 40bg1en1cv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Jul 2024 19:44:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kMh0XU2WFwB8jM8sgq1j2uawRBnAHdv1Ow1mJFTaqkFnuFsZ6vfnIPneSAjK33Vk1eSWrnDIkOpthtHjr2lj8JWOYs7gHqZtetBPwPj3yvjxhVd8iYSwBFr/PeBEQ93h6rBjYf3kTOWzI/opC8T9tOpnl7+Yb9XoFcADuSz7vbYWMNkdlf916QNwf5DeC52qXoShfyDPmIdSdkWLnLP00NMwlUQZqyAQRVjh24biNl/2psi08In+yJcTsNce2E1Bu5B9sY5mcincKuU4JIQco6xFzpddC2yxn3WeU0ldf1Txnc1Ij/UsVQM9mnpf7Ni9nyVD6cMAC3HWQJitgYxSpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jhoMCcTOVOh6S6o3eeVAwwXQIZ5HW0LpN1wQjvuLD38=; b=HYt4EgKSsNV4GsnlTEc/UuyJAn9w035lUaG/tqJaSPoaXuYGK+ikSoVJBv1vhebFUO/0U/7nRcCkfU4NrrI3/w+ZIsu8/XZ4kg0KMUAj8XzeX/AjsqCOkkbPMltXxCXa8ZrdklN+pklxdjZHAZtweldd9bF+ms6Lob5zczeXOkj/rM5sYWNsYgj/XvoEgllhj825DDLAxZFaQ0uhaP9SdDDuAbv5Zq2hzfdMU7tJ92ll6VaHBE205asQhNJDZ7B1PNWD6mTFWe1SPUxV18KDin1pHeACyGjdp9UfWycXq/DqvK++Q0/0ppL1GlsvR54mgVT1wPvM8BvoN/UrRHPfpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jhoMCcTOVOh6S6o3eeVAwwXQIZ5HW0LpN1wQjvuLD38=; b=Oz6DXlmYGaEEEUVSByTrujADiLs+MGM/GwEzjTB/KGp9W70Dlpx/RoUHk4zuTWcQc/D+zBAZJqW1Qi1K9cihmZP4XcceBKKjKz/WmIkcQBipQR5QWASNrd8+fkcqZFXXMhgVNfLmWwpJGH2O8PMTfpBFrej9ZiVshLZqraOHstE= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by CH2PR10MB4197.namprd10.prod.outlook.com (2603:10b6:610:7d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.28; Mon, 15 Jul 2024 19:44:11 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::b75a:ef76:884a:dd27]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::b75a:ef76:884a:dd27%6]) with mapi id 15.20.7762.027; Mon, 15 Jul 2024 19:44:11 +0000 Thread-Topic: [External] : Re: Q: Is there a built-in way to read multiple file names? Thread-Index: AQHa1uiWqaHyXrYIUkKgi4b6F78mirH4Ji6g In-Reply-To: <87o76yiivc.fsf@localhost> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|CH2PR10MB4197:EE_ x-ms-office365-filtering-correlation-id: 79e84605-13a3-4c48-b679-08dca5068026 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|1800799024|366016|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?+CboSLFhg0aqsnlkUBHTmJNhvyb7fAJnxMXhJ/AkhtqB3I92LKcvC6/ZoHd2?= =?us-ascii?Q?Gx0Da3UNB694AnIvtvJpN5Eoi5Cul/e/4fpIcST+pcxa3KEwAJqBv95rK0qC?= =?us-ascii?Q?2+aViphBCFs15Uf51Z5zMBJ7+xblMgx4bXu+xbW5OfU/aMG3N9gwkczTamzq?= =?us-ascii?Q?1ZJoL4JGSZUeoF5QrRrvyyyWrF5NGMLmmQNnKKAyOgp4GFnAxNAYYe/LP3MT?= =?us-ascii?Q?I3ZDa4pT0ak4zwyp3OskMpdkq7Q2QZ2aQEClpem5HHM+RI9ZnViDQ0BwFza6?= =?us-ascii?Q?JDtzVHy+1qmtQqtWDUvTwJyDWLITTJ5y+0y6i4cSq65kC5vJ2Rto2EtD2Uax?= =?us-ascii?Q?iJld/+w8SIAmLYp0gCHnkIynzaR1femRlgkjMNjIvIC2LBqib5DK8LtGrWbX?= =?us-ascii?Q?l5nItukkKgxxE6BDBWH/rb6YphG/ysEvkcl3LN1EeBlfHaB36FUiKRxnpyzS?= =?us-ascii?Q?rDcyDs8CemwZ0NvivVXapnwlzVR5QNerTOpZOGzLK0LxwHFqlJtYPL4b00cR?= =?us-ascii?Q?rh5F9CE/xl8uxCUFB85CHW6enFcGmlICtqFeuFapEiav/GR9q6+YdmZrrwsO?= =?us-ascii?Q?VnMuDVhs2Q/pDm0H7TdrepZypwG+akS9irlwR5C3Qaj9dw0yO2kYOH+ETvJj?= =?us-ascii?Q?zn7Nq x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Cxm7gnSlxeHd9GatRTEOgWghs/cW/WhUI6I8z5i/c8cY2ZKLLBu+s3jLTriI?= =?us-ascii?Q?M1TyvQJz4OpYR9b86I0jJuje/n38fS2YHnGO6IEIfj7tvaR6/wGGpcqjUc6f?= =?us-ascii?Q?iYoba1Ud9uitYMX0Z7BuXWspVdOOkixR+pzzsH/z2zR2C2Ab664kjHLd46fQ?= =?us-ascii?Q?y/B2M9XdjfGYlh5RXenQHxMdej4xRaklYpjPq7RTwb9uNQLbGouJN1PIhWH4?= =?us-ascii?Q?kkZybTVFgwviRQIF6xhXuiYEfKbjqJ+snAJOcvLAUQ9W2Q1UmjF41j4oBD2P?= =?us-ascii?Q?XKa/xCJbgdShI80wQiuv9gSYoRGGEJEvjAOR+XmQd4oSaBeJpXsVYLnsWqLs?= =?us-ascii?Q?zzTduYkVNXGj1j7d/w/cad2D0pOCUO0tbBNaVtQaQgbK+1/MLg88LdOgrDjT?= =?us-ascii?Q?HveUlmTP+Gr+/vuWuOj+jm06qIhZcUrsOIN0jcw4UbSPRZpEWfeT6Fwhd+mQ?= =?us-ascii?Q?GTZX+3zG58Nd6jilxJ5hQ4xTBbO423S19yp+86rId+whWBmK8w4TU7zGO0UR?= =?us-ascii?Q?Juemr1G3MLoHRejAOt0ezH4pPjWzRTNLqJYsSh3x7C/kistT3uVVGArERJi9?= =?us-ascii?Q?S4u2XV8Mg5xqdsklbKkCIcyZbutZMKTwm/Y8jCpYTVFQNFcJd4znMpehn55N?= =?us-ascii?Q?c5 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 2FUHnZ+KT94lg/WzA+NvJKKlSE6RwVZgRQxuxTi22kG/9AMUCS4FGE5pqsIgCn6L890UmPF56q9i9EVaola7yt3h2F1nz9NhsfysjwN0NFK00z7qoS8xXfNwuiauYeDrozSF9hSHMeVd2BhUG45CHlSefF5BiCo8Wou9cdKKPGNGNvxxG20xe8H4VidzV1qn5YwYD5GU6xFIaU9qSgSgRmF3NPOuSqVvONrZOUCXNDR9rz1VYPEhGFRYkg3NwNPX4SYzYgGG6rGUpld98XPAKZdBzFgE+ZMqjhquIzn7p2tosGGbgBhUQ7NKs1rdPc2wJb+l9YCIt7dQwmfEJqJNM9BybQQfCMAoKPYj+yTCIhnNwT1g88AnxctE5pJKM/hQNmoNOca55AWuoey12IgS2YjnZta0fWOH08G3+UhEPSWlgQatwBcu1kCqPRL3hu3yCtmVsPEYOEVPAVcCfnfvuYedoDhtKMdeIj+NRQeq9aNM7HWabQ+XIvuNzaPzWRg/7L4McCBJMNvwdiJu1kcodouM4kiBDuU89qRzocK1a5IjCoI7XADmPJP/vyNt/S6an00fSA3dHMceSz/K03lvBNIMMc7tVkgVeqHkhi4TjUU= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79e84605-13a3-4c48-b679-08dca5068026 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jul 2024 19:44:11.8150 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: SwoBtMkC+wjkwxvA1EgjCt/4xHI6UBXuKDRV8SV9J9ibeCbeuX3WuBkAEFyiknULa6sRy3y7w8Ta8nugch68gg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR10MB4197 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-15_13,2024-07-11_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 mlxscore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2406180000 definitions=main-2407150154 X-Proofpoint-ORIG-GUID: PIx1yMHNUQwZwjUHN8hcjv2P6tTOZFYU X-Proofpoint-GUID: PIx1yMHNUQwZwjUHN8hcjv2P6tTOZFYU Received-SPF: pass client-ip=205.220.165.32; envelope-from=drew.adams@oracle.com; helo=mx0a-00069f02.pphosted.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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:321677 Archived-At: > >> This sounds overengineered. What you describe is an > >> equivalent of `completing-read' HISTORY argument. > > > > No, there's really no relation to any HISTORY > > argument. Minibuffer history args record only > > minibuffer input that you've _entered_ (`RET'). >=20 > Sure. But if multi-selection is incorporated into standard APIs, history > may also hold the information about selected elements, in addition to > minibuffer input. I do not see a reason to keep it as a completely > separate structure. Sorry, not clear to me. Define "history of selected elements". By "selected elements" I assume you mean something like what we've been discussing: designating/marking some file names (or more generally any kind of completion candidates) for use as a group at some time, particularly at some time other than during the current act of completing patterns. Saving such a set of candidates somewhere (register, variable, file etc.) is what I've been talking about. You say that that's overkill, and that some notion of history gives you the same capability. I don't see that, and I don't see that you've described it. For minibuffer input there really is a history determined by the act of hitting RET at some point. Likewise, for Icicles selection ("saving") of candidates. If your proposed marking is similar then what's the difference? The "history" that records the set of marked candidates needs to be saved somewhere. Certainly you could save multiple sets of candidates to the same variable (or register or file etc.). Perhaps that's what you're suggesting. E.g., a var that holds a list of candidate sets instead of just one. I didn't do that for Icicles because I didn't see a need (use case) for it. Typically, when you want to retrieve a candidate set later (i.e., to use it as the current set of "matching completions"), you don't want to have to cycle through some list of sets to get the one you want. You can think of this like saving a minibuffer pattern, then retrieving it later to use it again, to get the same set of matching candidates. But no single pattern would suffice, in general. You might have (1) used several different patterns, and possibly (2) used some in sequence (progressive completion, aka progressive filtering), and (3) selected (aka marked) among matches during #1 or #2 just some that you actually want to include ("save"). > > 1. `C-x C-f' followed by a pattern... > > 2. Mark any of those candidates... > > ... > > Change your minibuffer pattern... > > 4. Repeat... >=20 > Yes, makes sense. >=20 > > 6. Hit `C-g' to cancel reading file names. >=20 > Why not ? (I guess simply because icicles builds on top of > completion, instead of extending it. I am aiming to extend the > completion/selection UI) You _can_ certainly hit RET at any time, accepting the text currently in the minibuffer (which adds that to the current minibuffer history list). Until Icicles, that was the _only_ point of a completion function such as `completing-read': to get a value that the user chooses. The point in step #6 (`C-g') was that you don't _have_ to enter anything - you don't _have_ to end the call to `completing-read' or whatever at that point. You can completion not for a return value but for performing different actions on candidates. (One such action is to select some for later use as a candidate set.) IOW, you can use completion _not just_ to provide a value for `read-file-name' or `completing-read', but also for other purposes. Those purposes include (1) discovery - explore the domain of candidates, (2) see info/help about candidates, (3) accumulate a selection of candidates, and (4...) lots more. This is about #3. And you can gather candidates across any number of different acts of completion (still within the same `completing-read' etc. call, using any number of different minibuffer patterns.