Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Results are not filtered properly #31

Open
mpldr opened this issue Sep 7, 2022 · 3 comments
Open

Results are not filtered properly #31

mpldr opened this issue Sep 7, 2022 · 3 comments
Labels

Comments

@mpldr
Copy link

mpldr commented Sep 7, 2022

What is returned:

$ notmuch-addrlookup robin
"Robin John"  <[email protected]>
<[email protected]> <<[email protected]>>

What I'd expect:

$ notmuch-addrlookup robin
"Robin John"  <[email protected]>

I am also not too sure on the double angle brackets around the mail is actually valid; it happens for some mails, but not all.

@aperezdc aperezdc added the bug label Sep 8, 2022
@mpldr
Copy link
Author

mpldr commented Sep 8, 2022

Update: My email client (aerc) does not like the angle brackets; I have to grep -v them away

@ferdinandyb
Copy link
Contributor

Hmm, is the regex here at fault?

@mpldr
Copy link
Author

mpldr commented Sep 18, 2022

I couldn't tell if my life depended on it. While I like reading & writing regexes, these have way to many backslashes in them.

My idea to solving this (while being not at all familiar with the codebase) is to trim the resultlist by checking if an email without a name is already present. A hashmap would come to mind, but my C skills are not nearly advanced enough to even attempt this.

Basically, everything not matching (.+) <([^ ]+)> should probably not be considered as an email address with a name attached. (angle brackets and spaces around "pure" addresses should still be removed though)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants