]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: don't add space to tag completion candidates.
authorDavid Bremner <david@tethera.net>
Sat, 23 Oct 2021 17:05:24 +0000 (14:05 -0300)
committerDavid Bremner <david@tethera.net>
Sat, 4 Dec 2021 16:56:43 +0000 (12:56 -0400)
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

index 536315e9a788f7ae10dc2a58750fb99e1f874584..145f309f83be9b4525499f85eed042a2fb759654 100644 (file)
@@ -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