unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Ioan-Adrian Ratiu <adi@adirat.com>
To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org
Subject: Re: [PATCH v2 00/11] Add filesize index, search, sort & emacs UI
Date: Tue, 23 May 2017 22:20:02 +0300	[thread overview]
Message-ID: <87y3tnwfbx.fsf@adiPC.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <87r2zfa3tb.fsf@nikula.org>

On Tue, 23 May 2017, Jani Nikula <jani@nikula.org> wrote:
> On Fri, 19 May 2017, Ioan-Adrian Ratiu <adi@adirat.com> wrote:
>> I'd like to add a feature to quickly work with mail file sizes
>> because using custom scripts / external programs which parse
>> maildir contents is slow, and non-intuitive, especially since
>> notmuch does incremental parsing and has such a nice emacs UI.
>
> Before we dive into the details, I guess at least I'd like to see better
> rationale for the feature. I don't see myself searching or sorting based
> on message size. What's the use case? (I wouldn't mind adding the
> message size to the formatted output, but that doesn't require indexing
> the size or adding the search support for it.)

The use case is very simple: I routinely get big mail and want to know
about it to take various actions (extract attach, forward, archive etc).

Of course I can always write a script to search the maildir but that
takes too long, I'd very much rather have incremental indexing,
instant search and a very nice GUI front-end (emacs saved searches in
my case).

With this series I now have saved searches based on filesize which tell
me exactly instantly how many messages I have in a certain size range.

>
> One fundamental issue David noted on IRC, it'll be hard to decide what
> to index for "message" size when there are duplicates that typically
> have different sizes. For other things, we've indexed whatever comes
> first, but I suppose we'd like to fix that.

Yes, agreed, and I'll go even further: notmuch search shows thread
results - what I did in this patch series is sum up the total messages
file sizes in a thread for the search results.

We could do something similar, i.e. add all duplicate file sizes to the
"message" size and those in turn get added to a thread size. I'm not
saying we should necessarily do this, I'm just pointing it out as an
alternative which would work very well for me.

Ionel

>
> BR,
> Jani.
>
>>
>>
>> Ioan-Adrian Ratiu (11):
>>   lib: message: index message file sizes
>>   lib: database: store message filesize & add range processor
>>   notmuch-search: add filesize based sort order
>>   emacs: make notmuch-search-oldest-first generic
>>   emacs: notmuch-search: add filesize sorting
>>   sprinter: add unsigned_long printer function
>>   lib: thread: add thread total size function
>>   notmuch-search: output total_filesize thread result
>>   notmuch-show: export message filesize
>>   emacs: notmuch-search: add display thread sizes capability
>>   emacs: notmuch-show: add filesize to headerline
>>
>>  devel/schemata         |  1 +
>>  doc/notmuch-emacs.rst  |  4 ++--
>>  emacs/notmuch-hello.el | 24 +++++++++++++-----------
>>  emacs/notmuch-jump.el  | 11 +++++------
>>  emacs/notmuch-lib.el   |  9 ++++++---
>>  emacs/notmuch-show.el  |  5 ++++-
>>  emacs/notmuch-tree.el  |  2 +-
>>  emacs/notmuch.el       | 48 +++++++++++++++++++++++++++++++++---------------
>>  lib/database-private.h |  1 +
>>  lib/database.cc        |  6 ++++++
>>  lib/index.cc           | 10 ++++++++++
>>  lib/message-file.c     | 18 +++++++++++++++++-
>>  lib/message.cc         | 29 +++++++++++++++++++++++++++++
>>  lib/notmuch-private.h  | 16 ++++++++++++++++
>>  lib/notmuch.h          | 21 +++++++++++++++++++++
>>  lib/query.cc           |  6 ++++++
>>  lib/thread.cc          | 12 ++++++++++++
>>  notmuch-search.c       |  8 +++++++-
>>  notmuch-show.c         |  5 +++++
>>  sprinter-json.c        |  9 +++++++++
>>  sprinter-sexp.c        |  9 +++++++++
>>  sprinter-text.c        |  9 +++++++++
>>  sprinter.h             |  1 +
>>  23 files changed, 223 insertions(+), 41 deletions(-)
>>
>> -- 
>> 2.13.0
>>
>> _______________________________________________
>> notmuch mailing list
>> notmuch@notmuchmail.org
>> https://notmuchmail.org/mailman/listinfo/notmuch

  reply	other threads:[~2017-05-23 19:18 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 22:26 [PATCH v2 00/11] Add filesize index, search, sort & emacs UI Ioan-Adrian Ratiu
2017-05-18 22:26 ` [PATCH v2 01/11] lib: message: index message file sizes Ioan-Adrian Ratiu
2017-06-06 23:47   ` David Bremner
2017-06-08 11:39   ` David Bremner
2017-05-18 22:26 ` [PATCH v2 02/11] lib: database: store message filesize & add range processor Ioan-Adrian Ratiu
2017-06-09 23:18   ` David Bremner
2017-05-18 22:27 ` [PATCH v2 03/11] notmuch-search: add filesize based sort order Ioan-Adrian Ratiu
2017-05-19  9:42   ` Tomi Ollila
2017-05-22 13:37     ` Ioan-Adrian Ratiu
2017-06-10  0:30   ` David Bremner
2017-05-18 22:27 ` [PATCH v2 04/11] emacs: make notmuch-search-oldest-first generic Ioan-Adrian Ratiu
2017-06-11  0:13   ` David Bremner
2017-05-18 22:27 ` [PATCH v2 05/11] emacs: notmuch-search: add filesize sorting Ioan-Adrian Ratiu
2017-06-11  0:15   ` David Bremner
2017-05-18 22:27 ` [PATCH v2 06/11] sprinter: add unsigned_long printer function Ioan-Adrian Ratiu
2017-05-23 16:53   ` Jani Nikula
2017-05-18 22:27 ` [PATCH v2 07/11] lib: thread: add thread total size function Ioan-Adrian Ratiu
2017-06-11  0:16   ` David Bremner
2017-05-18 22:27 ` [PATCH v2 08/11] notmuch-search: output total_filesize thread result Ioan-Adrian Ratiu
2017-06-11  0:22   ` David Bremner
2017-05-18 22:27 ` [PATCH v2 09/11] notmuch-show: export message filesize Ioan-Adrian Ratiu
2017-06-11  0:42   ` David Bremner
2017-05-18 22:27 ` [PATCH v2 10/11] emacs: notmuch-search: add display thread sizes capability Ioan-Adrian Ratiu
2017-06-11  0:24   ` David Bremner
2017-06-11  0:40   ` David Bremner
2017-05-18 22:27 ` [PATCH v2 11/11] emacs: notmuch-show: add filesize to headerline Ioan-Adrian Ratiu
2017-06-11  0:55   ` David Bremner
2017-05-23 17:19 ` [PATCH v2 00/11] Add filesize index, search, sort & emacs UI Jani Nikula
2017-05-23 19:20   ` Ioan-Adrian Ratiu [this message]
2017-06-06 18:51 ` David Bremner
2017-06-06 23:11   ` David Bremner

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=87y3tnwfbx.fsf@adiPC.i-did-not-set--mail-host-address--so-tickle-me \
    --to=adi@adirat.com \
    --cc=jani@nikula.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).