Re: [PATCH 3/4] config: only set search.exclude_tags to "deleted; spam; " during...
authorPieter Praet <pieter@praet.org>
Mon, 23 Jan 2012 07:35:42 +0000 (08:35 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:42:59 +0000 (09:42 -0800)
3b/7794bc40eddf4efc4cb72b6627b33c7faa7761 [new file with mode: 0644]

diff --git a/3b/7794bc40eddf4efc4cb72b6627b33c7faa7761 b/3b/7794bc40eddf4efc4cb72b6627b33c7faa7761
new file mode 100644 (file)
index 0000000..07b703c
--- /dev/null
@@ -0,0 +1,186 @@
+Return-Path: <pieter@praet.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 892D0429E54\r
+       for <notmuch@notmuchmail.org>; Sun, 22 Jan 2012 23:37:39 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id tAlaVl7TY5Jv for <notmuch@notmuchmail.org>;\r
+       Sun, 22 Jan 2012 23:37:38 -0800 (PST)\r
+Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
+       [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 5737C429E40\r
+       for <notmuch@notmuchmail.org>; Sun, 22 Jan 2012 23:37:38 -0800 (PST)\r
+Received: by wibhi8 with SMTP id hi8so378037wib.26\r
+       for <notmuch@notmuchmail.org>; Sun, 22 Jan 2012 23:37:37 -0800 (PST)\r
+Received: by 10.180.93.193 with SMTP id cw1mr11453300wib.5.1327304256805;\r
+       Sun, 22 Jan 2012 23:37:36 -0800 (PST)\r
+Received: from localhost ([109.131.95.182])\r
+       by mx.google.com with ESMTPS id cb8sm6919051wib.0.2012.01.22.23.37.35\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sun, 22 Jan 2012 23:37:36 -0800 (PST)\r
+From: Pieter Praet <pieter@praet.org>\r
+To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
+       Xavier Maillard <xma@gnu.org>, Austin Clements <amdragon@MIT.EDU>\r
+Subject: Re: [PATCH 3/4] config: only set search.exclude_tags to "deleted;\r
+ spam; " during setup\r
+In-Reply-To: <87y5sz0ypj.fsf@servo.finestructure.net>\r
+References: <1326586654-16840-3-git-send-email-amdragon@mit.edu>\r
+       <1327000744-25463-1-git-send-email-pieter@praet.org>\r
+       <1327000744-25463-4-git-send-email-pieter@praet.org>\r
+       <m2r4yr2xmy.fsf@kcals.intra.maillard.im>\r
+       <874nvnqrgq.fsf@servo.finestructure.net> <87ipk3au08.fsf@praet.org>\r
+       <87y5sz0ypj.fsf@servo.finestructure.net>\r
+User-Agent: Notmuch/0.11+101~g94bf862 (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-unknown-linux-gnu)\r
+Date: Mon, 23 Jan 2012 08:35:42 +0100\r
+Message-ID: <87fwf6c1m9.fsf@praet.org>\r
+MIME-Version: 1.0\r
+X-Gm-Message-State:\r
+ ALoCoQnmlWBMimlQ/xGspfrQ/iQCTaFsmBIElvbSqHUYQ0K8REXr1oErCLXGPZAw9qul1lvP70tT\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 23 Jan 2012 07:37:39 -0000\r
+\r
+On Sun, 22 Jan 2012 21:34:00 -0800, Jameson Graef Rollins <jrollins@finestr=\r
+ucture.net> wrote:\r
+> On Mon, 23 Jan 2012 06:05:27 +0100, Pieter Praet <pieter@praet.org> wrote:\r
+> > You definitely have a point, but then again, who are we to assume that\r
+> > the terms "deleted" and "spam" have the *exact* same meaning for\r
+> > everyone?  (also see id:"8739bbo0br.fsf@praet.org")\r
+>=20\r
+> Hrm.  I'm not sure I buy this.  Words already have meanings.  If we're\r
+> going to start down a rabbit hole where we have to assume that users are\r
+> making up crazy alternate meanings for words, we're going to run into a\r
+> lot of problems.\r
+>=20\r
+\r
+True, but we're talking about tags here.  Flexibility is their raison\r
+d'=C3=AAtre.  If we're going to impose semi-arbitrary limitations, we do aw=\r
+ay\r
+with alot of the benefits we were looking for in the first place.\r
+\r
+> Notmuch, or at least the emacs interface, already assumes a specific\r
+> meaning for certain terms, like most notably "inbox".  Given that we're\r
+> dealing with english here, I think we have to assume common usage\r
+> meanings for any of the words we're using to describe anything.\r
+>=20\r
+\r
+Actually, we're only a small step away from being free to use whatever\r
+tag(s) we want for this.  The term "inbox" is hardcoded in only 4\r
+places, all of which are trivial to fix:\r
+\r
+- @ binary\r
+  - `notmuch_config_open', where it's only used as a fallback when\r
+    'new.tags' isn't set (and reused to suggest a default value for\r
+    'new.tags' when running setup).\r
+\r
+- @ Emacs UI\r
+  - `notmuch-saved-searches' (the function), where it's only used as\r
+    a fallback when `notmuch-saved-searches' (the var) isn't set.\r
+  - `notmuch-search-archive-thread'\r
+  - `notmuch-show-archive-thread-internal'\r
+\r
+> This argument breaks a little in regards to "delete" since we're not\r
+> actually deleting anything in the sense of rm'ing it form the\r
+> filesystem, so we're already changing the meaning a bit.  But see below.\r
+>=20\r
+\r
+[...]\r
+\r
+> > IMHO, this is one of those options that should remain disabled until\r
+> > *explicitly* set by the user.\r
+>=20\r
+> Ok, but then we're back to the incredibly prolonged discussion we've\r
+> been having about adding "delete" keys.  If we disable this by default,\r
+> but add "delete" keys, the user might be in for a different surprise if\r
+> "deleted" messages keep showing up in searches.\r
+>=20\r
+> Basically we have two options as I see it:\r
+>=20\r
+> - add keys bindings to add "deleted" tags, and then *also* exclude\r
+>   "tag:deleted" by default.\r
+>=20\r
+> - don't exclude anything by default, but then don't add any special keys\r
+>   to handle "deleted" tags.\r
+>=20\r
+\r
+Adding a key to "delete" messages doesn't necessarily have to mean that\r
+the tag it adds should be hardcoded to "deleted".\r
+\r
+For example, our config file could contain something like this:\r
+\r
+  #+begin_src conf\r
+    [new]\r
+    tags=3Dunread;inbox;\r
+\r
+    [tag]\r
+    deleted=3Ddeleted;-inbox;\r
+    archive=3D-inbox;\r
+\r
+    [search]\r
+    exclude_tags=3Ddeleted;spam;\r
+  #+end_src\r
+\r
+  (where all entries under the [tag] section could be used as\r
+   aliases for "complex" tagging operations)\r
+\r
+... and then we could "delete" messages using something like:\r
+\r
+  #+begin_src emacs-lisp\r
+    (define-key notmuch-show-mode-map "d"\r
+      (lambda()\r
+        (interactive)\r
+        (notmuch-show-mod-tags\r
+          (split-string\r
+            (notmuch-config-get "tag.deleted") "\n"))\r
+        (notmuch-show-next-open-message)))\r
+  #+end_src\r
+\r
+  (`notmuch-show-mod-tags' doesn't exist, of course, but see\r
+   `notmuch-message-mark-replied' for a good example of how\r
+   it could be work...)\r
+\r
+> There seemed to be a consensus forming that we in fact did want to add\r
+> the "deleted" key bindings.  [...]\r
+\r
++1.\r
+\r
+> [...] If we do that, then I think we should\r
+> generate the config file to exclude "deleted" tags by default.\r
+>=20\r
+> jamie.\r
+>=20\r
+> PS: when I say "exclude tags by default" I actually mean that the\r
+> setting should be added to the config file upon (re)generation.  Nothing\r
+> should be excluded if nothing is set in the config file.\r
+\r
+Exactly!  This is actually the *only* reason I involved myself with this\r
+whole conversation in the first place :)\r
+\r
+\r
+Peace\r
+\r
+--=20\r
+Pieter\r