* Feature proposal: OUTPUT_AUTHOR format [not found] <20130825101308.27461.57489@quirm.robotics.tu-berlin.de> @ 2013-08-26 22:22 ` Johannes Kulick 2013-08-27 0:27 ` David Bremner 0 siblings, 1 reply; 6+ messages in thread From: Johannes Kulick @ 2013-08-26 22:22 UTC (permalink / raw) To: notmuch [-- Attachment #1: Type: text/plain, Size: 2375 bytes --] Hi all, I have the following idea for a new feature. I'd implement it myself, but I wanted to ask the list first, whether something like this would have a chance to go into mainline (given that it is implemented cleanly, well documented etc.) or if people wouldn't like it at all. I suggest to add a new output format, namely something like OUTPUT_AUTHORS. It would for a given query return a list of all authors found in the messages and the number of messages they have. With that notmuch could be used for something I call a "people centric view". That should give the user the possibility to sort its mail by authors. I - for example - mainly communicate with only a couple of persons. If I'd have a view showing me these persons on top would be very handy. That way I'd be able to fast start a new conversation with my main conversation-partners, see e.g. all threads I had with them or see all attachments I've got from them. One could argue that a search to "from:<NAME>" would do it, but that way my notmuch client isn't able to render such a view automatically, since no information about all authors can be retrieved (at least not easily). So I'd have to search for each name manually. One could also argue that tagging each mail by the authors name would do the trick. This is probably true, but would also mix tags and authors in an unclean way, I'd say. I'd need to add a tag for every new person I mail to and would add a tag to mail with information, which is already saved in the from field. An authors output format would not add redundant information to a mail, would be relatively easy to implement and I would find a people centric view - which doesn't interfere with any other concept of notmuch - very worth the couple of new lines of code. What would you say? Best, Johannes (Since I'm new to the list: Hello to all. I'm using notmuch with alot as client for a couple of years now and very happy with it. I did some minor contributions to alot so far. Apart from that I'm Ph.D. student in computer science and do research about machine learning and robotics topics) -- uni stuttgart machine learning and robotics lab http://ipvs.informatik.uni-stuttgart.de/mlr/johannes Question: What is the weird attachment on all my emails? Answer: http://en.wikipedia.org/wiki/Digital_signature [-- Attachment #2: signature --] [-- Type: application/pgp-signature, Size: 490 bytes --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iQEcBAABAgAGBQJSG9UiAAoJEBiRJNhhEUhOlnYIAI8JMitrThc4X/S/Pe/vECOL BXUG12DDUXyqcwhn5tGjRA/ncy8WPapl0cy1ubptaCexNAcQRMzVte3NNlBJg0NP zZebu3QSFrUMr8+dcZBlpea/3tb8bNVjc/H5gkBPjpNJfKXa41mt8iAReP7qfPVc Z+w3pHbmTHPmqVCPAnM5H0PUo5J6Za0DUc3B52nZ1F1Gf7uzxs2W9hzsYtlxd8xF qi5/rT9pDXyOXyxKF4RIoxyKI6B+aaRrllV1ZqlfZS697vrniOaIdqAk69O5vjDa K1a249dXLcqiUYjuq32eyOAbRDZLlJJgdIEiyv1nHkcZwnxjHz9WB3K/YZfgur4= =8ic0 -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Feature proposal: OUTPUT_AUTHOR format 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 0 siblings, 2 replies; 6+ messages in thread From: David Bremner @ 2013-08-27 0:27 UTC (permalink / raw) To: Johannes Kulick, notmuch Johannes Kulick <johannes@mailless.org> writes: > An authors output format would not add redundant information to a mail, would be > relatively easy to implement and I would find a people centric view - which > doesn't interfere with any other concept of notmuch - very worth the couple of > new lines of code. > > What would you say? Hi Johannes; 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. d ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Feature proposal: OUTPUT_AUTHOR format 2013-08-27 0:27 ` David Bremner @ 2013-08-27 5:21 ` Jani Nikula 2013-08-27 11:50 ` Johannes Kulick 1 sibling, 0 replies; 6+ messages in thread From: Jani Nikula @ 2013-08-27 5:21 UTC (permalink / raw) To: David Bremner; +Cc: Notmuch Mail [-- Attachment #1: Type: text/plain, Size: 1030 bytes --] On Aug 27, 2013 3:27 AM, "David Bremner" <david@tethera.net> wrote: > > Johannes Kulick <johannes@mailless.org> writes: > > > An authors output format would not add redundant information to a mail, would be > > relatively easy to implement and I would find a people centric view - which > > doesn't interfere with any other concept of notmuch - very worth the couple of > > new lines of code. > > > > What would you say? > > Hi Johannes; > > 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 > FWIW, I have some code to this effect that I never posted. I'll see how much polish it would require. BR, Jani. > 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. > > d > > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch [-- Attachment #2: Type: text/html, Size: 1591 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Feature proposal: OUTPUT_AUTHOR format 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 1 sibling, 1 reply; 6+ messages in thread From: Johannes Kulick @ 2013-08-27 11:50 UTC (permalink / raw) To: notmuch [-- Attachment #1: Type: text/plain, Size: 1276 bytes --] 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 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 (- implement the view in the clients) Cheers, Johannes -- uni stuttgart machine learning and robotics lab http://ipvs.informatik.uni-stuttgart.de/mlr/johannes Question: What is the weird attachment on all my emails? Answer: http://en.wikipedia.org/wiki/Digital_signature [-- Attachment #2: signature --] [-- Type: application/pgp-signature, Size: 490 bytes --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iQEcBAABAgAGBQJSHJJsAAoJEBiRJNhhEUhOuLUH/RmPnpOF0F/K0xhzJjyMNTgk RvFUwvVUNiDb8gmdAHBw/RoFKdZg5a8Tcvl6Twx2k0k1yx8jlEB5wexJwR9V4ZwP RPle7rkzEWMOkdvHDU2BRVB2tdvDF1LNowTTndVHdPVIYrJOtacGLbAqYbQp5yNm GHo6LWzSovQzSKSDEOYPOylq08Fr9dpZ4sv5u0dC9dZnavtm+PR/9xCacEXAIeSx fHulxdXPgBtefDo260dFpXDsOVjTFtBNPUltJIiPSlx2/PhhpaSMJ+hGP7yz9F5Z ACmKTJ45QMvY/ZpGEwbUjBN1oCZ3MkQw7HUWeAlN2Bbu/Aqk2JcfBBTw1KNmpR0= =b+iX -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Feature proposal: OUTPUT_AUTHOR format 2013-08-27 11:50 ` Johannes Kulick @ 2013-08-27 13:47 ` Austin Clements 2013-08-27 14:06 ` Johannes Kulick 0 siblings, 1 reply; 6+ messages in thread From: Austin Clements @ 2013-08-27 13:47 UTC (permalink / raw) To: Johannes Kulick; +Cc: notmuch 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 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Feature proposal: OUTPUT_AUTHOR format 2013-08-27 13:47 ` Austin Clements @ 2013-08-27 14:06 ` Johannes Kulick 0 siblings, 0 replies; 6+ messages in thread From: Johannes Kulick @ 2013-08-27 14:06 UTC (permalink / raw) To: Austin Clements; +Cc: notmuch [-- Attachment #1: Type: text/plain, Size: 1232 bytes --] > 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. The view I have in mind would look something like: John Doe (1234 msg) |- first thread subject |- second thread subject |- third thread subject Jane Doe (234 msg) |- first thread subject |- second thread subject |- third thread subject ... The problem is, that if I want to have a list of all authors in the database I'd have to iterate over all messages (naively implemented, whenever I render the view, or I somehow have to persistently store this list and update it on a regular basis), whereas the notmuch database already has this information but doesn't reveal if I'm not overlooking something. To do a notmuch_query_search_messages I'd have to know what to search for, whereas a notmuch_database_get_all_authors would give me exactly what I'm looking for in short time since it is already indexed by xapian. Best, Johannes [-- Attachment #2: signature --] [-- Type: application/pgp-signature, Size: 490 bytes --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iQEcBAABAgAGBQJSHLJ+AAoJEBiRJNhhEUhOYrQH/2tmIopguoNlnepIgcI52JRY Yuis52XGbverFYBoZEgeI36DSQghlNeBYakYcWYmHf9a6ZkxVtWR6arrXp3A1pCb eSm4ZqDowA1qTaAh9mMlIGWwRkSAS5meJulf9Yhmnv353AJsZvrJz8283bUrULjM HhcJ/Uh7KF1gN1arfOxwsTtQNXjrPpUd1E0voNYERCGhX5cqLevrkJdrzUEv6+PF lSl2b3701J8q86Pphm0Trr2AWEdMyZxMXJpOeF2+9l8vrTB1KAEhsyPO+7V2YfUx sEoncvEGAvdRlK5KmlKp/Ql5HUwMUv+96nl1I6TMg2BWyHhxjgZHPmxyqI8ofkk= =tIcK -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-08-27 14:07 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [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 2013-08-27 14:06 ` Johannes Kulick
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).