From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 608336DE0C1B for ; Tue, 23 May 2017 12:18:22 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.81 X-Spam-Level: X-Spam-Status: No, score=0.81 tagged_above=-999 required=5 tests=[AWL=-0.869, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLACK=1.7] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E8Ts5f7YrMSS for ; Tue, 23 May 2017 12:18:20 -0700 (PDT) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by arlo.cworth.org (Postfix) with ESMTPS id 646156DE0BF6 for ; Tue, 23 May 2017 12:18:19 -0700 (PDT) Received: by mail-wm0-f54.google.com with SMTP id 7so36680119wmo.1 for ; Tue, 23 May 2017 12:18:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adirat-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=qwQBpg1zQ7ROURypubh38kzxF24PmVTsSJS/naw9TjQ=; b=SDtf6M6mE/TKlgVR0zGZdXM/D9bLpVCQeiLp/m9haxCF3PUS0Of1/aLXSdgdPSIrbD clH+UFtJaTJPOgMKdhkVcccw6BHWlxGYwcV8j75Z9NyDOMe5g4BIvBa7okEkfxgbDw4r PeHb5QjrWphSLmsf4NOUxLaH2salm9kptXfKaPrtamettMd7qZT5I2GjJg5PXPod8vkS 2gvUlXuGqBn7ofaXu3XHXIyVUGHZkjBV8Pa8TbYT8PAWl15WHPnjwX9L1M0ueisNcpl9 FZqugoxI7QjbreG2w/LBZALj3uqStzREV/Mhe1o2LdPCrOWnVqxtq5VcFnVN1CDAYTj8 VdvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=qwQBpg1zQ7ROURypubh38kzxF24PmVTsSJS/naw9TjQ=; b=QIVZFTG4dtSzGIaiiynUU7yAXABe5uKZKeiajezzKf2gFP4O69S+UMNAlXD6JGaonE XGzwTgRk5wJHwYsAIe/t0Vfc1RGJgliyhFUHImwMu45dSTzeybFpqNLxVJzy6utcNOEn xvYksZ7G25rNZbxs4ZpILN++fpE95IRopNkKEexQa6nDplsUAZW2sRBn0aWrDiqA9Hdv sx/xktqITjHsuQq36jn4feJpMZcdtFOFXEacIvosCLd259sGOBG6S+kjYHKkTW8dMK1h p9MOSBaWABQl0pRjTXJsyGi5KJQAnr+cjyRMJk5KdU6gsnLRxtwbQWjnjVtn/QTvdn6x wD5g== X-Gm-Message-State: AODbwcAbYaxBr4KE1UrYcuJsU10rQs7qmlHZLrJatX+WTFcr2XEuUDsa AYUjQFkPPQQRUfV9 X-Received: by 10.223.157.29 with SMTP id k29mr17475012wre.156.1495567097249; Tue, 23 May 2017 12:18:17 -0700 (PDT) Received: from adiPC ([188.24.50.46]) by smtp.gmail.com with ESMTPSA id m1sm1879615wme.7.2017.05.23.12.18.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2017 12:18:16 -0700 (PDT) From: Ioan-Adrian Ratiu To: Jani Nikula , notmuch@notmuchmail.org Subject: Re: [PATCH v2 00/11] Add filesize index, search, sort & emacs UI In-Reply-To: <87r2zfa3tb.fsf@nikula.org> References: <20170518222708.30032-1-adi@adirat.com> <87r2zfa3tb.fsf@nikula.org> Date: Tue, 23 May 2017 22:20:02 +0300 Message-ID: <87y3tnwfbx.fsf@adiPC.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 19:18:22 -0000 On Tue, 23 May 2017, Jani Nikula wrote: > On Fri, 19 May 2017, Ioan-Adrian Ratiu 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