From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sC8gKE5NBWImzgAAgWs5BA (envelope-from ) for ; Thu, 10 Feb 2022 18:37:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id gNHFJE5NBWKQVAAAauVa8A (envelope-from ) for ; Thu, 10 Feb 2022 18:37:18 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 446372A0C8 for ; Thu, 10 Feb 2022 18:37:18 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 022575F716; Thu, 10 Feb 2022 17:37:16 +0000 (UTC) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) by mail.notmuchmail.org (Postfix) with ESMTPS id CCB725F402 for ; Thu, 10 Feb 2022 17:37:12 +0000 (UTC) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id AFE7F1B002A8; Thu, 10 Feb 2022 19:37:11 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1644514631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rkQEUMt31ONn/9RwDvkpSoBsfsLUW0FJkEakLjS8TTc=; b=VRDfw/rG5u4qDm0zn7bJ9Ox5WpPP3tu5PFEhrmlz53o9WfnJS911Sk87v6MXOvykwsy2Dj MQk/5OpVGrZPxokYcxgOP2fUEuqq/MIG3rktd2UOFWOPl6AfsBOCBNK5h29N/eungKkez5 NbvXBcsNwLqyGa+aKzL0vrWaST15+wXNLqBOFq/S7ZHqR7oR7XND49z2lyt6gLxtT/z4Xx n5n1dYTvJBdRWcPCyCx2j/ERCrFa0daigrjFJxIOepvU+7EpOqIkjOr8fZbvJi1n2fa7Wp bchcU7i/fIOrubIJvN6LgIjdT5MXDwA+KkNLeCwfdD9oOYz8lMqLXEXZHiYg8g== From: Tomi Ollila To: Utkarsh Singh , Notmuch mailing list Subject: Re: [Utkarsh Singh] Re: [PATCH] emacs: Add more front ends for address completion In-Reply-To: <875ypnxutj.fsf@gmail.com> References: <878rujxuvi.fsf@gmail.com> <875ypnxutj.fsf@gmail.com> User-Agent: Notmuch/0.35+4~ge2bb4cd (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1644514631; a=rsa-sha256; cv=none; b=UBSYRTXUvID878l/Ie407Y8cNTQHAEEmIPasnFwYYYKprEWilMbGS+PoIYgI3PSUzX8b35 3IHwdtbhBzXeZGBxQbQZtoWMwdmOpb2yENDo+KyLo5Arke2u6IZvCe26KZQCGItYrzF1th 2n6TtMRuwOu7bVi4P/rRj8BorF95++LJ7izkafx4BO12oCEryTPHqJ1Wpio2JiXrOQ7+pe VFz/UzEf6WbcyueVfPVcMDUVvLXGrTpM/3loLqTr6KJx0uBQowNtGLnqRd+WJ1UK/bQIKL VSt3Q5sZSbm60ir2k+LxHQcVOwZa+A6BrHFMx0NZQrdAeOeGKba5vEIbna9EIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1644514631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rkQEUMt31ONn/9RwDvkpSoBsfsLUW0FJkEakLjS8TTc=; b=iVS/fYtPUpHYqVbwduoOp5YIs81EWWyGMMgEmKSVihK3wwwJOMYbgK/zzaMtT6HdbzcNjh VOhPGbupwzomO0u+qUYr6F4T50V2KLkKV4BZU7RBFhWOMrlO36kOhRaKRuygFGmpBqUELA Vge8O6GEz+bRIsNIcEb6pmnltV7CEVrFNNYOArlMU6paghKBhIH9hklk4qhLe2QckOC0Sq 8NkUR+7fQ1qoBY3zrchrMlOMqACl7WhcN8x95KBJDCWfz9uxNl/P8ShUc6XYrzejZhMflw VKZJxk+Oomh6TcauMmLvKPLdMU4FRvELQX6rYJWGJ1Pgu+nR3Xv8ON4WHw+e8w== Message-ID-Hash: FSAJSNPO4I6HLYNPOQ3TT2CDE6MVBN2C X-Message-ID-Hash: FSAJSNPO4I6HLYNPOQ3TT2CDE6MVBN2C X-MailFrom: tomi.ollila@iki.fi X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644514638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=a5C7j4cyij7K1LJa+NLvSmbUWeJvl8Z9JvGoj0qtHTU=; b=WZw5KKAIA/oKVm4wUzf6P+T45w8wVS/dba2VPhLYmbtTQqD1GuSW9K5XHeih69Yb5pLohx CWjXt0D3gpZVj2v4Cy1taRIVOUjv+Lcsk+4ZL5xnrib9icuXyLdF4xPkP+UJzoZ4We8XcN I3SCVZF0YlPY4/j831SkCeZRVseHq/DcqC15AmPvKBtJ7M0b9FaBaYaVqQnhGdvmmXlT5n CeDJqRd1/kdNIWwP1tLoWT0Sdkn3pSEIrSSLaSUK33Ar2pHhVAFAX8AadWs30633Ldu1pY ISV9CmkZ6nAc6GmoXqLWXRzYJcu+gW7d99DoyshzB3q09Mrz3a6j6MFv4zAuNA== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1644514638; a=rsa-sha256; cv=fail; b=ZTuutEBbFzf+50gV/orH8Dtaw+aEs22M8H4OvvLKbiNXsN51/ndVX/1VdMpEzU9GacVFud LVnL33Pi7xWJYrdKFF1mRepleR22T+Ss5nfDRX3R/GOnZF2TDvuy+5rwKhrQPEZP4qpbK8 kq1m3Y+IeScMCMyP90YnzrTvsaHPfQumm+2LCZ9YVoq4uk7ZxV/at/zZFLzO6jNuEAkDqq EsyVaWt5fGcwEf3e4sMfY/ZbjuUj/8yuDSCKPSSnXdNrnhZos/LOyi0bUJhOeQYmRekklF eRFDlyiQmg1I1BA2vGU4M78+D4moMFVklQbZSc1bGp73mTpfvFg2DslfwbscfA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b="VRDfw/rG"; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.84 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b="VRDfw/rG"; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 446372A0C8 X-Spam-Score: -0.84 X-Migadu-Scanner: scn0.migadu.com X-TUID: 67Ilah5Y1Khb On Thu, Feb 10 2022, Utkarsh Singh wrote: > -------------------- Start of forwarded message -------------------- > From: Utkarsh Singh > To: Tomi Ollila > Subject: Re: [PATCH] emacs: Add more front ends for address completion > Date: Thu, 10 Feb 2022 08:58:49 +0530 > > Hello Tomi, > > On 2022-02-09, 23:59 +0200, Tomi Ollila wrote: > >> On Tue, Feb 08 2022, Utkarsh Singh wrote: >> >>> Hello maintainers, >>> >>> Emacs Lisp Package Archive (ELPA) now includes a package called 'corfu', >>> according to its documentation: >>> >>> Corfu enhances the default completion in region function with a >>> completion overlay. The current candidates are shown in a popup >>> below or above the point. Corfu is the minimalistic >>> ~completion-in-region~ counterpart of the >>> [[https://github.com/minad/vertico][Vertico]] minibuffer UI. >>> >>> Hence, this patch tries to add support for `completion-in-region' in >>> `notmuch-address-expand-name'. By default, this behaviour is turned off >>> so that existing users can enjoy existing completion techniques. >> >> The current "default" (i.e. w/o any notmuch emacs mua configuration) is to >> use completing-read to do the completion. If "company" is available, then >> company is used by default (w/ all address harvesting and so on...). >> >> This is "messy" enough ;( (i.e the notmuch-address-selection-function >> is called if company mode is not available or notmuch-address-command >> is a string instead of 'internal or 'as-is (or whatnot, too tired to do >> deep investigation there ;/) >> >> This change, contributes even more "complexity" there. To keep the >> complexity to the same level would be adding more >> notmuch-address-selection-functions and have the defcustom there list >> the options (also probably the name of notmuch-address-selection-function >> would need to be changed to notmuch-fallback-address-selection-function >> ;/) >> > > I think, in general, you're right about the complexity and we should try > minimize it. But this patch was originally derived from a bug I was > experiencing with `(global-corfu-mode 1)' in `notmuch-message-mode'. Is global-corfu-mode changing how completing-read works ? > Here are the steps to reproduce the bug: > > 1. [Install](https://notmuchmail.org/#index7h2) `notmuch`. > 2. In emacs -Q session, evaluate the following When doing in notmuch repo, one can execute ./devel/try-emacs-mua -Q ... which probably uses the same package database (under $HOME) as any other emacs invocation would do -- what is the way to change the location of that in order to have chance to have "empty" set of externally installed packages, and messing with it would not touch the "default" packages... (so that I can try the steps below) Tomi > > ```elisp > (progn > (add-to-list 'load-path "/usr/share/emacs/site-lisp") ; Notmuch Emacs interface > (package-initialize) > (package-install 'corfu) > (package-install 'vertico) > > (require 'notmuch) > (require 'corfu) > (require 'vertico) > > (vertico-mode 1) > (corfu-global-mode 1) > (notmuch-mua-new-mail)) > ``` > > 3. Press `TAB` to generate address completion, then press `RET` to > select address of your choice. After selection, you will notice that > `notmuch-address-expand-name` fails to insert desired address, that is, > you will get the following: > > ``` > To: > ``` > > Note: Check the trailing spaces. > >> All this said, I think this is not simple to solve, as this otherwise fine >> change would indicate :/ > > No problem, I'm willing to help the maintainers on this matter. > > -- > Utkarsh Singh > https://utkarshsingh.xyz/ > -------------------- End of forwarded message -------------------- > > -- > Utkarsh Singh > https://utkarshsingh.xyz/ > _______________________________________________ > notmuch mailing list -- notmuch@notmuchmail.org > To unsubscribe send an email to notmuch-leave@notmuchmail.org