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 7C7006DE0F07 for ; Fri, 17 Jan 2020 04:49:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -2.552 X-Spam-Level: X-Spam-Status: No, score=-2.552 tagged_above=-999 required=5 tests=[AWL=-0.500, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] 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 53uW3e_B7Rxe for ; Fri, 17 Jan 2020 04:49:30 -0800 (PST) X-Greylist: delayed 429 seconds by postgrey-1.36 at arlo; Fri, 17 Jan 2020 04:49:30 PST Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by arlo.cworth.org (Postfix) with ESMTPS id 384C76DE0A7E for ; Fri, 17 Jan 2020 04:49:30 -0800 (PST) IronPort-SDR: vSYFgyc/+0FT3rNb7Hg+60TyeJv9/XRZQg1PTfAXNFzjo5mLfwRGAXv7p4aZok/4oSEtrV1Ni9 nFoGBUyFtnilgD514/wCaWauE6FqizgbfTI6cKcEORu4vrt9PtohzJELQA/JthL2BKofGlUX7Z hMAIPQ+BbgfI4sQ3Zx/2EpK8kcwivU/+zi735IcHu9+Eahk408tGSbpEvR1eH+gEeU09sZbxts +x27b0y6q6rOKqQRaSuFc93uB2Q9E+GDYJDp9qSD2EXMBG6MJSQEmmVva6HVCJx2EtypXZ0z+I f5Y= X-IronPort-AV: E=Sophos;i="5.70,330,1574150400"; d="asc'?scan'208";a="45019840" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 17 Jan 2020 04:42:18 -0800 IronPort-SDR: 8WvKeplJgcHViDBQM7IEgMxlpw9oV5Dgc+F9dleXXi4LOFlllDyU7/WuBXlQr+Zlys8saL6WPF 3vuVHLHq+OgCIIJ1G6z6M2W7GZgl6vMgRIYQf2spr2LUxNt6xVXTkul6lHfbmGwBwu8FrWmxHU lntbowsTMHfGLajsDUdt36LdzlBnnCSLkVla/WgSs79J0gSwlo8P8XiDnpihNqlUrXyluHzFOz 794Qaks/own4t1BlnuOkX1G9Wz1Qmqs1PMRxm0Ehf1qfne4RnXDCQKYACqFyQ1ZvQhViV4wnGc pHg= From: Thomas Schwinge To: Subject: Feature idea: Emacs 'notmuch-search' "paged" display User-Agent: Notmuch/0.29.1+93~g67ed7df (https://notmuchmail.org) Emacs/26.1 (x86_64-pc-linux-gnu) Date: Fri, 17 Jan 2020 13:42:01 +0100 Message-ID: <87muamgspy.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Mailman-Approved-At: Sat, 18 Jan 2020 01:40:28 -0800 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 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: Fri, 17 Jan 2020 12:49:36 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi! I had this following idea, but my Emacs foo is too limited to start implementing this -- if reasonably possible at all. Here is -- I suppose, not verified -- what happens if you do a command-line 'notmuch search [...] | less': the 'notmuch' process creates some output and the 'less' process reads some. At some point, 'less' stops reading (let's assume when the screen is full, for simplicity), then the pipe gets filled up (some few KiB, I think?), and then 'notmuch' blocks in 'write', so doesn't do any futher work until 'less' reads more data. Here is -- I suppose, not verified -- what happens if you do a Emacs 'notmuch-search [...]': the 'notmuch' process creates some output and the Emacs process reads some. And then some more, and again, and so on, until 'EOF'. So, 'notmuch' never blocks in 'write', because Emacs reads it all. Now, I have a number of generic search queries that produce a long list of search results, so to avoid Emacs building up a huge 'notmuch-search' buffer I usually quickly do "M-: (ignore-errors (interrupt-process))". Oftentimes I'm only interested in the first few results, or I'm immediately going to 'notmuch-search-filter' the results. Is it possible in Emacs to emulared the "paged" display as explained in the 'less' example? That is, only read in "a screenful of data", then let the pipe fill up, then 'notmuch' block, and only once the user moves the point towards the end of the current Emacs buffer, continue to read data from the pipe. I'm willing to try implementing this, but I'd appreciate some sanity-checking as well as guidance by somebody more familiar with Emacs internals. Gr=C3=BC=C3=9Fe Thomas --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCgAdFiEEU9WEfWKGQazCmycCAKI7+41Q4XkFAl4hq5oACgkQAKI7+41Q 4Xm8pwwA5Byh4dMZ3BePtihIWRlSQHqYse1sIM9LtPbixApKXPgEQVYve8yirJNK vKr4Uru8EUxfQ6AwdCH5fH5cb5DTHiSfKlGt9ES8gGCX28VRvoyO+oPzNZEtPB6z F661y+HPNK3jjNdgVb7FSeFSMFS27QTiyNmf2krbj/0bkKnaTyRkgWyHiBEsAP3V X+g8HuqnbJ7ougtiKxZV9d5UKD8uY5AmpNvjGPyoxSnlaikNrMFD4JgTRAEzIb05 oB6Sxr3QzIIasrK5Yux5TSftYID5cAmda7JIThhJ5V/cZDGwhKJGheVgrZBKLa50 wyr0lNcroww7fUwWokbTAWzgls/g6hafjW3Uzg1nWoKH7aFMzfrOwAJ2NLZ+tcz9 fXSDVPZ18heF56nkRYntvrib01DaWruCt+fxf1dAwoCw4+hfgF0+FyJQcknsH6ZT oXxlUXuxeoZrP+m8IF4ija7hBaeKMidvhy2DvHNKapHKCSRarLpWxc4Bq76nloFq VwHpI6zR =4cwJ -----END PGP SIGNATURE----- --=-=-=--