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

mates search should have option to indicate email address type when doing mutt search #11

Open
divansantana opened this issue Jun 14, 2015 · 7 comments

Comments

@divansantana
Copy link

When using mutt search would be nice to display additional detail to indicate which email address this is, work or home or other.

Perhaps it doesn't have to be the default and be configurable......
As some contacts have multiple email addresses it's nice to see which email address for a particular contact this is.

Khard does this by default:

bob@home.com        Bob Nobody     home
bob@workdomain1.com        Bob Nobody     work
bob@example1.com        Bob Nobody     other

I like that mates search is so blazing fast :)

@divansantana divansantana changed the title when using mutt search display additional detail to indicate which email address this is mates search should have option to indicate email address type when doing mutt search Jun 14, 2015
@untitaker
Copy link
Member

Mates is quite fast but I fear I'll have to rewrite it because it's become very hard to implement a trivial feature like this one.

I don't know if I ever will have time for this, but a new interface would be closely modelled after ppl.

@GSI
Copy link

GSI commented Mar 7, 2016

Any status update on this?

(Just tried ppl 2.4.0. It silently dropped most VCF fields when I ran ppl mv. Disappointing.)

@untitaker
Copy link
Member

Not really. I suggest investing effort into making ppl usable (there is a PR open for the problem you describe @GSI).

@GSI
Copy link

GSI commented Mar 8, 2016

Hmm too bad. After evaluating ppl yesterday in more detail, I came to the conclusion that it's apparently not developed towards interoperability (with other VCF tools).

Apart from that, it's slow. mutt command for example:

  • ppl 2.15 seconds
  • khard 1.64 seconds
  • mates 0.00 seconds

Even if it was just for that one command I'd use mates :)

The only other fast tool I found is pycarddav, but it seems to be slowly dying (and uses sqlite and such).

For completeness, here's my use case on the email type is: If there is an email set as pref, then I have mutt select that one directly without asking. Otherwise it will let me choose between home, work, ...

@untitaker
Copy link
Member

I do think that a ppl-clone in a compiled low-level language (Rust! Rust!
Rust!) would be useful, but I'm unlikely to attempt it anytime soon. mates just
works for my trivial usecases. I manage contacts using my phone.

On Tue, Mar 08, 2016 at 11:49:21AM -0800, GSI wrote:

Hmm too bad. After evaluating ppl yesterday in more detail, I came to the conclusion that it's apparently not developed towards interoperability (with other VCF tools).

Apart from that, it's slow. mutt command for example:

  • ppl 2.15 seconds
  • khard 1.64 seconds
  • mates 0.00 seconds

Even if it was just for that one command I'd use mates :)

The only other fast tool I found is pycarddav, but it seems to be slowly dying (and uses sqlite and such).

For completeness, here's my use case on the email type is: If there is an email set as pref, then I have mutt select that one directly without asking. Otherwise it will let me choose between home, work, ...


Reply to this email directly or view it on GitHub:
#11 (comment)

@GSI
Copy link

GSI commented Mar 8, 2016 via email

@GSI
Copy link

GSI commented Mar 9, 2016

I dove into the source today and tracked the issue back into your vobject implementation (https://github.com/untitaker/rust-vobject).

Lacking Rust experience, I finally decided to generate the index using khard:
khard email | grep -v '^searching' > ~/.mutt/address_index_from_vcards

The according query_command in mutt is a simple use of grep. With preference for pref addresses, this would be:

set query_command = "echo 'Searching ...' ; grep -i %s'.*pref' ~/.mutt/address_index_from_vcards || grep -i %s ~/.mutt/address_index_from_vcards"

(will cause false-positives on rare occasions where there's a "pref" string in email or name)

I'm documenting this here for any other users who require a solution for fast contact lookup.

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

No branches or pull requests

3 participants