* notmuch-search-get-tags unique candidates
@ 2018-03-21 21:21 Nicolò Balzarotti
2018-03-23 10:27 ` Jani Nikula
0 siblings, 1 reply; 2+ messages in thread
From: Nicolò Balzarotti @ 2018-03-21 21:21 UTC (permalink / raw)
To: notmuch
Hi, I'm using notmuch with emacs and I'm loving it. One thing I don't
like is that in `notmuch-search`, when applying a tag to a selection the
tab completition return multiple copies of the same tag. Example:
> -inbox
> -lists/aaa
> -lists
> -inbox
> -lists/aaa
> -lists
I changed `notmuch-search-get-tags-region` to:
```(defun notmuch-search-get-tags-region (beg end)
(let (output)
(notmuch-search-foreach-result beg end
(lambda (pos)
(setq output (append output (notmuch-search-get-tags pos)))))
(delete-dups output)));; add delete-dups before returning
```
Why is the current one the default behavior?
Thanks, Nicolò
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: notmuch-search-get-tags unique candidates
2018-03-21 21:21 notmuch-search-get-tags unique candidates Nicolò Balzarotti
@ 2018-03-23 10:27 ` Jani Nikula
0 siblings, 0 replies; 2+ messages in thread
From: Jani Nikula @ 2018-03-23 10:27 UTC (permalink / raw)
To: Nicolò Balzarotti; +Cc: Notmuch Mail
On Wed, Mar 21, 2018 at 11:21 PM, Nicolò Balzarotti
<anothersms@gmail.com> wrote:
> Hi, I'm using notmuch with emacs and I'm loving it. One thing I don't
> like is that in `notmuch-search`, when applying a tag to a selection the
> tab completition return multiple copies of the same tag. Example:
>
>> -inbox
>> -lists/aaa
>> -lists
>> -inbox
>> -lists/aaa
>> -lists
>
> I changed `notmuch-search-get-tags-region` to:
> ```(defun notmuch-search-get-tags-region (beg end)
> (let (output)
> (notmuch-search-foreach-result beg end
> (lambda (pos)
> (setq output (append output (notmuch-search-get-tags pos)))))
> (delete-dups output)));; add delete-dups before returning
> ```
>
> Why is the current one the default behavior?
FWIW, I can't reproduce the behaviour you describe.
BR,
Jani.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-23 10:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-21 21:21 notmuch-search-get-tags unique candidates Nicolò Balzarotti
2018-03-23 10:27 ` Jani Nikula
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).