Re: [PATCH] emacs: don't add space to tag completion candidates.

2021-12-04 Thread David Bremner
David Bremner  writes:

> 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.

Applied to master. I will let it sit there a while before release, but
if it ruins your life, please let me know.

d
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: [PATCH] emacs: don't add space to tag completion candidates.

2021-10-31 Thread Tomi Ollila
On Sat, Oct 30 2021, David Bremner wrote:

> "inwit"  writes:
>
>> Works as expected under selectrum! Thanks!
>>
>>
>
> right, I guess the question is how annoying it is for users of standard
> emacs completion. I generally enter one tag at a time, so it won't
> really affect me.

I recall doing adding many tags, but very seldom. I'd guess the need to
press space before entering next is tolerable (basing my guess on my
experiences w/ various experiences w/ filename completion...)


>
> d

Tomi
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: [PATCH] emacs: don't add space to tag completion candidates.

2021-10-30 Thread David Bremner
"inwit"  writes:

> Works as expected under selectrum! Thanks!
>
>

right, I guess the question is how annoying it is for users of standard
emacs completion. I generally enter one tag at a time, so it won't
really affect me.

d
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: [PATCH] emacs: don't add space to tag completion candidates.

2021-10-29 Thread inwit
Works as expected under selectrum! Thanks!


On Sat Oct 23, 2021 at 7:05 PM CEST, David Bremner wrote:
> 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
> ___
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-le...@notmuchmail.org

___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[PATCH] emacs: don't add space to tag completion candidates.

2021-10-23 Thread David Bremner
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
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org