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: Sun, 7 Jul 2024 21:24:00 +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> 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="16337"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "mardani29@yahoo.es" , "emacs-devel@gnu.org" To: Eli Zaretskii , Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 07 23:25:13 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 1sQZNh-00040g-09 for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Jul 2024 23:25:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQZMk-0005vr-Bu; Sun, 07 Jul 2024 17:24:14 -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 1sQZMg-0005vJ-Rd for emacs-devel@gnu.org; Sun, 07 Jul 2024 17:24:11 -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 1sQZMd-0007Xv-JB; Sun, 07 Jul 2024 17:24:09 -0400 Original-Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 467KtA7l012423; Sun, 7 Jul 2024 21:24:04 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=lJ4OcnJsTrAjDDMIw7lLVznUZ6UyR5mhsqm97N0d/Jg=; b= TbMalH8oOMKBfOgKch+oHzwYe8MrdiwWfjuAQ1j7Toged1fZjnAemSCDqKasF2or Do9B/EmlRdiC6wk9iuVY0o8Bu13DXI1AlYcYYiEoKDsF4zkfv4d7Nf4mB1AGZYVx zPztE1Y8wWkl8O929dQxYzLcLUFkcao2IgP+dMqmcf+LDGnepY/bkdzfbttukw30 OYuYjb1nGqEfqm13ICX3IQo2P2FWkegZRJre+FpLT36pxxdDIHrxsKgZkYbf2v+g dAlXHCsPOf2dWtR+x0HIzMrYkvtFHp3+oePgY/qZG3T/jEdp64D7Hacghm7T5A2P /RngGFyTVqaBmB4CzQm1tw== Original-Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 406xfshecw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 07 Jul 2024 21:24:03 +0000 (GMT) Original-Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 467INFqQ013574; Sun, 7 Jul 2024 21:24:02 GMT Original-Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2175.outbound.protection.outlook.com [104.47.58.175]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 407txep7up-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 07 Jul 2024 21:24:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NiEx8K4KmMlmKejloR4S9FJPWogg5dXDSOQdZktDTNdgO2fl0xjNQtN7sZI5ShZdxmt697VcKM0M+pJ8iS2Xw57ERN8VdaCPpmSoBnnxPeyTtgXybB3mNuRN9gqmLUxJdSZhMuunb9GJEraI/5zRasbYomT0j9iPrJphns1cw0bvWzwkgegbC3wzaxygV4RKF3aFbVi0VzJ5292i/lVhED9CPBHKmVdeOeufnFRxfl+hGcJMUQQF/BO/NhhbQj4/Bry1gNJd9zmbRcnP1/YNzHu9SiIDCTotEc/5FfetOYJBqDwSfZ6ColRB5astlp+68DwA3W8VYc4DLYeqRKxj/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lJ4OcnJsTrAjDDMIw7lLVznUZ6UyR5mhsqm97N0d/Jg=; b=eVQjtA0ey5MqR0GrHeLhuoOD1/gKaSmi866PnB+NLRHJjMAiIoAwo6IitJl/GyXNsqcccCCw3066FFJ5txY4tVsg/aRqJUYK2jOdR8/hj30k5Oa5uFgyK8QugSTuiD1g5JGaoSC5sc+i2Ph0WGSqQJcdld89oBPsO5FCKnvOQD9oiBfzt25UIS7Td/n9H+wTAil+gT1Zkh+byOHOE/GN5Inpdx1/evtGIcduVePLunHGgWCaBKXpcRYoA6SgouoXMlANetYjHF6y1B/XvN/CXOkOJ22NR8Itg0b21TjAlGc4Nwc59DAeswEqcEk7fD86EY0ER7WDMN1SvQf+gK8/dA== 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=lJ4OcnJsTrAjDDMIw7lLVznUZ6UyR5mhsqm97N0d/Jg=; b=tQqynY59LAj6Te8YJ9vsQ/8DEJ1LTMr6CuFJiEPk/HVcYKhfbAJAKfk14nsEaoP3Xs9OY+SIUxcKbxLPkNFf0wmsoOn0ISUWcFHKGJQ+MpeW9OKi8IaMxBCdsXKFyKKS/uVo6DkWgqZp/WS6yNNLCa1AgHZ0nddMyGU0fYx6Etk= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by DM4PR10MB7528.namprd10.prod.outlook.com (2603:10b6:8:184::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.35; Sun, 7 Jul 2024 21:24:00 +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%3]) with mapi id 15.20.7741.033; Sun, 7 Jul 2024 21:24:00 +0000 Thread-Topic: [External] : Re: Q: Is there a built-in way to read multiple file names? Thread-Index: AQHa0JcOeO9vfbRtl0yOB5loBwxz2rHrqT/w In-Reply-To: <86ikxh13yc.fsf@gnu.org> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|DM4PR10MB7528:EE_ x-ms-office365-filtering-correlation-id: 4b089d70-387c-4e2a-a7bd-08dc9ecb1e46 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?gNTEgRB1ERXlMpSAVSId273Hu0AamwuE5PT2VQFCn6foHSLWIxlQn+OdlJrp?= =?us-ascii?Q?PILE7wwkPgj2w8zrXZ4scRg4dc+/QDjKZ4DJjga6JL0bUIA3TzcEWfp/OYAC?= =?us-ascii?Q?ysZNli5oe6WSmiJP6YvxEKa5TqEuGWDfR/m5pmjN/hOViTQTA+bsE10p3zGB?= =?us-ascii?Q?IKcWoQXd/0dkWDwqjKsj7vY8+XQN8Q1ESoz/sIonWngCFJxHAGDGgbiuAJQ2?= =?us-ascii?Q?O1hAsu0ZY76tSfSeMJ+e6e5PyjlWDtzPsb8pzztT5lvhlGv2XXmKQ4xThbDz?= =?us-ascii?Q?6zO6bLF07WYzYc8XjDi85CSoYVydXQW1e1b+L3dLEq+k8kZ8dEQYjw+JKgRx?= =?us-ascii?Q?r2Igg4xFDHAHpuVLLbuk9opOcho9Vy2EgDkhWI69Zo4dqMQOt/2fNUXwc4nO?= =?us-ascii?Q?rBCp3n4cSzi7xkBFaXfE118njipCYNDo4XnJvoWHqC45ryMoo0UZzzC7Ceqx?= =?us-ascii?Q?Ww3RZARIrNMN9rFUKmOLSja9VQDNnr/WQpUgpjRitM5MRC4NZJq+GxRnKDgk?= =?us-ascii?Q?kTN7CSOhO+v+E9GTIArCwn7R4ZPM/AUzPZtF/OYkiQ19ju2gudUNb3fWvP78?= =?us-ascii?Q?DQPGZgBgF7hiueBU8kP3mYVWX3qhERiILwjw2SshEyKfjPUxMwcT177iqmJ/?= =?us-ascii?Q?eKNzz 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?Zcp51wDphsiiITd7h4Xft92Cdlv8Ur45I1rI+OfIZfEiDzc+tkiSjQzjvSZs?= =?us-ascii?Q?+02/K6psQ6kkNR0LkwUPoTRiCtaC3c5MFhz3dKfKvjwjmIhs2hG+IsXpkI/r?= =?us-ascii?Q?MAC4jZrUm6RYMUajt2L4XMh3T7Y+cqcRzfW9vJptem3EG0sb7dsZPyj3YfsA?= =?us-ascii?Q?VXAfvTXPPrioRSlgJh0Dqs6dRQmEaVL4zd8dX8eEd4wJPZ2l2KRSACh+PO8p?= =?us-ascii?Q?CEnrug/XpBVXxmlXLY6SBkzeOKic0YGFozMuOQFJig7DzRmYbfrH1yQvvRgE?= =?us-ascii?Q?ZZRTBZojrnCHVLKElWotpUKplEesk/ghvBwuMHOTpIBfkEHF/fqQ0REBUDkh?= =?us-ascii?Q?dfjMKcPaIAOOIHfTtVhzDjz9A/ZDwqsaOoX1MC+kONG4rHaZTEnaCgiCJkMk?= =?us-ascii?Q?/4DqmAajE6zcM3HQrGxD0HzMOHm3jhiAGKxEPYld1goN3dDxuZBTKwRrut/P?= =?us-ascii?Q?wfDI3cC2jh3diPY/1/JBmw0H8p9wnHP/kheL6umuO45wuGnbctHj2JWL2v1d?= =?us-ascii?Q?gery/1NKJ6zvR9TdKCVnJvMENS+eX/6gStSjbwimf1W02rlJ1HPa9gXob+Th?= =?us-ascii?Q?l/ZRtFKKHBj8Ipq3TlejddbA2U7I7QBdVzwH00Nn3/m/325NY2DIirEOUnk7?= =?us-ascii?Q?8d X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: v5bTkBl4/q5AoORidfV98Sfb5MIZtPr9aetsUojnOFVBSeH3aJS0qGaGgBjeNQfJ0TmkNoYvPXcwIEzMxMj5YbCZpRK65Bn5PnDjFHiot+cQxbwVbnavYsQaHzg4WEmBY8jChXlPnltW1FLxLKehvdMmtyB8x/ZsdlTNdVvo/qfFOrHV818JicdzggtNDZoGEiPuLZq+LNlIaRMx5MJR9tN2JxoVdwgayA7UJ1kuShByH0NIygoaBczgyvYAq5VFxkjVbUiYqJD0Uhh9GbeR75C1uxAYo9lgugBS4bi7HMar6WKQ6s9wWNfrc58M5OwVnBq7oAASVqrWS4rZXi9JbsUACT3HB7Ppg6qIXk2d4G539H6CgWPUUodT3HQMY53/v1WTMHgCQyI5/1K+U6PNDpjA1jNHTCjVdSzBQEk/UNV70Z5vAmlvsAG1DRrXmZaNlUCnPj0suFzluo/qdLZPOqkFyjNSeV58x2z7Wg3lYezaflsSdIn87WCMWONGfIQLMXOXhuHPJZJrqJiXyq3fwjN4u/hrkEVSHxGZIL0L1O6AyQQBGJZkiMq9XUQ8CP5N2NIVDht4rAPSeTB84l8AXiV6edhfG7fSGzIxQQdcrqI= 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: 4b089d70-387c-4e2a-a7bd-08dc9ecb1e46 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jul 2024 21:24:00.2949 (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: QFDX1EKj/fW8zpdv8ahCwhC5DPHGsnW8mcaEWLQnBGrvUImwtkYblNd2yPFdiUc+AVJ5DHtWmfDloLaYrcZ4xw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB7528 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-07_08,2024-07-05_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 suspectscore=0 malwarescore=0 bulkscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2406180000 definitions=main-2407070177 X-Proofpoint-ORIG-GUID: F_SI24Y3a75FLbw8oUiuvz3hJZJPjrxc X-Proofpoint-GUID: F_SI24Y3a75FLbw8oUiuvz3hJZJPjrxc 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:321520 Archived-At: > > >> I wish that *completions* buffer allowed selecting > > >> multiple candidates at once when using > > >> `completing-read-multiple' or similar commands. > > > > > > I think completion is the wrong framework for this > > > purpose, because the user might want to select > > > files/buffers/whatever whose names don't share > > > anything in common. > > > > IMHO, helm proves that completion framework can be used for very quick > > selection. It does it via: > > > > 1. The notion of "current" candidate from the list that can be navigate= d > > right from the minibuffer (like next/previous-completion in the > > *completions*) > > 2. minibuffer command to mark/unmark candidates quickly > > 3. ability to retain marked candidates even the prompt input changes > > > > I find it quick and convenient to use, despite being a completion > > framework. > > > > I also do not see why the same cannot be done based on the basis of > > completion-list-mode. >=20 > The display parts might be suitable for selection, but the entire > completion machinery behind this makes absolutely no sense for the > purpose of selection based on attributes that are not names or > collection of strings. The Subject line says "built-in". But it seems the thread has moved on to talk about ways that aren't built-in. In that context, I'll mention Icicles wrt some things that have been brought up. (This has been available since 2006.) ____ 1. Wrt "marking" files for some action: Icicles calls this "saving" instead of "marking" a completion candidate. The list of file names you chose ("save") is the value of a variable (by default, `icicle-saved-completion-candidates'). You can also save them to a file. . The `' key saves the "current" candidate (e.g., during cycling). . In *Completions*, `M-S-mouse-2' on a candidate saves it. Alternatively, `mouse-1' before a candidate, then `mouse-3' twice after it, saves it. . `C-M->' saves all candidates. . `C-M-)' saves the candidates in the active region in *Completions*. . `M-S-mouse-3' in *Completions* saves all candidates, or those in the region if active. . `C-M-<' retrieves a set of saved candidates at any time, replacing the current set of candidates. . There are also keys to _add to_ a set of saved candidates. 2. You can match file content, in addition to, or instead of, file name. 3. Wrt choosing files according to file attributes: One of the variables that controls matching and filtering is `icicle-file-predicate'. You can use that to filter candidates that have certain attribute values. E.g., this predicate limits candidates to files whose size is at least 5000 bytes: (lambda (f) (> (file-attribute-size (file-attributes f))=20 5000))) 4. Wrt choosing (e.g. "marking") a set of files using different criteria, matching different name or content patterns, with different attributes, locations, etc.: You can use one set of completion criteria and "save" some candidates based on that, then change to a different set of criteria and "save" some more. You can accumulate criteria, narrowing a set of matches by adding another criterion (e.g., additional name pattern). You can save sets to different variables. You can recombine multiple saved sets. (And then filter that combination, save from it, etc.) 5. You can mark file names in Dired and create, or add to, "saved" sets of names for subsequent use in file-completion commands (retrieve sets as candidates). ______ You don't NEED to "mark" (save) a set of file-name candidates to act on them, of course. You do that when it makes sense - in particular, when you're likely to want to reuse such a set later. ______ Saving and retrieving completion-candidate sets (file names are one kind of candidate) is described here: Quick description: https://www.emacswiki.org/emacs/Icicles_-_Nutshell_View#ChooseBeforeYouAct More extensive description: https://www.emacswiki.org/emacs/Icicles_-_Candidate_Sets