unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: racin@free.fr
To: notmuch@notmuchmail.org
Subject: First attempt to add smart completion in notmuch-search
Date: Fri, 18 Dec 2009 16:00:49 +0100	[thread overview]
Message-ID: <1261148449.4b2b9921f3ab1@imp.free.fr> (raw)



Hi!

Here is a first attempt to add "smart completion" to notmuch-search.

What it does is that:

 - It tries to detects when you hit tab to complete a search term
   prefix (like to, from, subject...) , and if so completes your
   prefix;

 - If you try to complete a search term usign a specific prefix (like
   to), it helps you complete it using prefix founds in the messages
   matching the current search string.

The patch has a Emacs-lisp part and a C part.

I'm submitting the patch to know what people think of it, but there
are some things still uncomplete:

 - I think headers should be parsed so that a better output is
   proposed, but I don't know which one yet;

 - There may be performance issues (because fetching headers require
   looking them in each message file), but I'm not sure if this is
   really a problem (since we already fetch headers to display it in
   the summary buffer).

 - I have a problem that notmuch-search-query-string is buffer-local
   and I can't access it from the minibuffer, which I don't know how
   to solve properly

 - There are still some glitches with the "".

 - There may be many other improvements that I haven't thought of.

Anyway, I hope it's useful; I'll continue working on it when I come
back from Holidays.

Thanks for your input,
 Matthieu

             reply	other threads:[~2009-12-18 15:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-18 15:00 racin [this message]
2009-12-18 17:54 ` First attempt to add smart completion in notmuch-search Carl Worth
2009-12-24 10:06   ` racin
2009-12-24 10:07   ` racin
2009-12-26 16:19     ` Kan-Ru Chen
2009-12-27 18:37       ` racin

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=1261148449.4b2b9921f3ab1@imp.free.fr \
    --to=racin@free.fr \
    --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).