[PATCH] emacs: Mention race condition safety in user visible documentation

Jani Nikula jani at nikula.org
Sat Feb 18 23:05:17 PST 2012


On Feb 19, 2012 12:44 AM, "Michal Sojka" <sojkam1 at fel.cvut.cz> wrote:
>
> After recent rework of a/A/x/X key bindings, the important paragraph in
> documentation of `notmuch-show-archive-thread' stayed hidden from users,
> because no key is bound to this function.
>
> This patch copies the important paragraph to the documentation of
> functions currently bound to keys.

Hi Michal, this was discussed earlier, and Dmitry convinced me that the
code does exactly what the user expects it to do (archives only the
messages in the buffer) so it would be unnecessary and confusing to have
this documentation. It could be added as a comment for developers I guess.

BR,
Jani.

> ---
>  emacs/notmuch-show.el |   14 ++++++++++++--
>  1 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index aa9ccee..1916146 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1721,13 +1721,23 @@ buffer."
>     (notmuch-show-tag-all (concat op "inbox"))))
>
>  (defun notmuch-show-archive-thread-then-next ()
> -  "Archive each message in thread, then show next thread from search."
> +  "Archive each message in thread, then show next thread from search.
> +
> +Note: This command is safe from any race condition of new messages
> +being delivered to the same thread. It does not archive the
> +entire thread, but only the messages shown in the current
> +buffer."
>   (interactive)
>   (notmuch-show-archive-thread)
>   (notmuch-show-next-thread t))
>
>  (defun notmuch-show-archive-thread-then-exit ()
> -  "Archive each message in thread, then exit back to search results."
> +  "Archive each message in thread, then exit back to search results.
> +
> +Note: This command is safe from any race condition of new messages
> +being delivered to the same thread. It does not archive the
> +entire thread, but only the messages shown in the current
> +buffer."
>   (interactive)
>   (notmuch-show-archive-thread)
>   (notmuch-show-next-thread))
> --
> 1.7.7.3
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120219/6129baa0/attachment.html>


More information about the notmuch mailing list