unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Pieter Praet <pieter@praet.org>
To: David Bremner <david@tethera.net>, Michal Sojka <sojkam1@fel.cvut.cz>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: Mention race condition safety in user visible documentation
Date: Thu, 01 Mar 2012 18:13:27 +0100	[thread overview]
Message-ID: <87linkmeh4.fsf@praet.org> (raw)
In-Reply-To: <87wr759gs5.fsf@zancas.localnet>

On Wed, 29 Feb 2012 22:49:46 -0400, David Bremner <david@tethera.net> wrote:
> On Tue, 21 Feb 2012 10:15:08 +0100, Michal Sojka <sojkam1@fel.cvut.cz> 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

  reply	other threads:[~2012-03-01 17:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-18 22:44 [PATCH] emacs: Mention race condition safety in user visible documentation Michal Sojka
2012-02-19  7:05 ` Jani Nikula
2012-02-19  7:33   ` Michal Sojka
2012-02-21  8:45     ` Mark Walters
2012-02-21  9:15       ` Michal Sojka
2012-02-22 20:04         ` Pieter Praet
2012-02-22 20:09           ` [PATCH] emacs: correct `notmuch-search-mode's docstring wrt `notmuch-search-tag-all' Pieter Praet
2012-04-16 19:18             ` Mark Walters
2012-09-02  2:36             ` David Bremner
2012-03-01  2:49         ` [PATCH] emacs: Mention race condition safety in user visible documentation David Bremner
2012-03-01 17:13           ` Pieter Praet [this message]
2012-03-01 18:21             ` David Bremner
2012-03-01 18:26               ` David Bremner
2012-02-28 18:39 ` Pieter Praet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87linkmeh4.fsf@praet.org \
    --to=pieter@praet.org \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    --cc=sojkam1@fel.cvut.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).