From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#48073: [External] : bug#48073: 27.2; [Eglot] Don't bind `completion-styles' buffer locally? Date: Tue, 27 Apr 2021 21:01:01 +0000 Message-ID: References: <871rav4jri.fsf@gmail.com> 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="4679"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "joaotavora@gmail.com" To: Augusto Stoffel , "48073@debbugs.gnu.org" <48073@debbugs.gnu.org> Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 27 23:02:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lbUqU-000170-ED for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Apr 2021 23:02:14 +0200 Original-Received: from localhost ([::1]:34644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbUqT-0002yK-AJ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Apr 2021 17:02:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbUqI-0002xy-7p for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2021 17:02:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39501) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbUqH-0004qn-UP for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2021 17:02:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lbUqH-0007vz-T3 for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2021 17:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Apr 2021 21:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48073 X-GNU-PR-Package: emacs Original-Received: via spool by 48073-submit@debbugs.gnu.org id=B48073.161955726830437 (code B ref 48073); Tue, 27 Apr 2021 21:02:01 +0000 Original-Received: (at 48073) by debbugs.gnu.org; 27 Apr 2021 21:01:08 +0000 Original-Received: from localhost ([127.0.0.1]:51047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbUpQ-0007uq-FR for submit@debbugs.gnu.org; Tue, 27 Apr 2021 17:01:08 -0400 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:48932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbUpN-0007uh-NM for 48073@debbugs.gnu.org; Tue, 27 Apr 2021 17:01:07 -0400 Original-Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13RKowHj026539; Tue, 27 Apr 2021 21:01: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-2020-01-29; bh=+DZBhck0rGczRxsM+ZB7wptPuFjThXflJVuyRCCaxh0=; b=EY7bL4KHJsaP/aVxVSf4fsxoIR++phmVXhg0B3wXNouPkmrXXWfnL3SAXCU5gEC9eVZr Z+juvPyLbT91JcfwVCu4PIELSL+/1Fck9+0at6GoTeKzMDqij+s8GGgTY407quDApQB3 bTXYvF5HkOyjtGpN+gLtmef5JR0FAT0z+TUIXAc20ommUmRlESP2NnX3Xe6Xcmi7iAzv srW7ebYjOgVvcqGZKSqCt4UBFOBh9nMZbFNhaRt/MiWDrp2TXm876D/jBht4xLBiWkpF kxSSPIiCAmtRQyCpXG2fWd7ZkxQzNFlZH5NACIHUECH1FUAUzgjUCTAMGgrEV0W+4uLI Rg== Original-Received: from oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 385sgq8g4p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 27 Apr 2021 21:01:04 +0000 Original-Received: from userp3030.oracle.com (userp3030.oracle.com [127.0.0.1]) by pps.podrdrct (8.16.0.36/8.16.0.36) with SMTP id 13RL13H4041673; Tue, 27 Apr 2021 21:01:03 GMT Original-Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2107.outbound.protection.outlook.com [104.47.70.107]) by userp3030.oracle.com with ESMTP id 3848exhwt2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 27 Apr 2021 21:01:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d4/dcl7L9YcbWrf1ZK3rMh+MU9yod3P4AtpaBHZ+ThBPrHdgvuHuhm23QqJW8eIcu8d0uNWjSL19bUe8Bn+xK59ExhQBZAGevSBY2wKBJ9Lsj9ESDbHfi8G6QgTYs/sDt/0+uGD4JaQfXwlRUWfWwqMl48+66ROd64fVyxpVh3x8nG6t8Z/9ZAtYEx9z7uv8M7vYVNLaqoElYsb7CWp3gFITc4ntDbZ6g+IUPZeRhgiB+LJF6S4ujjj3Qz/l6e7b9lCaTxFd/l94Q0mckY5gMH4A+eKkPxqWKR6lL3fDAeJ3okJ1ARQRMPPIkaqyziBTntxcA1jbCKfTbc48Mes5hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+DZBhck0rGczRxsM+ZB7wptPuFjThXflJVuyRCCaxh0=; b=Pa723n08zq30spLJcwRSS1BYcAhrDTdDM+oB/Yt2ZnI3yRWACUtXsMQY4qUuwPT7Ke/aLBqEvK2JbHGHDtLdZAb47BjZ3eCNtM8ky3ydC/WA9XAp+WpW74/HnZLhCa7T7lZHl5Vn+93jEKSCaJ0lEk6pw2Em5BX+5cIIacbOL3dnZGiU7mBMc6hoSRt1+mUVioi3pH49ok3UmWrKTf71DfwX/W94YavfCCbVJnUXRnCcZ+mZqj4TbzaGNTioD2xm52Ub0IvaB/+jfp5IRX2SgzGuEx3uQ6t7ro4LDFtp1Plqe7wbvZ1RIT9lxZ8ARHOS+1X5FMgcQJ4Xomx5Qzv+hQ== 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=+DZBhck0rGczRxsM+ZB7wptPuFjThXflJVuyRCCaxh0=; b=MvEgxxws/BkI0quN9Qwwi+T2WM5ypLzJrXgPMMC6R0vwMbgkrVrmtRZWddpBvM2T4AU2h+EVVTbbbQRKMhGjunrXyRz7/w0in9Ja1b/KB4jKEoUy3DFc2yJOy7A64eV3wYAufz4Zum/kEWmW/LNkkxeREXhQ/Dk4i7swyVJPthQ= Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SA2PR10MB4634.namprd10.prod.outlook.com (2603:10b6:806:114::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Tue, 27 Apr 2021 21:01:01 +0000 Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::2109:9725:fd4a:6494]) by SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::2109:9725:fd4a:6494%6]) with mapi id 15.20.4087.025; Tue, 27 Apr 2021 21:01:01 +0000 Thread-Topic: [External] : bug#48073: 27.2; [Eglot] Don't bind `completion-styles' buffer locally? Thread-Index: AQHXO5qWFXugGU2R8UGG5jq/vk5rX6rI04RA In-Reply-To: <871rav4jri.fsf@gmail.com> Accept-Language: en-US Content-Language: en-US authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=oracle.com; x-originating-ip: [73.170.83.28] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 300c68ea-9ab1-4c4e-68f7-08d909bf902c x-ms-traffictypediagnostic: SA2PR10MB4634: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OwxXPnoeXpCocGHlImddPH1JSOKFtTtcKvLxhrIFnqC5lWSnyXmTSuFBFPoIsMnnsIDlXuocfOFzQ/cARvH3osE4lVWEWZ0pdqnexNPQDTaNEMZCCYJqOxKgdkmNTCKygLCQK8KsBlgZXhKex23DoBrLLnfFRGjjmj6EGZLWxLyOb40z0uwP2epH4xZadxVVMR+XKC6lUMrkiM/Q0FsGWzHP4/LwIOgne3iF/aEQx9OEVLE/O+OnoHpFAfS6V7kf1lOjpZPBnAxgW6gO53P5OwlXGfWzqnOsZtDaEvmQnLWY1wyPCvM6ep7MLW1dFzMRUQp8A9qe2YfH9CEY1Vn2SykaUEx/LEsFY9jIrwrzkyOxF6i39JAiNNddZ/TcitOm1iUIVC8C6gyC6TFLVotpU6FMfP3Gq/2Ybje02SzD7bAnBALtApLekbHlTPAy7NjkrLwiBiODD3kxCj6RTYRNj0RgjvJy7/hKuY+nxl/T3AQ1UcNR82MO7jb8Q/B+frjbbJPRUcSm7HJfUqQDltJP42lB1H7de6kqniGmsRNEo6uJy4NgehPhciAlbasFolsqRHgDsZC6ZuDZughRXakwQnHz5oYYOC5yyqVN/sZAxRY58Vmbx7TZd4K3DToPzPpviFC8GD5IAfSnz8gqvFmF1g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(396003)(376002)(136003)(366004)(39860400002)(66556008)(66446008)(66946007)(66476007)(76116006)(9686003)(44832011)(71200400001)(64756008)(86362001)(26005)(8676002)(8936002)(33656002)(2906002)(186003)(7696005)(38100700002)(122000001)(6506007)(110136005)(4326008)(52536014)(316002)(55016002)(83380400001)(478600001)(5660300002)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: HVypJfHywiX8l5tc2JRibBwCb6b4S5TVjt7NoTj2I+Jvdd7DlGH2OYuASa6jMsn6/kcNpOXKcMeTJHv4MAlLyTsLB26lKaHnda/48herkLa7EX1fAlcEf66STVp0YlSfYjT5TLfVkNA7bH+COf7QbwFbehNJC6y7LCSPvtHFSnJCa7/um9B8s+DsVRsv5F5XWrWos/PC9Hv3jDERAYVgL5yZWsPBZbajpvE/SClBPqBsd218kZ4bPzImZmplpsJqcrdv4j5HKsJ1TJEm8XLKIUsDKFMRvJHlTOotwji2q6pdzVKIybr5COby4cpu3uJgZpp2bOl8RLfOS+Y0oGsqaa+yLY4yR7EQTFiq8cd9GXW1Ynf1LhV6SFLgic6hnvHxSD+mJ4Mh5bgTztnhJGZOVGBqFrxah+E3O2crtH+tYm0xbVvJgNPHxFgsY2Bzh8/eqqi2HbSCxTqGlkhRg8yvD0z3ZHo9C29jwGi21whougk2mbNdxgma0XbJCkDXR6MS7+BRaUBbO3xy2o69x0tTF27sSEmkJCeRiqSYvasuYKPAE2vIo3OJkRypBMF6h/amW9tAHHgwAlPepbiaNvl/SR3gpTgEZoZy3bW6+dv5edXtTJa93sVvnHr+dft+NHUtmdpnubz84qG6joFl3YFkL8fw7VZ9Wr3UQ73ur1+24mxqTMziCWNdXfTHc+VLbm8OrkmCcdSZYE3QAKIHwFYxhc06i38qy9aiGKlbdjJmmuKLFj6dScinO5K+d8oq oEuY7HM4KX9qPiYaHIB3foRJII9tNSLTxFXgnUyvlg/70tocnr34YOZmqp6Ii0xy5PQEe63WdxZxqQicC9Q8hzBPhmhWEHP3o8 x-ms-exchange-transport-forked: True X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 300c68ea-9ab1-4c4e-68f7-08d909bf902c X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Apr 2021 21:01:01.1132 (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: HpIQ4UpJZWMVk/BTdy/BdS5/2GPVYw81fSdoSEXJk3YMkwuZOhs/NaOBAevz6fpmICZUljNDj00gDphyq5Mxzw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4634 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9967 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104270141 X-Proofpoint-GUID: 5WqhhbhKYL9fBrZq_k58gpMVsxNL48MN X-Proofpoint-ORIG-GUID: 5WqhhbhKYL9fBrZq_k58gpMVsxNL48MN X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:205057 Archived-At: > Binding `completion-styles' buffer locally can lead to problems on > alternative completion UIs, say if the minibuffer is involved (this > used to happen with Consult's compeltion in region until recently). >=20 > It seems that a more appropriate way to override the completion style > would be to include a category in the completion table metadata, and > add a corresponding entry to `completion-category-defaults', which can be > done globally. 1. I can't speak to what you say in your first paragraph, other than to say that I'm not surprised that this can cause problems. I expect (but will be relieved if it's not the case) that making global minibuffer variables buffer-local to the minibuffer will break behavior in my "alternative completion UI", which, I think, relies on not only code but users interactively to be able to access, and even change, the values of such variables (that is, without having to wrap such access in `with-current-buffer' for the current minibuffer buffer). 2. But I think I disagree with what you say in your 2nd paragraph. It should be possible for not only an "alternative completion UI" to change `completion-style' without recourse to modifying the completion table (metadata or in any other way), but also for a user to modify `completion-style' on the fly. The completion table should, in general, define the domain of possible completions, which are matchable by user input. In general, that domain can remain constant even when `completion-style' is changed. The domain defines what can be matched; the style defines how domain elements can be matched. It's true that a "completion table" can be a function that, in effect, performs matching of user input as well as defining the set of possible matches - together in one operation. But that's only one case. (It's general, because the function can also make use of a non-varying domain. But it need not do so.) In my "alternative completion UI" users can, in general, switch among `completion-styles' interactively, anytime during completion. If a `completion-style' gets, in effect, baked into a given completion table for the duration then that feature becomes impossible (I think, but at least not easy) to make available. Just one, non-expert, opinion.