From: Pieter Praet Date: Thu, 1 Mar 2012 17:13:27 +0000 (+0100) Subject: Re: [PATCH] emacs: Mention race condition safety in user visible documentation X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=684f0c2ede92bf8bcc7108a37c581b13a2f33eef;p=notmuch-archives.git Re: [PATCH] emacs: Mention race condition safety in user visible documentation --- diff --git a/98/dd5c7b8f00cc37dfc27b8c78747a87cd815833 b/98/dd5c7b8f00cc37dfc27b8c78747a87cd815833 new file mode 100644 index 000000000..727e139a7 --- /dev/null +++ b/98/dd5c7b8f00cc37dfc27b8c78747a87cd815833 @@ -0,0 +1,132 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 2E7E5431FDE + for ; Thu, 1 Mar 2012 09:15:50 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id xwe4KgD-UxxO for ; + Thu, 1 Mar 2012 09:15:49 -0800 (PST) +Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com + [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 1EC76431FAE + for ; Thu, 1 Mar 2012 09:15:49 -0800 (PST) +Received: by wico1 with SMTP id o1so111449wic.26 + for ; Thu, 01 Mar 2012 09:15:48 -0800 (PST) +Received-SPF: pass (google.com: domain of pieter@praet.org designates + 10.180.104.137 as permitted sender) client-ip=10.180.104.137; +Authentication-Results: mr.google.com; + spf=pass (google.com: domain of pieter@praet.org + designates 10.180.104.137 as permitted sender) + smtp.mail=pieter@praet.org +Received: from mr.google.com ([10.180.104.137]) + by 10.180.104.137 with SMTP id ge9mr12667718wib.20.1330622148037 + (num_hops = 1); Thu, 01 Mar 2012 09:15:48 -0800 (PST) +Received: by 10.180.104.137 with SMTP id ge9mr10150495wib.20.1330622147981; + Thu, 01 Mar 2012 09:15:47 -0800 (PST) +Received: from localhost ([109.131.111.80]) + by mx.google.com with ESMTPS id h19sm43037454wiw.9.2012.03.01.09.15.47 + (version=TLSv1/SSLv3 cipher=OTHER); + Thu, 01 Mar 2012 09:15:47 -0800 (PST) +From: Pieter Praet +To: David Bremner , Michal Sojka +Subject: Re: [PATCH] emacs: Mention race condition safety in user visible + documentation +In-Reply-To: <87wr759gs5.fsf@zancas.localnet> +References: <1329605059-15358-1-git-send-email-sojkam1@fel.cvut.cz> + + <87y5rzmg5v.fsf@steelpick.2x.cz> <87vcn0tw1f.fsf@qmul.ac.uk> + <87linwsg2r.fsf@steelpick.2x.cz> <87wr759gs5.fsf@zancas.localnet> +User-Agent: Notmuch/0.11.1+210~g6afc43e (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-unknown-linux-gnu) +Date: Thu, 01 Mar 2012 18:13:27 +0100 +Message-ID: <87linkmeh4.fsf@praet.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Gm-Message-State: + ALoCoQkyLPq+o9a6j8RRkbvAL+nwloySknzNxHuOV7nPRpdV+gT+w1yaH+oC+oJp5SEm4NIpQhBO +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Thu, 01 Mar 2012 17:15:50 -0000 + +On Wed, 29 Feb 2012 22:49:46 -0400, David Bremner wrote: +> On Tue, 21 Feb 2012 10:15:08 +0100, Michal Sojka wrote: +> > -- >8 -- +> > Subject: [PATCH] emacs: Clarify description of thread manipulating functions +> > +> > It is not clear whether the term "thread" refers to the thread in the +> > database or to the thread currently shown in a buffer. Those two +> > meanings may refer to different sets of messages, e.g. when a new email +> > is added to the database while the buffer shows the state before the new +> > email arrived. +> +> (will be) pushed. +> +> For future reference, it's slightly inconvenient for me to use "git am +> -c". Not a big deal, but a sequence of those would make me cry... +> + +Something like this might help save you some time: +(assuming you'd rather not leave Emacs to apply patches) + + #+begin_src emacs-lisp + (defvar praet/projects + '(("notmuch@notmuchmail.org" . "~/src/dev/notmuch/") + ("foo@bar.org" . "~/src/dev/foobar/"))) + + (defun praet/notmuch-patch-apply (&optional all-open) + "Apply a patch from `notmuch-show-mode' using git-am(1). + If ALL-OPEN is non-nil, (try to) apply all open messages." + (interactive "P") + (let* ((msg (notmuch-show-get-message-id t)) + (rcpts (concat (notmuch-show-get-to) + (notmuch-show-get-cc))) + (projs (loop for project in praet/projects + if (string-match (car project) rcpts) + collect (cdr project))) + (proj (if (> (length projs) 1) + (ido-completing-read "Apply in: " projs) + (car projs))) + (cmd "git am --abort ; git am") + (optargs '("--signoff" "--3way" "--scissors")) + (args (read-string "Args: " nil '(optargs . 0)))) + (message "Applying in '%s': '%s' (using '%s %s')" + proj msg cmd args) + (notmuch-show-pipe-message all-open + (concat "(cd " proj " && (" cmd " " args ")" ")")))) + + (define-key notmuch-show-mode-map (kbd "C-c p a") + 'praet/notmuch-patch-apply) + #+end_src + + +> d +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch + + +Peace + +-- +Pieter