From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Allowing completion sources to customize completion display Date: Thu, 23 Nov 2023 16:44:47 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21887"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: Spencer Baugh , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 23 15:45:55 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 1r6Axm-0005Vj-Of for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Nov 2023 15:45:55 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6Awr-0003e3-23; Thu, 23 Nov 2023 09:44:57 -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 1r6Awp-0003dq-5n for emacs-devel@gnu.org; Thu, 23 Nov 2023 09:44:55 -0500 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6Awm-0006Gc-2B for emacs-devel@gnu.org; Thu, 23 Nov 2023 09:44:54 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 198855C01E5; Thu, 23 Nov 2023 09:44:51 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 23 Nov 2023 09:44:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1700750691; x=1700837091; bh=tTglkkkWtbwRfWe4GuJ3OWjr66SjoaCQQLq HzX6yowc=; b=jGA821jpp2UB+iV8GReqYDYEnvxqEda3+NaFM99ytwD2PzlxmE9 diMEagcW8IjfTUaMHJwfZ54iTZnyk/95Bytv7FJ5d4EpYdv+j65QAFT8FiIqs/gu n6yhH1aVZ7+ZJuV3oNGtjl8BYkRfjLni5aLRFfSveMoN3U9F+sUNBVnT9OayLMZ7 NLuVHh7mDutGqS8uauYaQ9JwZiGtM4sB8rU8w/VZo2umNADp/6JM8i+kFG5cycuO 6DKSyre3mxx4IKb7o9mZdG+zE/72mXgJ+fn+cFndZxuUKkZIhtxuIhBF6mHySIqO I40sCt1ZwKYt+pBjT8YvOSUmLBGP/DHrz6Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1700750691; x= 1700837091; bh=tTglkkkWtbwRfWe4GuJ3OWjr66SjoaCQQLqHzX6yowc=; b=f F6X59LKkYeeYdVLZEVZV/k4trpnCXVX2WbffM+aTePFBW+/Qb0xo5rVWz38ig5RI wzCimRjtTprSe9/guCrtGjPGk+vDnigntWSmdrkHgOnNzHdX8KQESEEt5xhfP221 /IoH6uRyd56Efknbo+ewcEW/77ekBnm15wgXPTs5OuEx5FLxO322VpOy2mDFrptc 99VhqseZ4BxLUUCGIiagN7t1d0OmzJfFpKVgqDd9Ze/HrtNfGkV7m60GM/5bMMwb z7tdcBnMrxSFECSHCW67WjsiezIF3NuH9o67tgG3Il5TlP8TfVAb2y5RjBsks9sn zsQ/SDnt6rDuT8q0BstDQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehfedgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeghedthedujeeiteeutddtjeekheejteeukeehffdutdejuedvfeevueeviedu udenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Nov 2023 09:44:49 -0500 (EST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=66.111.4.26; envelope-from=dmitry@gutov.dev; helo=out2-smtp.messagingengine.com X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 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, NICE_REPLY_A=-1.672, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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:313156 Archived-At: On 23/11/2023 01:05, Spencer Baugh wrote: > But the same completion-in-region-function and UI has to be used > regardless of whether I'm getting symbol-completion or block-completion > - I don't see a way to change completion-in-region-function based on the > source. completion-in-region-function accepts COLLECTION, right? That's usually the completion table. From there, you can access the table's metadata and see its category or etc (if you control the table, it could contain some additional distinctions). So your custom completion-in-region-function could look up metadata and dispatch to one of the two specific interfaces, couldn't it?