From: Austin Clements <amdragon@MIT.EDU>
To: Johannes Kulick <johannes@mailless.org>
Cc: notmuch@notmuchmail.org
Subject: Re: Feature proposal: OUTPUT_AUTHOR format
Date: Tue, 27 Aug 2013 09:47:24 -0400 [thread overview]
Message-ID: <20130827134723.GQ13257@mit.edu> (raw)
In-Reply-To: <20130827115004.11629.64740@quirm.robotics.tu-berlin.de>
Quoth Johannes Kulick on Aug 27 at 1:50 pm:
> Hi David,
>
> Quoting David Bremner (2013-08-27 02:27:00)
> > I'm not sure I understand your goal completely here, but the obvious
> > thing UI wise would be
> >
> > notmuch search --output=authors --format=(json|text|sexp) $search_terms
> >
> > Perhaps you're already aware of this, but alot doesn't use the CLI, so
> > that wouldn't be directly helpful to having a new view in alot.
>
> Do you mean, that this output=authors option is already available? Then I'm not
> aware. If it is not available it's exactly what I meant. So it would look
No, --output=authors isn't currently available.
> something like:
>
> $ notmuch search --output=authors from:Johannes
> Johannes Kulick (1234 msgs)
> Johannes Doe (123 msgs)
> Johannes Mueller (12 msgs)
> ...
>
> I'd sketch the way to implement it like this:
>
> - add notmuch_authors_t and notmuch_author_t structs
> - add a notmuch_database_get_all_authors (notmuch_database_t *db)
> - add the functions around that to actually get an option for the ui
> - add bindings for the other languages
What's the advantage to adding this to the library? Why not just
notmuch_query_search_messages, iterate over the messages and use
notmuch_message_get_header(msg, "from") to accumulate the author
information, and then output that? Unless I'm overlooking something
(which is possible), there are no algorithmic advantages to doing this
in the library.
As David pointed out, for alot you could do this right away, since it
uses the library directly. For notmuch-emacs you would have to extend
the CLI along the lines you're imagining.
> (- implement the view in the clients)
>
> Cheers,
> Johannes
>
next prev parent reply other threads:[~2013-08-27 13:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130825101308.27461.57489@quirm.robotics.tu-berlin.de>
2013-08-26 22:22 ` Feature proposal: OUTPUT_AUTHOR format Johannes Kulick
2013-08-27 0:27 ` David Bremner
2013-08-27 5:21 ` Jani Nikula
2013-08-27 11:50 ` Johannes Kulick
2013-08-27 13:47 ` Austin Clements [this message]
2013-08-27 14:06 ` Johannes Kulick
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=20130827134723.GQ13257@mit.edu \
--to=amdragon@mit.edu \
--cc=johannes@mailless.org \
--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).