From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron Newsgroups: gmane.emacs.devel Subject: Re: master 47e313e9805: Unbind 'C-M-i' in Text mode Date: Wed, 06 Dec 2023 14:56:41 +0100 Message-ID: References: <170099515102.15929.4538081255360222923@vcs2.savannah.gnu.org> <20231126103911.6CEAFC25D5B@vcs2.savannah.gnu.org> <75c363c1-0dfd-c223-74f1-d98af65b3094@gutov.dev> <4db81b72-9a95-0d66-d623-31002ecdff08@gutov.dev> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28537"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 06 14:57:49 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 1rAsPN-0007EE-Jv for ged-emacs-devel@m.gmane-mx.org; Wed, 06 Dec 2023 14:57:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAsOP-0003UV-Nf; Wed, 06 Dec 2023 08:56:49 -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 1rAsON-0003UD-Eo for emacs-devel@gnu.org; Wed, 06 Dec 2023 08:56:47 -0500 Original-Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAsOL-00066r-TE for emacs-devel@gnu.org; Wed, 06 Dec 2023 08:56:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1701871004; bh=6dPxUEEILHW6oqtlhlbaVh9GuV6A2Xit5bNeB5MEnqE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Txb0LCT7d9dVW8rUUZZp9vG7ingRtu8XKDVS3XLlO/shT2/uBNtTYgN7UwE0FGxB/ WBDunpNtySMuPqiYglC3YOEj84IYAyKAiN4HAxKrWnJ+B42FfRJ99svm7f7RAeCMkV usoSnIqg9AUeqCM/39VdRXwsrjBeNT3nn6Gwh5xu6xRYI4fMBirwnnz4JsGwnH8m40 Y9q4/9BdVy24K707IwqqXz+r+2YPeiv6tpeOGv9h6FSbySa7ofiBRiOLqRhgbNFclV Ue6He1J4XINoovln6NQzq8AsTmBwGM08UmR4ZT3dWJSBXSipSSpEfvbtgUd0kyVBNc CHlvQfrhWFVjQ== In-Reply-To: <4db81b72-9a95-0d66-d623-31002ecdff08@gutov.dev> (Dmitry Gutov's message of "Wed, 6 Dec 2023 14:45:27 +0200") Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.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, 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:313560 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dmitry Gutov writes: > On 06/12/2023 09:53, Eshel Yaron wrote: >> Hi Dmitry, >> Dmitry Gutov writes: >> >>>> +(defun ispell-completion-at-point () >>>> + "Word completion function for use in `completion-at-point-functions= '." >>>> [...] >>>> + (list beg end (cdr all) >>>> + :annotation-function (lambda (_) " Dictionary word") >>> >>> I have to say that "Dictionary word" is not a great annotation: it's >>> long, longer than most of the completions coming from that backend, so >>> these words, repeated, constitute most of the text inside the >>> Completions buffer. And it's the same string for all completions. >> I see what you mean. How do you feel about the following >> alternatives? >> - "Word" >> - "Dict" >> - "Spell"/"Ispell" >> - "=F0=9F=95=AE" >> - No annotation at all >> - One of the above, and make it configurable > > My preference would be "no annotation at all", if we're talking about > simple solutions. Fine by me. I'm attaching a simple patch that does that. > The fourth option was a newspaper emoji? Well, it's supposed to be a book, you get it with `C-x 8 RET book RET`. > I think the more comprehensive approach here would be to implement > support for `:company-kind` in the default UI, and then return `text' > in that function. I agree, that would be nice in general and help here too. For this case I was also thinking about using the common part-of-speech of each word as its annotation (e.g. "n" for nouns, "v" for verbs...) but we don't get that information from the spelling dictionary, unfortunately. Here's that patch: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Remove-long-annotation-for-word-completion-candidate.patch >From 5055fd663b3e82d752ae7aa3d0cad5d0ea4f87a6 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Wed, 6 Dec 2023 14:41:56 +0100 Subject: [PATCH] ; Remove long annotation for word completion candidates * lisp/textmodes/ispell.el (ispell-completion-at-point): Remove ':annotation-function' from return value. --- lisp/textmodes/ispell.el | 1 - 1 file changed, 1 deletion(-) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 4c3b22281bd..2c387342026 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -3699,7 +3699,6 @@ ispell-completion-at-point (setcdr cur (cddr cur))) (setq cur (cdr cur))) (list beg end (cdr all) - :annotation-function (lambda (_) " Dictionary word") :exclusive 'no)))))) -- 2.42.0 --=-=-=--