Re: [PATCH] emacs: Mention race condition safety in user visible documentation
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 21 Feb 2012 09:15:08 +0000 (10:15 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:46 +0000 (09:44 -0800)
f9/877f13fdc9b3024c63ac43f2105e65fa0e9441 [new file with mode: 0644]

diff --git a/f9/877f13fdc9b3024c63ac43f2105e65fa0e9441 b/f9/877f13fdc9b3024c63ac43f2105e65fa0e9441
new file mode 100644 (file)
index 0000000..7fe5342
--- /dev/null
@@ -0,0 +1,147 @@
+Return-Path: <sojka@os.inf.tu-dresden.de>\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 0CC4D431FB6\r
+       for <notmuch@notmuchmail.org>; Tue, 21 Feb 2012 01:15:23 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3] 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 NeaHjP0SSU3v for <notmuch@notmuchmail.org>;\r
+       Tue, 21 Feb 2012 01:15:19 -0800 (PST)\r
+Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
+       by olra.theworths.org (Postfix) with ESMTP id 0B0EF431FAE\r
+       for <notmuch@notmuchmail.org>; Tue, 21 Feb 2012 01:15:18 -0800 (PST)\r
+Received: from localhost (unknown [192.168.200.4])\r
+       by max.feld.cvut.cz (Postfix) with ESMTP id 2B03019F33B5;\r
+       Tue, 21 Feb 2012 10:15:18 +0100 (CET)\r
+X-Virus-Scanned: IMAP AMAVIS\r
+Received: from max.feld.cvut.cz ([192.168.200.1])\r
+       by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,\r
+       port 10044)\r
+       with ESMTP id SMoqaRalEavI; Tue, 21 Feb 2012 10:15:12 +0100 (CET)\r
+Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
+       by max.feld.cvut.cz (Postfix) with ESMTP id 58C7A19F3436;\r
+       Tue, 21 Feb 2012 10:15:12 +0100 (CET)\r
+Received: from steelpick.2x.cz (unknown [141.76.49.23])\r
+       (Authenticated sender: sojkam1)\r
+       by imap.feld.cvut.cz (Postfix) with ESMTPSA id CE850660968;\r
+       Tue, 21 Feb 2012 10:15:08 +0100 (CET)\r
+Received: from wsh by steelpick.2x.cz with local (Exim 4.77)\r
+       (envelope-from <sojka@os.inf.tu-dresden.de>)\r
+       id 1RzloS-0004jJ-J7; Tue, 21 Feb 2012 10:15:08 +0100\r
+From: Michal Sojka <sojkam1@fel.cvut.cz>\r
+To: Mark Walters <markwalters1009@gmail.com>, Jani Nikula <jani@nikula.org>\r
+Subject: Re: [PATCH] emacs: Mention race condition safety in user visible\r
+       documentation\r
+In-Reply-To: <87vcn0tw1f.fsf@qmul.ac.uk>\r
+References: <1329605059-15358-1-git-send-email-sojkam1@fel.cvut.cz>\r
+       <CAB+hUn907hwS46jM4FY+BAhBTE1VMaMs=q0PFEou3DfWWaDF8g@mail.gmail.com>\r
+       <87y5rzmg5v.fsf@steelpick.2x.cz> <87vcn0tw1f.fsf@qmul.ac.uk>\r
+User-Agent: Notmuch/0.11.1+210~g5c2fc0a (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Tue, 21 Feb 2012 10:15:08 +0100\r
+Message-ID: <87linwsg2r.fsf@steelpick.2x.cz>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Cc: 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: Tue, 21 Feb 2012 09:15:23 -0000\r
+\r
+On Tue, 21 Feb 2012, Mark Walters wrote:\r
+> On Sun, 19 Feb 2012 08:33:00 +0100, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\r
+> > On Sun, 19 Feb 2012, Jani Nikula wrote:\r
+> > > On Feb 19, 2012 12:44 AM, "Michal Sojka" <sojkam1@fel.cvut.cz> wrote:\r
+> > > >\r
+> > > > After recent rework of a/A/x/X key bindings, the important paragraph in\r
+> > > > documentation of `notmuch-show-archive-thread' stayed hidden from users,\r
+> > > > because no key is bound to this function.\r
+> > > >\r
+> > > > This patch copies the important paragraph to the documentation of\r
+> > > > functions currently bound to keys.\r
+> > > \r
+> > > Hi Michal, this was discussed earlier, and Dmitry convinced me that the\r
+> > > code does exactly what the user expects it to do (archives only the\r
+> > > messages in the buffer) so it would be unnecessary and confusing to have\r
+> > > this documentation. It could be added as a comment for developers I\r
+> > > guess.\r
+> > \r
+> > I'm not sure. As a developer, I'm used to think about race conditions\r
+> > and the mentioned documentation sounds very racy to me. I guess a lot of\r
+> > other notmuch users are developers who may think the same.\r
+> > \r
+> > > >  (defun notmuch-show-archive-thread-then-next ()\r
+> > > > -  "Archive each message in thread, then show next thread from search."\r
+> > \r
+> > What about changing it to "Archive each message in the current buffer, ..."?\r
+> \r
+> I like this suggested wording (or perhaps "Archive all messages in the\r
+> current buffer, ..."). I do not think `Archive each message in thread' is\r
+> completely clear (is the thread the thread as it is now or as it was\r
+> then).\r
+\r
+OK, at least one supporter here :) The updated patch follows:\r
+\r
+-- >8 --\r
+Subject: [PATCH] emacs: Clarify description of thread manipulating functions\r
+\r
+It is not clear whether the term "thread" refers to the thread in the\r
+database or to the thread currently shown in a buffer. Those two\r
+meanings may refer to different sets of messages, e.g. when a new email\r
+is added to the database while the buffer shows the state before the new\r
+email arrived.\r
+\r
+This patch replaces the term thread with the term current buffer, which\r
+is hopefully less ambiguous.\r
+---\r
+ emacs/notmuch-show.el |    6 +++---\r
+ 1 files changed, 3 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index aa9ccee..3515d03 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -1628,7 +1628,7 @@ TAG-CHANGES is a list of tag operations for `notmuch-tag'."\r
+     (apply 'notmuch-show-tag-message tag-changes)))\r
\r
+ (defun notmuch-show-tag-all (&rest tag-changes)\r
+-  "Change tags for all messages in the current thread.\r
++  "Change tags for all messages in the current buffer.\r
\r
+ TAG-CHANGES is a list of tag operations for `notmuch-tag'."\r
+   (interactive (notmuch-read-tag-changes nil notmuch-show-thread-id))\r
+@@ -1721,13 +1721,13 @@ buffer."\r
+     (notmuch-show-tag-all (concat op "inbox"))))\r
\r
+ (defun notmuch-show-archive-thread-then-next ()\r
+-  "Archive each message in thread, then show next thread from search."\r
++  "Archive all messages in the current buffer, then show next thread from search."\r
+   (interactive)\r
+   (notmuch-show-archive-thread)\r
+   (notmuch-show-next-thread t))\r
\r
+ (defun notmuch-show-archive-thread-then-exit ()\r
+-  "Archive each message in thread, then exit back to search results."\r
++  "Archive all messages in the current buffer, then exit back to search results."\r
+   (interactive)\r
+   (notmuch-show-archive-thread)\r
+   (notmuch-show-next-thread))\r
+-- \r
+1.7.7.3\r
+\r