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

Mutt queries and multiple emails #20

Closed
pigmonkey opened this issue Apr 11, 2013 · 5 comments
Closed

Mutt queries and multiple emails #20

pigmonkey opened this issue Apr 11, 2013 · 5 comments
Assignees
Labels

Comments

@pigmonkey
Copy link
Contributor

Let's say I have a contact joe with multiple emails.

$ ppl show joe
Joe Schmoe <joe@somewhere.com>

Email Addresses:
    joe@somewhere.com
    joe@elsewhere.com

The Mutt query only returns the contact's first email.

$ ppl mutt joe
Searching address book... 12 entries... 1 matching:
joe@somewhere.com        Joe Schmoe

I need the query to return one entry per email so that I can select which address to use in Mutt. Such as:

$ ppl mutt joe
Searching address book... 12 entries... 2 matching:
joe@somewhere.com        Joe Schmoe
joe@elsewhere.com        Joe Schmoe
@henrycatalinismith
Copy link
Owner

Ah, I see. I'll sort this out ASAP. Thanks for letting me know!

henrycatalinismith added a commit that referenced this issue Apr 11, 2013
…just one

This is for #20. It seems like this is the way you're supposed to
implement this for integration with mutt.
@pigmonkey
Copy link
Contributor Author

This now works fine in 1.16.0.

The only issue is that the first line still returns the total number of contacts and the total number of matching contacts. This doesn't impact the functionality, but may be confusing for some users.

$ ppl mutt joe
Searching address book... 12 entries... 1 matching:
joe@somewhere.com        Joe Schmoe
joe@elsewhere.com        Joe Schmoe

There is 1 matching contact, but ppl is returning emails, not contacts, so there are 2 matching values. I may have only 12 contacts, but I have more than 12 total emails for those contacts.

I think it makes the most sense for ppl to report something like:

Searching address book...18 emails... 2 matching:

Or the total number of contacts could still be reported:

Searching address book... 12 entries...18 emails... 2 matching:

@henrycatalinismith
Copy link
Owner

Agreed. To be completely honest, I simply didn't stop and think about that "one line message" when I was implementing this.

I like your first suggestion the most. It gets rid of that vague word "entries" (which I copied from the documentation without much thought), and it's clear what both numbers are about. Plus when you're using this functionality to find email addresses, what you're probably interested in are the sets of email addresses and matching email addresses. Let's run with that. Unless any bugs come up in the meantime, this will be 1.16.1.

@pigmonkey
Copy link
Contributor Author

I feel like I'm causing a lot of version bumps!

@henrycatalinismith
Copy link
Owner

It's very welcome, man. I'm a big fan of "sweating the little things" when it comes to little details like that "Searching address book" message above. And the feature requests are good stuff too. For a project as esoteric as ppl, it's actually just nice to know that people are even trying it.

henrycatalinismith added a commit that referenced this issue Jan 6, 2022
…just one

This is for #20. It seems like this is the way you're supposed to
implement this for integration with mutt.
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

2 participants