From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 6GwPBSgQFGLsVAEAgWs5BA (envelope-from ) for ; Mon, 21 Feb 2022 23:20:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 2PBwOScQFGKihAEAG6o9tA (envelope-from ) for ; Mon, 21 Feb 2022 23:20:23 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (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 61DC413873 for ; Mon, 21 Feb 2022 23:20:23 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 3097A5F5F0; Mon, 21 Feb 2022 22:20:20 +0000 (UTC) Received: from smtprelay02.ispgateway.de (smtprelay02.ispgateway.de [80.67.18.14]) by mail.notmuchmail.org (Postfix) with ESMTPS id 3433A5F5E5 for ; Mon, 21 Feb 2022 22:20:17 +0000 (UTC) Received: from [46.244.205.42] (helo=condition-alpha.com) by smtprelay02.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nMH2V-00076y-Ul; Mon, 21 Feb 2022 23:20:16 +0100 Message-Id: From: Alexander Adolf To: Tomi Ollila , Utkarsh Singh , Notmuch mailing list Subject: emacs: notmuch-address-command 'as-is throws error (was: [PATCH] emacs: Add more front ends for address completion) In-Reply-To: <115f4649ac25dff4073a32dba70e6db7@condition-alpha.com> References: <87bkzhbez9.fsf@gmail.com> <115f4649ac25dff4073a32dba70e6db7@condition-alpha.com> Date: Mon, 21 Feb 2022 23:20:15 +0100 MIME-Version: 1.0 X-Df-Sender: YWxleGFuZGVyLmFkb2xmQGNvbmRpdGlvbi1hbHBoYS5jb20= Message-ID-Hash: MXWOHTUH2YHFCTVOU2BJ4RS7JDC4SC4Q X-Message-ID-Hash: MXWOHTUH2YHFCTVOU2BJ4RS7JDC4SC4Q X-MailFrom: alexander.adolf@condition-alpha.com 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=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645482023; 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; bh=Z6h0VjTDIkkiXI7/Pyxb0qASTybCgSpIg788F4QFcq8=; b=Lvm1t14DE/amTeGfv60wXuYah+mQ1XEB/m+SKgz5JyKoOmhy1MN4maHmAi/IvIFQIbZGwP yFU6Jls5/89uUmqRrm7+v0KuAuwqjbRHTnb3qNzOQbRdkC4iQ7FdtpRTkcQMbqE5EI4Xee +XfJRZnSteeu/AdizPoP55NI/nnjtZy/2Z2vE9poTIphAH4Hy4OjN/jcaeGXbF0a20Tpkq VLYcj+7XlJb0ZnfNeyia0Wxclt1zvBnoESWqp3R36uUgThKR43k1ozj6cK7R5Ee3vmGYrp cXT1xT4AtfdmhF7ANZNjoaiito8UrrG4/u/IubdyFgxERg+NVTNm66zcu17dvw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645482023; a=rsa-sha256; cv=none; b=L37tTowaTX+opYtBw04OqYTWyjuezzvloJclNkkMpSNhxvlI0zpak7ga175eOZVOSYOAR5 jXLCAVfkjaMMIVhF4Ms63mkYgSm91yYALIG+wYO4AOMEqk9g31Ij1pky0i6X1e86XVNKtH 4NEaOrTCWqTb0JsuPVvWnaaXSxLt09QbXqre0nyGMLM7Mugw1w7UXs2DPODXgUXIPJpXbs vkHrIXPURz5TEOyt+G4GWQwD6+rK7GXY8YX8Y86WMTWGXywAgAGOxMCpfXNGlGGmfyPViM 59Z6cObCIoPSV28793pXS000Dzv62CC9nbe1JzdEtMvmfdUjVLjCh6nMNbAC+w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -3.84 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 61DC413873 X-Spam-Score: -3.84 X-Migadu-Scanner: scn0.migadu.com X-TUID: owq21HYM4br7 Alexander Adolf writes: > [...] > Hence, from my personal point of view, moving _all_ completion to go > through completion-at-point-functions seems the only reasonable way > forward. > > That would remove any special cases for when company is available from > the elisp. Fewer third-party integrations, fewer headaches. > [...] I have further ventured into this, and am attempting to disable all company-related stuff in notmuch-address.el, and instead go through completion-at-point-functions, and use corfu as the completion UI. To achieve this, I have set notmuch-address-use-company to nil, and notmuch-address-command to 'as-is. The latter setting (notmuch-address-command 'as-is) evokes an error: "Wrong type argument: stringp, as-is". The backtrace led me to marvel at the function notmuch-address-options (in notmuch-address.el). There, in case notmuch-address-command is not equal to 'internal, control is passed to notmuch--process-lines, which in turn uses 'as-is (a symbol) as the name of an external program to call. The name of that command is expected to be a string, and hence the "wrong type argument" error. The docstring for notmuch-address-command does not really state any other effects of 'as-is besides preventing modification of message-completion-alist (which is what I want, and to keep using the internal mechanism). The defcustom option for 'as-is is cunningly labelled "Use default or third-party mechanism", which doesn't tell me much more either. Am I misreading notmuch-address.el and/or the docs? In case not, how can I prevent modification of message-completion-alist by notmuch, and still have notmuch use the 'internal mechanism for generating address completion candidates? Many thanks in advance and cheers, --alexander