unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
To: notmuch@notmuchmail.org
Subject: Re: nbook: a notmuch based address book written in python
Date: Mon, 15 Oct 2012 13:52:40 +0200	[thread overview]
Message-ID: <20121015115240.GA14067@kuru.dyndns-at-home.com> (raw)
In-Reply-To: <20121013165851.29671.29869@brick.lan>

Hello Patrick,

On Sat, Oct 13, 2012 at 05:58:51PM +0100, Patrick Totzke wrote:
> Quoting Suvayu Ali (2012-10-08 10:34:29)
> > 
> > > But to your tool; practice test:
> > > I wasn't able to use wildcards or simply prefixes of names. This is essential
> > > if you want to use it for tabcompleting contacts in a MUA.
> > 
> > Since the idea was inspired by the completion on the Gmail web
> > interface, I already do a partial search so wildcards should not be
> > necessary.
> 
> Not sure what you mean here: If I compose a mail using gmails web interface
> and type a prefix of someone's name I will get this contect as a suggestion.
> My point was that using your tool, I did not get a contact suggested
> for all prefixes.
> 

What I meant was, I search for *<query>* in the name or email address
strings.  So adding a glob character is not needed; in fact adding it
would mean my algorithm would search for a literal "*" and fail.

[...]

> 
> I think this is a conceptual problem with your algorithm:
> You look up *all* messages and add a name to your result-list
> if it matches. This means you go through some condidate
> as often as you index contains mails from/to him.
> What one really wants is to ask the database to do something like
>   "SELECT name,email from RECIPIENTS_OR_SENDER"
> where RECIPIENTS_OR_SENDER is some imaginary list that stores
> a set of contacts.
> 
> Bottom line: One would have to change the layout of the underlying
> database (not likely) or do regularly update some cache
> and only work on that. This is what some of the mentioned tools do if i'm not mistaken.
> 

Yes, you are right.  I realised this too when I tried out
nottoomuch-address a few days back.  Caching seems to be the solution
for performance issues.

[...]

> > > -------------------------------
> > > [~] time nbook Patrick                     
> > > 
> > > Error opening /home/pazz/mail/gmail/[Google Mail].All Mail/cur/1330682270_0.12958.megatron,U=8766,FMD5=66ff6a8bc18a8a3ac4b311daa93d358a:2,S: Too many open files
> > > Traceback (most recent call last):
> > >   File "/home/pazz/bin/nbook", line 167, in <module>
> > >   File "/home/pazz/bin/nbook", line 71, in __init__
> > >   File "/home/pazz/.local/lib/python2.7/site-packages/notmuch/message.py", line 233, in get_header
> > > notmuch.errors.NullPointerError

[...]

I see in the meantime I was writing this email, Justus gave an
explanation for the issue; I'll go through the response carefully.

> 
> https://github.com/teythoon/afew
> https://github.com/pazz/alot
> http://excess.org/urwid/
> 
> I'm sure patches will be welcome to any of the above :)

Al 3 seem very interesting, but I think I will take a closer look at
afew and urwid.

Thanks for the pointers,

:)

-- 
Suvayu

Open source is the future. It sets us free.

      parent reply	other threads:[~2012-10-15 11:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-24  8:26 nbook: a notmuch based address book written in python Suvayu Ali
2012-09-25 10:44 ` Patrick Totzke
2012-10-08  9:34   ` Suvayu Ali
2012-10-13 16:58     ` Patrick Totzke
2012-10-15 10:58       ` Justus Winter
2012-10-16 14:55         ` Suvayu Ali
2012-10-15 11:52       ` Suvayu Ali [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121015115240.GA14067@kuru.dyndns-at-home.com \
    --to=fatkasuvayu+linux@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).