From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uNG/LuNAdGHZKAEAgWs5BA (envelope-from ) for ; Sat, 23 Oct 2021 19:05:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6P5mKuNAdGGyOgAA1q6Kng (envelope-from ) for ; Sat, 23 Oct 2021 17:05:39 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (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 830B0B11F for ; Sat, 23 Oct 2021 19:05:38 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 4D93D2C1D5; Sat, 23 Oct 2021 13:05:34 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id CD6F62C1C4 for ; Sat, 23 Oct 2021 13:05:30 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 913AD5FC42; Sat, 23 Oct 2021 13:05:30 -0400 (EDT) Received: (nullmailer pid 1897974 invoked by uid 1000); Sat, 23 Oct 2021 17:05:29 -0000 From: David Bremner To: Tomi Ollila , David Edmondson , David Bremner , Alan Schmitt , notmuch Subject: [PATCH] emacs: don't add space to tag completion candidates. Date: Sat, 23 Oct 2021 14:05:24 -0300 Message-Id: <20211023170524.1897961-1-david@tethera.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: CWMY2G57PBYVCTUBIM3L7SAE4BK6QG7P X-Message-ID-Hash: CWMY2G57PBYVCTUBIM3L7SAE4BK6QG7P X-MailFrom: bremner@tethera.net 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; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635008739; 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-unsubscribe:list-subscribe:list-post; bh=TyEt/P3FNDLeRvyIAjh34pU5/5fEf8Q1wIEDDHFvmn4=; b=IcBU2PR9qu3CMJsbLAA5q5FInOphr8JNCTOKV8m0k73HDoi2XYz3eCNNsvKDN8lOEI+qE1 Ogj7YHGL0r3CUymkYNsuf2WRw5geOrNIjOSKautS4gEezY0xrSQvyBEJWQ+2aBlip3SnM5 xpX9U0xgFk+FSAEmuCS3C8dvODZaFjXCyAzqHsIIaIBqTh+NohE5DBCHjirEe5tV9fjTer 2mpN0Tz3L/DPxQu4arq99z1jMEeNQtVBfkEnXdcX5NseM2smk0gUNa4ToNxRkPw+G6xVd5 NaZC4F3raC4H8UQeUUWhdmkK5ni3CfaHO3R6+uc1SdVl2WjNeeCkygxeFDwGPQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635008739; a=rsa-sha256; cv=none; b=D0iHcQT/MWRLVIJw1tjS4dEwrCURA3+qUKI/CU6Kde0ZoDoVbNcGEuAXMIsoFJmWZXsYO6 GB6+AyDKgTqfRuURQMYeUXOB9SXcBYUn7i6UzDuOvWyUFpGxs5eVD0tJ6Sm9AEb7Wt9h6X yKfMkJcrogu+c9OOs5We22XngEVzpNEwDP7xwSlCWdGp9tul4Yw0Ss8h5qGKPXxkyQ0f2R cOZrdAicuTtOaF2EO5ncHoVCMr5ErAICMvi1vH31T1GddMsLxRgFZWbhyQPISz5lH353jo Gbxo56XOz/rndp5EWUF18w5g8mPIjYgnbDrQU710hvBokOiwNTnB2riOYctytg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.98 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 830B0B11F X-Spam-Score: -0.98 X-Migadu-Scanner: scn0.migadu.com X-TUID: /5Ah+jgpCZ4Q Apparently this messes up various third party completion frameworks. This change does mean that users will have to hit space after completing a tag change in order to enter another change. As a bonus, remove the call to #'delete, since completing-read-multiple already promises to remove empty strings. --- emacs/notmuch-tag.el | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el index 536315e9..145f309f 100644 --- a/emacs/notmuch-tag.el +++ b/emacs/notmuch-tag.el @@ -429,17 +429,9 @@ initial input in the minibuffer." (set-keymap-parent map crm-local-completion-map) (define-key map " " 'self-insert-command) map))) - (delete "" (completing-read-multiple - prompt - ;; Append the separator to each completion so when the - ;; user completes a tag they can immediately begin - ;; entering another. `completing-read-multiple' - ;; ultimately splits the input on crm-separator, so we - ;; don't need to strip this back off (we just need to - ;; delete "empty" entries caused by trailing spaces). - (mapcar (lambda (tag-op) (concat tag-op crm-separator)) tag-list) - nil nil initial-input - 'notmuch-read-tag-changes-history)))) + (completing-read-multiple prompt tag-list + nil nil initial-input + 'notmuch-read-tag-changes-history))) ;;; Tagging -- 2.33.0