From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id IDZDNN4/E2OJVgAAbAwnHQ (envelope-from ) for ; Sat, 03 Sep 2022 13:51:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id sNIlNN4/E2OZagEAauVa8A (envelope-from ) for ; Sat, 03 Sep 2022 13:51:58 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 73E9ACD77 for ; Sat, 3 Sep 2022 13:51:58 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id EA0755F393; Sat, 3 Sep 2022 11:51:55 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 0F1C25F376 for ; Sat, 3 Sep 2022 11:51:53 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 754285FBC0; Sat, 3 Sep 2022 07:51:52 -0400 (EDT) Received: (nullmailer pid 828414 invoked by uid 1000); Sat, 03 Sep 2022 11:51:51 -0000 From: David Bremner To: Ico , notmuch@notmuchmail.org Subject: Re: Feature request: search for last N modified mails In-Reply-To: <20161202140115.62194.22060@localhost.localdomain> References: <20161202140115.62194.22060@localhost.localdomain> Date: Sat, 03 Sep 2022 08:51:51 -0300 Message-ID: <87a67gvfoo.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: PDIDT36WIOCVTQL7ORJ3YA2QNVWNRQE2 X-Message-ID-Hash: PDIDT36WIOCVTQL7ORJ3YA2QNVWNRQE2 X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1662205918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=0VBFZLwpg4LRsyRzco/6DtwQ9/gSAFNwUyMjeaCUVW0=; b=qffxfP3mi5OwlkXunOUMZvN7mx62OAN2VXmdCm/H0+5kC6kpf1JJe/ASnCiEH/VpHZbzlO 3XuKWvue3oLdqgla3Y/4Fmu+mAGFiQEe5UgPowc+5/TEJLxIBEewodI334nFoOACBaAdYZ rtbgKeHE+nu2ZYo2bh3AUBzKNOAE3URkxoXNjao9YC+cykYl2m0SOkM+cvhFZeW9jPwRam 46xBiIyU/HGAoiEi2aketTdEEnY7mDDkJwoP64HMpiqH+gxOLfwXUIJHOZb1Kn5W+jc1gv uuDjQyN2E7J+cmwCPPz2dDvXqQ3Dh6Nbot93pfmAkfXsWkmaziKONGGX0U8uxQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662205918; a=rsa-sha256; cv=none; b=HpxAE7BqJTdoF6kP9gaHPQNSATmkhy0fo8OCUu2lYc5YZsN4r5mNbGeT2KS5avtKPjXMf3 uE50VcHPvpKdXbi0GNFHB7kUKme10Yf65RGnHmxSwSa4MOT2ZCtq2XWz+qLqrERcq2nATY 6fAU2ydhmUs8LLWdhB2ICPiRI7TwN9jcSik097wX00z0LaRJIFO6FiHcQ+jWb8jhFYpBOm AePX5zgKOvuLsZmPIssfPfKocwJM1HsGBOFntWpv4ME76Jq6XGdvg2jzFr/NxP35sPiJ7t c32l85UzTNurFrKN9ZAPmvJi8vwZuf+5PuU/vuxNWzAQEZGST2S06I0s/tL7YA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.85 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 73E9ACD77 X-Spam-Score: -1.85 X-Migadu-Scanner: scn0.migadu.com X-TUID: lONQZHa3LDOZ Ico writes: > My normal mail workflow is to keep todo's in my inbox; these can be a few days > or weeks old if I'm lazy. Every now and then I find myself accidentally > removing things from the inbox, and I have a very hard time finding things > back. As discussed on #notmuch IRC today: I'd like to request a feature for > searching for the last N modified mails, as notmuch already has this info in > the database. > > bremner suggested this could be implemented using with a query like > > lastmod:-10 > > > > 14:39 < Zevv> basically, I'd like to be able to search for the last 10 modified > mails. Where 'modified' would probably mean changing tags > 14:41 < bremner> Zevv: you can get the current value from notmuch count --lastmod '*' > 14:41 < bremner> then basically every tag change increments it > 14:42 < bremner> so I guess subtract 10 and search? > 14:44 < Zevv> Hm that would make it hard to use it as a simple query for in alot > 14:45 < bremner> yes. > 14:45 < bremner> I never thought about it before, but it would be possible to > impliment lastmod:-10 > 14:47 < Zevv> that would be extremely handy The syntax lastmod:-10.. (or '(lastmod -10 *)' is now supported in git master.