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: Add completion to compilation-read-command Date: Wed, 25 Dec 2024 19:36:31 +0000 Message-ID: References: <87ttatb9g0.fsf@posteo.net> <87a5clm3p5.fsf@mail.linkov.net> <8734icaegs.fsf@posteo.net> <9a4bb215-561c-468f-97de-7d84fe7adc43@posteo.net> <87ttas80au.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27831"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "juri@linkov.net" , "emacs-devel@gnu.org" To: Philip Kaludercic , Spyros Roum Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 25 20:38:20 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 1tQXD2-00074A-7g for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Dec 2024 20:38:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQXCK-0003bW-2T; Wed, 25 Dec 2024 14:37:36 -0500 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 1tQXCI-0003bF-Kr for emacs-devel@gnu.org; Wed, 25 Dec 2024 14:37:34 -0500 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 1tQXCG-0002d1-1B for emacs-devel@gnu.org; Wed, 25 Dec 2024 14:37:34 -0500 Original-Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BPGRLEl019274; Wed, 25 Dec 2024 19:37:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2023-11-20; bh=sZ+cSbOb4rM9leq7jV8i0Ig1YM5G8R8DsNYJtgutKwI=; b= RMBLaD34mjOGufJg0RnAWXGG2mUt65Gg4t9xDjK+/+kBWW/cTUnOAcJk/465G44R uJF6zHq486bDCvxUkRAsNvPERtBpqi/8y3MP9cE9WWmCvFvvEIUCti1VyEg2RxZL 0vWadPQKOoiKD8GfWuP+s/X5KBbnwKdj7jFuyubIMewuq4engEsqaVJqUSc4tTYp DEIs4CJ5rMo1xY7JHiTN/slzUuC4W0hCTi1c/MHZxfY0fKmht0qloDHQBVuDUiRj bT1V9FmdFmYv+a4RdI7LrHQdolRb5fb0xXyqGMs/fbknBaiciaNATCU7s16TuLm5 JygjgrgJMnrTAYv5o0vwOg== Original-Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 43nq7rnjur-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Dec 2024 19:37:27 +0000 (GMT) Original-Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 4BPJW4YF022087; Wed, 25 Dec 2024 19:36:38 GMT Original-Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2177.outbound.protection.outlook.com [104.47.56.177]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 43nm48vk3t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Dec 2024 19:36:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HDwqqm9gleYP0qSZJsD6YeWAw7YlLAaxfzfjOW7SK4p8MriCbsgZDuAgmQX+DBeEkOccdKOY6dMBB/rMzdzKm3f5HdFihGOyKTSgwrm1vP1TCR3YCDa5zHRVbllUyQdsojeU/0pCQOYNDESlhugZ08IN1QDkZn+hoGuy214NbP8bNlsdKUuoT2zBF6t8TLB/6TcMvhuMYUQfA35cwWxXjeLgfbqsWyW4fxNx4YqM3+lg34tJ4sX1TStuUJwCAQ6glNsh2NLncpiI5oYAuF7+qNZg0TWAQrEFWZpkC1wmOpnKqFeKF6ZNAlYMuOGzQwLU520pzIeltPcVgR8Jp3IJJQ== 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=sZ+cSbOb4rM9leq7jV8i0Ig1YM5G8R8DsNYJtgutKwI=; b=grnhCvUbiojrOKG4KntJFJiuyzycBl0D20BXoYxQvmO/AGMrd2XDrPUr0nEKYgbzyn01+sez3j80XfnWX8Jb5f7dWDcS6Ze67sKaL9HTYFJKC8952X2lc7CyJVNffw66Bt6/wqtwZSRf0XvJjWiw23iHshjkErLLlK6SEmM4bZ4Slz3nqOJYW+AJzCrvP0zT6Q5f4BNyEsBaov3fv7dekJwvHY3lJeokQt++neXkfVFJ8a3Usgxzss5ullEiEBMSCEeGSrxryuiloKCS8AmHxiOLizGE1uRrTPhfPcgKVqhobsEPx1d32sapMy8Tn1OzZO2G3qy1suQZhYLYUWPhhQ== 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=sZ+cSbOb4rM9leq7jV8i0Ig1YM5G8R8DsNYJtgutKwI=; b=eu5zDKmS5EcnRH2KhCsP+pHTjaGsu6vjtGyU2/JitnHVJ8nUq9b6k/eXuaZKlRkOyLW3d+nx055jsplhtyfdSQps9bIYO/S73bOl+nywPp5PRu5KPTS+uw+/Pa+nc6ym+dmXjJHM+WsMGMmlrfV2L32/VANpQnp5pq8twe2hrLY= Original-Received: from DS7PR10MB5232.namprd10.prod.outlook.com (2603:10b6:5:3aa::24) by BY5PR10MB4196.namprd10.prod.outlook.com (2603:10b6:a03:20d::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8293.14; Wed, 25 Dec 2024 19:36:32 +0000 Original-Received: from DS7PR10MB5232.namprd10.prod.outlook.com ([fe80::8303:658f:14f8:2324]) by DS7PR10MB5232.namprd10.prod.outlook.com ([fe80::8303:658f:14f8:2324%5]) with mapi id 15.20.8293.000; Wed, 25 Dec 2024 19:36:31 +0000 Thread-Topic: [External] : Re: Add completion to compilation-read-command Thread-Index: AQHbVsDa+OFEHSjLUEyKvFiHfIjJbbL3KlTw In-Reply-To: <87ttas80au.fsf@posteo.net> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DS7PR10MB5232:EE_|BY5PR10MB4196:EE_ x-ms-office365-filtering-correlation-id: 7754e79b-f640-4eac-ae24-08dd251b6f0c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?+r9LpQ3TC/jCeT5H8eJ6zavK5Yv/ZLAVJqqs6SaZ+JenmWXnf+5rKW274i5f?= =?us-ascii?Q?xzarirzcasYXoMYyBQUtg3SZG55k0pRID00jlT/EREu5k63Cbl80pTkvt3Zj?= =?us-ascii?Q?QvPiAzA4JL4zQQw8I9slXhIz1KFAijwDkUy5Z66ct5QUKB4nob8dM2PPhR/X?= =?us-ascii?Q?BxGTsy+ZO1R0GADZPtKlX9hTlwCd7zlC0kR4QLldufA72J3hk0iP1x2J+lQE?= =?us-ascii?Q?yXgkStWzPd6LyegW8Jj70ubVN8uKSAKEm7Ksikhs2RKdW1KTnes6jq0RoSr+?= =?us-ascii?Q?WI2pJrI9Yewxms71xBQIYCP2P5mQjzSW/vsIOL0yjJZ7NTP00DtLueuZ6MNv?= =?us-ascii?Q?zT2whSt0Lr1rvne+MnDsmx+tzpV9FusBb0D5hx1zw3UL47XeZVdXCXMhmMtV?= =?us-ascii?Q?9RSpxRvg9iF71NG/rdaeIBlVWa47Ay4225xJHENSQWy9bkCux2p2z9Y/BaWD?= =?us-ascii?Q?wGqoy9lpXJhD5yG3LckWP5ZtqYO9LcPhpgbVzwuXgWpBsQS5R9bLOdvxP7st?= =?us-ascii?Q?l11eqoDA54TH9eT3PjCjPatYMU+ClWZPiKvXnSL9EoHobVMXhX5oa4IPKVW3?= =?us-ascii?Q?KEKGHRzgE1fevGttXYwcwi7vr6UG8x/wqPF7C5Xl/VHU+8dRpgSasljPLbgC?= =?us-ascii?Q?ioj1I x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS7PR10MB5232.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?xPzIlNoc/iOrzryNaZ/b7Qwhl2E0QbKFJGymG45nN4rfRXtzH6WdCarTKhqC?= =?us-ascii?Q?uZqZHp1hTMSFouWEM4vwTsAYpxjp56gmlBcZd7y0/pSbCIl4nibwNNQ2yJj9?= =?us-ascii?Q?XuGnoRw1ifYf9elZSLhGUE95zveTYlu9Djfrh6JfCtXH4bu5gOlH+5lqsQua?= =?us-ascii?Q?nyg2e8OhHvqplgxSdBKQWzJ8dpTfLf3XrszkNRxs5A+tp2XLW8vpKYmzNKxj?= =?us-ascii?Q?YFwKBZ4VWma1ILcyqb6WbXFVLRwQ/kwiifyZu8iYb4eBmVs+e9qCJg5kwmBB?= =?us-ascii?Q?+T4hWeAuOQS0v/3D8ZCxc/wIfIu/0IPRyo0HvgZoHT/z3IbDYvYmYDTCk2EC?= =?us-ascii?Q?U7/fOQghVO9+0RcLXcmybzumFLTrRduuQHwmGJ2YcUhKRwFsgenssenLCLag?= =?us-ascii?Q?0AnHNKuycLiiG5sLAv4J63+je+Qrv/osdmSAJCX/en4ycce2yuOdyjz0MFh7?= =?us-ascii?Q?b8D13vIM6Y+rmsG18aRnp0ZjSGdf+oVcSsyXSUA6O/TPISKz5w0ElcC9oRGE?= =?us-ascii?Q?KKah6WntLSgwb5Yzb5ifOb9T4yGJWJQZ11emxfvFbAwHoyQ6LBUn2pLQaPXI?= =?us-ascii?Q?6nULxUPQiFd1KHgB8Z0WfaBCj/jXkn/vO48w5g+XXaqHrOmhX4NMQbIh3Wrf?= =?us-ascii?Q?4u X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: eMXRZnnJgCQA13U9YNNAhmNPlA5puZfGLgXhC9f8oDfkkT0C9k4Pgn6ICJe98N3c276O3VEaVSBJP63DvMJ5JrvQZhO9g/NDGX6EHeaZ+hzlU3pa3ZkQdaLXrp8CzaOlmJSSnWyaib/Rz58PNzoDGAkguXKdeL/WkflZV/C240D4oG44DSivnKDSaxdhalYE2u+XKNBL70n/FY5+ZC2uQgqCHW5YnN4k9EGqzQAeMAvaiOzZnFYKjvF2WFeXpq6EV24kd7XqHYSOxiKs/O/9QjMjdi1jVeCnIWnuf9xmHH3gJVP2XL+7Lp1fVlcH8eTvuDaSPDohUviR3yULldd4A9OQXLHEwoRGYxuyxou4ORSkrtPBd5a/vlK0KLT6Ds48QtEJV0Ir9zeFTKwk89Y8i89nW/UWzMI1zoJrIGYbBV8UHf7qchDk6/dpFHync6JQcDlqCkkR/5m5ZqZURZue9/t78ahv9nVdRNf7cdfuglSMzC9NrA590/TBCJUHjD0PS0rI+3cUma9wz53QW4uJdaBW2yEYj9QDi6DevGp2WCAZp0RWt9TWQyZy/c6x1hFLKZci8S2CLKR1Yqkr6XfHVbusqwIH7F0K/TokxouNbc0= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS7PR10MB5232.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7754e79b-f640-4eac-ae24-08dd251b6f0c X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Dec 2024 19:36:31.3623 (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: cw6WtYApGG9CpuOxCeCQOWigwW+Ao72uz+qLqtSE448LQye4egG4MTq5tn7LS+o0mpXRO9rNJScbJXdkG60iyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4196 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2024-12-25_07,2024-12-24_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=806 mlxscore=0 suspectscore=0 malwarescore=0 adultscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2411120000 definitions=main-2412250176 X-Proofpoint-GUID: _TvclIOBMBAKv7bunxx0xyeZPJrwniGm X-Proofpoint-ORIG-GUID: _TvclIOBMBAKv7bunxx0xyeZPJrwniGm Received-SPF: pass client-ip=205.220.165.32; envelope-from=drew.adams@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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:327119 Archived-At: 1. I wasn't going to reply to the statements made=20 about "completion" versus "narrowing", "selection",=20 etc. I think such a characterization isn't very=20 useful, and it can be misleading. Since I'm now replying (below), about Icicles, I'll first say this about completion/narrowing/selection: Emacs "completion" has always meant matching a (user) pattern against some set of things, with the pattern typically provided as text in the minibuffer or some=20 other buffer. IOW, completion is about _matching_, first & foremost. Completion has also typically involved expanding or replacing the pattern, based on the matches. E.g., you type "forw", hit TAB, and your input pattern might change to "forward-". (In Icicles, such pattern expansion is optional - you can toggle it on/off anytime during completion.) The words "narrowing" and "selection" are less about a mechanism, which "completion" speaks to, and more about possible _uses_ of a completion mechanism. I'm guessing that those who distinguished such things from completion had a limited view of its possible uses: limited to just obtaining a (single) completion of a pattern - much as if the only use of `grep' were to show all matches for a pattern and then let you pick/access/use only one of them. If that's how "completion" is viewed, then yes,=20 "narrowing" and "selection" seem like very different=20 things from completion. That's not the way I view=20 completion. Of course, we use `grep' in many other ways, including (1) seeing what all the matches are, and where they're located (discovery etc.), and (2) piping `grep' output to further `grep' patterns or other transformation functions. The uses of completion are really as general as those of pattern matching. Completion isn't at all limited to obtaining a single completion. The idea behind "narrowing" (it's really _progressive_ narrowing, since just a single act of completion already narrows the original domain of candidates to only those that match the initial pattern) is that you can _chain together_ acts of completion/matching, as you do when you pipe `grep' output through another `grep' (or another kind of filter or a transformer), etc.=20 IOW, you can match one pattern, getting a set of matches, and then filter those matches (as a new domain of candidates) with another pattern, and so on. This is different from just changing the input pattern and recompleting, which just starts over again with the original domain of candidates. Of course, even such plain recompletion isn't limited to a get-me-a-completion use case. Like progressive completion, it acts on a given _set_ of elements to produce a new _set_. Completion, in general, is an=20 operation on sets: given a pattern and a set of candidates, it returns a new set of candidates, which match the pattern. [ More generally, you can think "map"/"reduce": Besides pattern-matching with filter functions, _transforming_ functions can be mapped across a set of candidates. And an aggregation ("reduce") function can be applied to a set of candidates together. Dunno whether other so-called "completion frameworks" offer this, but Icicles does. ] > > from this thread I learned that Icicles can be used=20 > > to enhance completion similarly to how narrowing=20 > > frameworks (like vertico) enhance narrowing. It's the other way around. Icicles did that for decades before there were any other "narrowing frameworks" or "completion frameworks". And it's not about "enhancing narrowing". It's simply about=20 ways of using (taking advantage of) completion / matching. > I have never used it, because it is not available as=20 > a package and it redefines built-in functions, but > my understanding it that it is something similar. 2, I don't care that you've never used it, or why. But for the record: * It is a package. It was on MELPA, till MELPA stopped pulling code from Emacs Wiki. My other libraries=20 were also on MELPA. * Icicles only redefines some predefined functions, and only while `icy-mode' is enabled (on). When off, the original definitions are restored. 3. I'm no expert on the many "completion frameworks" that've been added since Icicles. But I have a hunch=20 that none of them have something like the progressive=20 completion of Icicles: When you initiate a new completion / matching / filtering with a new pattern, you can do so in a recursive minibuffer. The previous set of matches (completion candidates) then becomes the domain of candidates for the current act of completing. Using recursive minibuffers means, among other things,=20 that you can return to any higher level and continue=20 from there, branching down another trail of levels, and so on. In effect, there's a tree of possibilities. =20 (You can also pop back to the top level directly=20 anytime.) > >> But for someone like me who doesn't use a > >> selecting-narrowing framework like vertico, it > >> suddenly means that SPC is rebound to > >> `minibuffer-complete-word' and entering new > >> commands becomes *a lot* more cumbersome. 4. On this I'll just say that I argued long ago for Emacs to _not_ bind SPC in minibuffer keymaps to word=20 completion. To me, that's just an artifact / legacy left over from=20 the fact that Emacs used completion pretty much only for `M-x' and reading file names, and Emacs commands=20 and file names rarely, if ever, contained SPC chars=20 (esp. back then). Completion being potentially usable for matching against _any_ set of candidates, it makes sense in the=20 vast majority of contexts (including potential) for SPC to be self-inserting. (Of course, in some contexts you might want using SPC=20 in the minibuffer to do something besides adding a SPC=20 char to your pattern to be matched.) I argued the same for `?' and `C-j' (newline): by=20 default they, like SPC, should self-insert in the=20 minibuffer. Eventually, after decades, SPC finally=20 became self-inserting, but only for file-name completion. (I'd be willing to bet that other "completion=20 frameworks", like Icicles, let you insert such chars=20 without using `C-q' etc. I'm not betting on vanilla=20 Emacs doing so anytime soon.)