From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12 with LMTPS id oG1CI6prQV/sPQAAsNZ9tg (envelope-from ) for ; Sat, 22 Aug 2020 19:02:02 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id mJHzHqprQV+obQAAbx9fmQ (envelope-from ) for ; Sat, 22 Aug 2020 19:02:02 +0000 Received: from pb-smtp21.pobox.com (pb-smtp21.pobox.com [173.228.157.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2B26C9403A5 for ; Sat, 22 Aug 2020 19:02:01 +0000 (UTC) Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 550D1EA000; Sat, 22 Aug 2020 15:01:58 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:date:message-id:mime-version:content-transfer-encoding; s=sasl; bh=XNnE5/exVF0DXJ534JdjhaPYJDA=; b=DeNSdz9nT5/gfswjg9vw YzNO/8J60q5tt/ZTe2aF57+zo8P2W+F2DgakUIZvvsBdZ8hzgvYFYVs+oNQlFUvG AlP9Xa4dUd5E6dZKnYp6fXKHxQlEJAtfBismEjU3j7KliMP4Vo9nv1eKhCC6K4qL WMD1Jbfvr/4UKBcFxq3Pkgg= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 4E426E9FFF; Sat, 22 Aug 2020 15:01:58 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:subject:date:message-id:mime-version:content-transfer-encoding; s=mesmtp; bh=MQLLsjKoa4KDZXQhlNUJQED0HxOnjkPJbPF+n2yzL44=; b=d/4cwjzC9C2fneaM1jevEDeT3ndDS38Xqq/Afv9HAylzQRcIynQ/iLueERPM091jGAsSjpKoVhE7Xul2P5vlcjd/CD77AWNPKxywGvgvozCweuAaSV0ucRF+ZGvY+3HYb//PdUQoT9CgwItuRLBNDTmrtdbhr49WLu01RrpWyKQ= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id C1DC8E9FFD; Sat, 22 Aug 2020 15:01:55 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: piem@inbox.kyleam.com Subject: [PATCH 0/3] inject: Add support for skipping messages Date: Sat, 22 Aug 2020 15:01:27 -0400 Message-Id: <20200822190130.20397-1-kyle@kyleam.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Pobox-Relay-ID: F28BEBAC-E4A9-11EA-A618-843F439F7C89-24757444!pb-smtp21.pobox.com Content-Transfer-Encoding: quoted-printable X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=DeNSdz9n; dkim=fail (body hash did not verify) header.d=kyleam.com header.s=mesmtp header.b=d/4cwjzC; dmarc=none; spf=pass (aspmx1.migadu.com: domain of kyle@kyleam.com designates 173.228.157.53 as permitted sender) smtp.mailfrom=kyle@kyleam.com X-Spam-Score: 2.50 X-TUID: f/AEU1tVXNUu When I'm using Gnus to read a thread via nntp and decide I want it in my regular mail (notmuch), I call piem-inject-thread-into-maildir to pull the thread into my notmuch database. If I call it again at a later time to get new messages, a duplicate message is added for each message that came in with the previous call. For notmuch at least, that's not a big deal because those messages are mostly hidden, but it'd still be nice to avoid. This series makes that possible with (setq piem-mail-injection-skipif-predicate #'piem-notmuch-known-mid-p) This might also end up being useful outside of avoiding duplicates for things like this: (setq piem-mail-injection-skipif-predicate #') [1/3] inject: Abbreviate piem-maildir-directory in message [2/3] inject: Support skipping messages [3/3] notmuch: Extract "known message?" logic to function piem-notmuch.el | 32 +++++++++++++---------- piem.el | 67 ++++++++++++++++++++++++++++++++++++------------- 2 files changed, 68 insertions(+), 31 deletions(-) base-commit: 846c69cae321442bb2f5cefec7000328943c7560 --=20 2.28.0