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: Allowing completion sources to customize completion display Date: Fri, 24 Nov 2023 20:52:46 +0000 Message-ID: References: <831qcghn52.fsf@gnu.org> <08c7660f-ee16-7159-581c-c8b2526a6035@gmail.com> <83il5rfwps.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="33937"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jim Porter , "me@eshelyaron.com" , "emacs-devel@gnu.org" , Dmitry Gutov , Juri Linkov To: Spencer Baugh , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 24 21:53:51 2023 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 1r6dBN-0008dC-FV for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Nov 2023 21:53:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6dAZ-000686-SR; Fri, 24 Nov 2023 15:52:59 -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 1r6dAX-00067s-Rm for emacs-devel@gnu.org; Fri, 24 Nov 2023 15:52:58 -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 1r6dAV-0002wl-NJ; Fri, 24 Nov 2023 15:52:57 -0500 Original-Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AOGHueK013877; Fri, 24 Nov 2023 20:52:49 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=0INnxg7daGJmlZBUGQYvfqofH5ykX6K63Smbc+BxWLs=; b=nbf4/CW0StzpboqhEseB3OEsSA3GYYD/sRHQvmMb0hpKEGYWzIsJSw2teZEnCOyuhmS+ q9Z3Gyui3E34E47n09GQGYKZWOO6Y9VPi5R+cRr8cl7aFWfq0/ckwlaAdnMe9xRdLIky 1jlEY4DYt8Ve9N6eKseuuPSI6Oq+m956q8uvIlrPHZzZPYL/W7tbTOe/VdAPLu6G9Kyd t4O483/PJSn8W0Wu9sRuRBOOlTd1HAxhVKMHsiO3GX+RsG1ywgI7TyKZFLFfVtc0LK9f ZDLp356md+b3n6xv/GI/EK0AO+5v0/7YHkE7ueIrtKt615PllrA20d2LHNh1dYDLXaUU Aw== 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 3uekv33smd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 Nov 2023 20:52:49 +0000 Original-Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3AOKT4Or011003; Fri, 24 Nov 2023 20:52:48 GMT Original-Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3uekqbysr3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 Nov 2023 20:52:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AQGZ7qU6/ZrpmcGCLfp97lazlbtDHh7Yuh5qebS8QsBWeFSF6mdzAZZeEYhOPMDcsj4UwqbxL8iB9LdH0Jc7w7bU76U2lqVk5OTYwmj2pHAUMJsWwu/KsBNHS7PQzPXfleO/zdNWv9TrIzwGhJ62qyK3h8uLrXS887f+uHBg23TkSUfuaYUC+HjvPApvve6SI6w22vCt7p3IhvowylXF6HZpjizGcKDSeR74QJNPSMpw29MQlgDTOS+wgLhNFJ1DyWQPR3Q1bEjbtRx4CTCeZFU+tDxMeiDwAzV653HjpGkKxpk52CDcqhXc3ZrQELrhFpoGF4LI+NesJNpYAn/kWg== 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=0INnxg7daGJmlZBUGQYvfqofH5ykX6K63Smbc+BxWLs=; b=Po9ZIm3uj3GxkMUsiwFSjTS4oCCQinLzImFQmFxoWPElEfccYuTmyNk+YoRfLHXwqQRy/Mz6ly1VEWL7WS/xQQjDt1nl0eWhwkhhwqgN/7BEhTZbrJwuvnQQvnrbXWkt37DvE0r+j8vOewVWCzeTMo9/Kg4jwFCaPKrrMpQP2CfGsZLAKnC3a7M2aew78ZmZY7I1D15NJkfxzGNTi37sPjX/Gmv0ezCTDQPdDHc11+g/3AZx0O5/cKg+u4KuabFAA54ep7tEHz9vu+O/w8oENpVB9f0ZlxXHPdhppPcNz37cBqNI5wclnQvs0XpgoDBu84Zqf4BIcVWyMa0tagaODw== 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=0INnxg7daGJmlZBUGQYvfqofH5ykX6K63Smbc+BxWLs=; b=WzNb9VKpD993kUkOL9Zk0Q+ofdlMq9saGihttor8Fzwbd11Kv8qlsnRul+Av1hqYzq+W04RjXK4Xsffm0iHIsCw1pkig3pQa5eAooYuEKgLkBjFasFfrXF+jL0gYFKvwXQyU1jPM8jNnmHTw38Me12O6NpzxArdasxaML4kPdd8= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by MW4PR10MB6346.namprd10.prod.outlook.com (2603:10b6:303:1ec::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.21; Fri, 24 Nov 2023 20:52:46 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::3b4c:a669:c229:47b4]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::3b4c:a669:c229:47b4%7]) with mapi id 15.20.7025.021; Fri, 24 Nov 2023 20:52:46 +0000 Thread-Topic: [External] : Re: Allowing completion sources to customize completion display Thread-Index: AQHaHwczNUe2uu4Edku9xYoRRlXN0rCJ5AKg In-Reply-To: Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|MW4PR10MB6346:EE_ x-ms-office365-filtering-correlation-id: 03771750-1c08-4434-aa51-08dbed2f4fef x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HadYp33oMCb45u6nG0ZKsOfMlb/qwhEgmhlRPchPRunL35gjZT7qJRzRxz5ZDLXpTLYONgJQMm6VN3tfvmXZRujlekN9P0qh5Lm8yHNLvk3vxORxS48atBenNrohGC7TDRyjQeKD+cxtR//w3bAqF5a+xCHBJAqrbPygBknovGbdHH9VO2+FYp77A+qm2sHGCOE1ey5qC+LJwwIoOEgakXVVHVkOjRib9izgGshrm+Y/dylhpOJnllPiDSZW5dhCU8lyPJ65ks+gP9FJVi/sYNF88IYjyy3Jrdo4Uh40NMTOYb/uH6iEenPA5bWoUeHvNc4FWiJbvynCTj1/Uw1ZGLKn/nWQRrd7QakVQ3NpsldgRe2KKcsQMGpl9T/arvqlwhWmQosFWnRflpSRPfVLB+/Qq6c942aaHJrGeMF6LHtOYN0haMKjGkmPQreqYDr7/EUtX52R1PojDKzU0jK87MHFdmhLA1hmLCFoI1Hn8Cc2t+MVH8D3MdFARsfM6LJTAAYOil4FL4evhN6Fpp0j3JpRyxzerBHNxikeFz51tROHllqOOmM/inbIgs/TY1RZx6gtS5dQUz58gBiTV3+VeIGwk0rnmafEGlLkfFSGgTu5bWUw1CNwOgd90jzcZWP9 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:(13230031)(346002)(366004)(376002)(396003)(136003)(39860400002)(230922051799003)(186009)(1800799012)(64100799003)(451199024)(110136005)(64756008)(66446008)(44832011)(66946007)(66476007)(54906003)(66556008)(76116006)(316002)(26005)(478600001)(38100700002)(8936002)(7696005)(6506007)(122000001)(4326008)(52536014)(8676002)(9686003)(55016003)(71200400001)(86362001)(33656002)(2906002)(5660300002)(41300700001)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?7qjC/UWkqR6/42RrwkX9UOMElf2MdIT7PrybgbwawxZHL7tGire1Y4je/hZH?= =?us-ascii?Q?Coj5FjTv6vU8Ohmz/bnkK24T9v8k9d4n1cn+la35b3alHuAV6JPSDFxy6iok?= =?us-ascii?Q?B2cHDpP3J28lb0kYZ4O92wzeUlJVwTonUtbFROevOVYlPW+m+4wFVMO0IDgK?= =?us-ascii?Q?Bv+VJ0i7x2jALV7NO05QRzw06fddQjh9znEDX6l2sr9RW2OmLZ6S4aVKhC19?= =?us-ascii?Q?K+xggI0yRoHwGgDo/GqJvTdPcKfVyYXc3+kZ8efsj7GoUd0YXkg9ZRhUYABW?= =?us-ascii?Q?GKNOiKGQd1d+IglwpUGRQPd2Jp5kZZp2vsG0LDnnJraBORj06hidgu6FaV+s?= =?us-ascii?Q?DX7YIhnYJ+kJrRvNuufRzmYxOjp7qOBMeLj8tuWwF5rnFtc+8kwSCBLVq3H7?= =?us-ascii?Q?d71oMOHEa7lUV+Sux9WnrtSl1ueR6BM5bvPPVBoRmy89owZe4GUor36Sdy/Z?= =?us-ascii?Q?X1lwvYQS95xHGfigJx5dUvLHsGVKw2qV0g9kvxOOk9t2w71kRlMJQcWo4kr6?= =?us-ascii?Q?spGgZVctfsSTasJAXBlshCZP9kmmU9JPV/EV2a2+/IqwL7OaDVo/Aph/+I0V?= =?us-ascii?Q?z+rFekgU5nYX8dI0+klY5EdIMxK2zfg0bGLYTesy5pK1P/Nq9qxjn91sMCbX?= =?us-ascii?Q?4o X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: LtdBRHeiIXRWl+0p3GWDUszqkjWZWerHCsbUexDCGzhiEqiZYH+LfWvfeGzBobUkcSI69BM+Mcyyvlj0jNUr6FYOQSU2OC6K3j4We7D9J6cDPrcJuMjk0eOLQ5RMAzKjLQcFIQyS9Uo5/Su//rI93JGGj2qarzkzMMDn1711vzNoKzGxpZ4AlCjEg66pyVgT38mzRPBp/GjsREY2yYTy1WJaNx8xTRac0nf5D6gQChRyIbe4H2MGzI5HOAdpX18UPNkQG83fqd6Rb+7nQsSl+RNhBQl2UFy1HAXTLybp0zHofOqPVyTKQdaSVmMjzMcgKne0ElYPNAQi079RjkeTT2as3hBQCfUEHsT7fSycAvsf33Td4jOWMaIe+IhHC+kAWb3i6uRD7zkr+bnNsix7M9MMwiW6jval6a6iPzNVX9M3yRqGUQQUbHjVJ0LQjxz50O05nAdmjeg95EFX8Ahy0OPeEklKhIZF9EDAiKAMDgMKfkOh1p5x+TPDhaFLqYethdCPKxThyz1Bed6rvE45fnrxqCGiF9VgfMkY6slstpO3CJMXqkep5f5aj2eXrF8iqlnYrF9EX1+PAPebYrcN9Un0j3qD3D2WE4H43Hc51c0M74vtMwe2dcHi5OV/1lVUwZeS/EYmXTsvawtrA6DeXH9NGhxddogK4dC3X+86gYSGXQPQHrgAkqHucew1Zw+Nl5/3WIsa7JSAcEvXaCEIV74Je09JOSGC3hEKe7DWDdMb1x RhtzvWKX3m53xzPsft+ebM1Vx4yg2XeZ90FGiN3o7/CdIR+ge7GDWQknA5hOG4Wm2vEwHbW697kM3FW9zmGwtuBT52VN3k61YM 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: 03771750-1c08-4434-aa51-08dbed2f4fef X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Nov 2023 20:52:46.3175 (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: Vgw42i3cFKfjWcXG3/8q9UWykCrLNPw0/oYpThB9LEb0mQw0vB4qSHY3owDQ9U1unB2jvoSqLVRZ+wIrJ+gD9Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB6346 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-24_08,2023-11-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 adultscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311240162 X-Proofpoint-GUID: mjzJkgxwXvA6jR7YN9YcpDUXH_KRFZhG X-Proofpoint-ORIG-GUID: mjzJkgxwXvA6jR7YN9YcpDUXH_KRFZhG 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:313184 Archived-At: > Now just separately speculating about what concrete options might be > nice to add at some point to the default completion UI, to get nice > inline preview behavior for multi-line strings... Perhaps two options: > - completions-ghost-preview=3Dt shows, in the buffer or minibuffer, a > grayed-out "ghost" preview of the currently selected completion > candidate. > - completions-multi-line-suppress=3Dt makes the *Completions* buffer > shrink down to just show completion-header-format and > completion-show-help whenever there's multi-line candidates among the > completions. (So you'd only have the preview from > completions-ghost-preview.) FWIW (I'm not following this thread) - Icicles has option `icicle-hide-non-matching-lines-flag', which you can toggle anytime during completion with `C-u C-x .': Non-nil means hide candidate lines that do not match input. This applies only to multi-line candidates in buffer `*Completions*'. Lines that do not contain text matched by your current minibuffer input are elided using ellipsis (`...'). Also option `icicle-hide-common-match-in-Completions-flag', which you can toggle during completion with just `C-x .': Non-nil means hide the common match for your input, in `*Completions*'. The common match used here is governed by option `icicle-expand-input-to-common-match'. It is elided using ellipsis (`...'). When you hide non-matching lines of completions or their common-match portions you still see all of the candidates. It's just that some of their text may be elided. Hiding common-match text can be especially useful when that portion of the candidates is large, as it often is with absolute file names having a common subdirectory. This is _not_ specific to any particular kind or category of completion. It's a question of what a particular user finds most useful at any given time. Do _you_ want to hide some candidate details right _now_, or not? As usual, my advice for this kind of thing is to give users control - don't just deciding on a "DWIM" behavior (which might be fine as a _default_ behavior but should not be the only one). Let _users_ decide what "I mean" means at any given time in any given context. A user option sets a user's preferred default behavior. But it's even more important to be able to control the behavior dynamically, by toggling or cycling among possible behaviors. It's good (imperative, really) to give users dynamic control. But it can also help to give them (and library writers) control over the default behavior of a _given command_. For hiding the common match among the current completions this is done by adding/removing property `icicle-hide-common-match' to/from a command symbol that uses completion. For example, by default command `icicle-locate-file' has (put 'icicle-locate-file 'icicle-hide-common-match t). But someone who wants that command to show common matches by default can put this it their init file: (put 'icicle-locate-file 'icicle-hide-common-match nil) HTH.