From 6428628ab58649c0e030a3db119f4b281729423e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Amadeusz=20=C5=BBo=C5=82nowski?= Date: Tue, 2 Aug 2016 20:28:38 +0100 Subject: [PATCH] Re: notmuch and "mute" -- useful to anyone? --- 62/7ba97c420e58ee5b796df41dae5ca13b5e5339 | 169 ++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 62/7ba97c420e58ee5b796df41dae5ca13b5e5339 diff --git a/62/7ba97c420e58ee5b796df41dae5ca13b5e5339 b/62/7ba97c420e58ee5b796df41dae5ca13b5e5339 new file mode 100644 index 000000000..50a969634 --- /dev/null +++ b/62/7ba97c420e58ee5b796df41dae5ca13b5e5339 @@ -0,0 +1,169 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 159E16DE00BD + for ; Tue, 2 Aug 2016 12:29:07 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.473 +X-Spam-Level: +X-Spam-Status: No, score=0.473 tagged_above=-999 required=5 tests=[AWL=0.574, + DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + 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 ivbB4MGKJdAJ for ; + Tue, 2 Aug 2016 12:28:58 -0700 (PDT) +Received: from jim.zolnowski.name (jim.zolnowski.name [188.116.54.122]) + by arlo.cworth.org (Postfix) with ESMTPS id 57CA06DE00B8 + for ; Tue, 2 Aug 2016 12:28:58 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; + d=aidecoe.name; s=jim; h=Content-Type:MIME-Version:Message-ID:Date:References + :In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: + Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: + Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: + List-Subscribe:List-Post:List-Owner:List-Archive; + bh=l6HtR8Uikb/eNaqK7OGl8GhxcXq1Bfypo1JFNbMQd5o=; b=sofEQyB9nAJSjj1fI8wjNcdB7K + Y/A/AdDsNz15KgsZqcbdnZHirWAmqc0ovUru3kUuqumtLJCB5Jb2sbe3Krwr2q1kLJOQK58PK4Y/P + A8nP8eOSdFNFewFQEK/M0vYi4/b0aM2mcJF1XEr/ZhqdooaSdEH4LR5b9slHUS2gTD6BE1FPEdC2J + pwNRWkFBkQ+Nheh10o/4O2Ng5+0ZRANBiD3W69ufO3ZkeacA8YUqYWnQeRNqIOJFPAxKP7nBLokio + H6Mry4TcXk5PV6Ln2Vi8ohZjUwIzc8Vuq2gNQjNTBEuVvPQIyUYwT4u1wOgGfdWj9YKg+b3Cyt68p + jt4K+4Eg==; +Received: from cpc92302-cmbg19-2-0-cust189.5-4.cable.virginm.net + ([82.1.208.190] helo=localhost) + by jim.zolnowski.name with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) + (Exim 4.87) (envelope-from ) + id 1bUfMy-0006Bt-2s; Tue, 02 Aug 2016 21:28:53 +0200 +From: Amadeusz =?utf-8?B?xbtvxYJub3dza2k=?= +To: Matt Armstrong +Cc: notmuch@notmuchmail.org +Subject: Re: notmuch and "mute" -- useful to anyone? +In-Reply-To: +References: +User-Agent: Notmuch/0.22.1 (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Tue, 02 Aug 2016 20:28:38 +0100 +Message-ID: <87d1lrq8bd.fsf@freja.aidecoe.name> +MIME-Version: 1.0 +Content-Type: multipart/signed; boundary="=-=-="; + micalg=pgp-sha512; protocol="application/pgp-signature" +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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, 02 Aug 2016 19:29:07 -0000 + +--=-=-= +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable + +This seems to be something that https://github.com/teythoon/afew already +does, although it uses tag 'killed' instead. I think that alot e-mail +client uses 'killed' tag as well. Maybe you could consider having that +name instead or make it configurable with 'killed' as default? + +Cheers, + +=2D- Amadeusz =C5=BBo=C5=82nowski + +Matt Armstrong writes: + +> Is anyone else interested in Gmail-like "mute" support in notmuch.el? +> If so, I can think about polishing the below off and adding it to +> notmuch. +> +> I've managed to implement Gmail's "mute" in notmuch as follows in my +> notmuch-post-new: +> +> ---------------------------------------------------------------------- +> # Unmute all threads with new messages sent to me. +> notmuch search --output=3Dthreads tag:new AND tag:me | \ +> xargs --no-run-if-empty notmuch tag -muted -- +> +> # Remove all muted threads from the inbox and mark every message in them +> # muted. Ideally this would be atomic with the above. +> notmuch search --output=3Dthreads tag:muted | \ +> xargs --no-run-if-empty notmuch tag -inbox +muted -- +> ---------------------------------------------------------------------- +> +> Then in .emacs: +> +> ---------------------------------------------------------------------- +> (defcustom my-notmuch-mute-tags '("+muted" "-inbox") +> "List of tag changes to apply to a message or a thread when it is muted. +> +> Tags starting with \"+\" (or not starting with either \"+\" or +> \"-\") in the list will be added, and tags starting with \"-\" +> will be removed from the message or thread being archived. +> +> For example, if you wanted to remove an \"inbox\" tag and add an +> \"archived\" tag, you would set: +> (\"-inbox\" \"+archived\")" +> :type '(repeat string) +> :group 'notmuch-search +> :group 'notmuch-show) +> +> ;; TODO: consider defadvice? +> (defun my-notmuch-search-mute-thread (&optional unarchive beg end) +> "Mute the currently selected thread or region. +> +> Mute each message in the currently selected thread by applying the +> tag changes in `my-notmuch-mute-tags' to each (remove the \"inbox\" +> tag by default). If a prefix argument is given, the messages will +> be \"unarchived\" (i.e. the tag changes in `my-notmuch-mute-tags' +> will be reversed). +> +> This function advances the next thread when finished." +> (interactive (cons current-prefix-arg (notmuch-search-interactive-regio= +n))) +> (let ((notmuch-archive-tags my-notmuch-mute-tags)) +> (notmuch-search-archive-thread unarchive beg end))) +> +> (defun my-notmuch-show-mute-thread-then-next () +> (interactive) +> "Mute all messages in the current buffer, then show next thread from se= +arch." +> (let ((notmuch-archive-tags my-notmuch-mute-tags)) +> (notmuch-show-archive-thread-then-next))) +> +> (define-key notmuch-search-mode-map "m" 'my-notmuch-search-mute-thread) +> (define-key notmuch-show-mode-map "m" 'my-notmuch-show-mute-thread-then-n= +ext) +> ---------------------------------------------------------------------- +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> https://notmuchmail.org/mailman/listinfo/notmuch + +--=-=-= +Content-Type: application/pgp-signature; name="signature.asc" + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.1 + +iQJ8BAEBCgBmBQJXoPRnXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCMzcyRTFENjI5NUM1MzYwQTQwODQyRUZD +QkNDODAyM0Y1OUUxNzA0AAoJEMvMgCP1nhcEX7UP/jSq+b8HBhOdiMA+zui05DO9 +5HBiSboLyPZ6i/gHTyFbqC3wyS0zNHozyQl1Ok2yNunxi3QMpMFyYvKcEorPPR4b +VNnsdC7CEo79CReB4EySZAJSH48FrHu8dOh3m6KMRI+Ui4igfUejWySvaZo3hgXE +/01P4SHBcOfFkukQayrXgIryUJwpow6i6Yu4RpkokyoiNWzsmjQ3i6fFXWlKgI0c +OlO9fk88wfoREmQb8e2MNps2oa7fuviruxghvm+Hue4/NYL09jrDmRSbMbrGuVrR +AqkogqV+3xr22zOTV+VkPvsT0+InUBsIdv3lmQtEDKzT7DfATCeXTFGsZQu65IYp +Fx5q1NUTa/hk9xJdvCec/NHj3VO7nhm4lCbbDkXgYs3xomjW7BY2R2uJnWadc0dK +w5zP/1m1pXspCpjcnnGYaRn2uForDMjZELTVkpKAJpMLTekwMkqpgP6KvsKF4cgA +1L9Hh6VcTOpaYVbUUeyTDvWadGxD0RjeTi3Ohfxh2OxTo3LKlJGjYR9Wey/K2Yvc +YSwPX2ksq4v7MTd/RQvansXMCQQIWtuH0fSq+/ps7BVNYpEGr2ScTB38pdpV7hVD +jLHrGdt/TooWuBTj132EUO3TxGFTYACPE4LSssK/vv5x3jupl9CABw0WTtSY5Thp +kbKjj/1zocrx1+RaMWZe +=dSBX +-----END PGP SIGNATURE----- +--=-=-=-- -- 2.26.2