From: lee <lee@yun.yagibdah.de>
To: ding@gnus.org
Subject: Re: Externally feeding the drafts folder -- git format-patch integration
Date: Tue, 04 Mar 2014 11:40:07 +0100 [thread overview]
Message-ID: <87k3cas0vs.fsf@yun.yagibdah.de> (raw)
In-Reply-To: <87a9dceidf.fsf@lifelogs.com> (Ted Zlatanov's message of "Thu, 27 Feb 2014 09:32:28 -0500")
Ted Zlatanov <tzz@lifelogs.com> writes:
> On Sat, 22 Feb 2014 10:20:42 +0100 Elias Oltmanns <eo@nebensachen.de> wrote:
>
> ...
> EO> 2. Generate a patch series from the local commits with a command like
> EO> $ git format-patch --thread --cover-letter --to developer@example.org \
> EO> --cc devel@list.example.org --stdout > ~/Mail/git.spool
> EO> 3. Fire up gnus and have the patch series stored in ~/Mail/git.spool
> EO> magically appear in the drafts group so I can edit the cover letter
> EO> and possibly annotate some of the other messages too before sending
> EO> the off.
>
> I don't know that piece, sorry. But it can probably be automated with
> some effort. I know the drafts group is special. "Lars" special.
>
> You could maybe start an gnus-slave session with a new buffer in
> message-mode, insert the message, and save it as a draft?
You can use (setq gnus-agent-queue-mail 'always) to queue all outgoing
messages in the draft folder. Insert messages into gnus with the
following function (which you can put into ~/.emacs"):
(defun my-gnus-group-mail (arg)
"Start composing a mail.
Use the group given in ARG to find a posting style."
(interactive "P")
;; We can't `let' gnus-newsgroup-name here, since that leads
;; to local variables leaking.
(let ((group gnus-newsgroup-name)
;; make sure last viewed article doesn't affect posting styles:
(gnus-article-copy)
(buffer (current-buffer)))
(unwind-protect
(progn
(setq gnus-newsgroup-name arg)
;; #### see comment in gnus-setup-message -- drv
(gnus-setup-message 'message (message-mail)))
(with-current-buffer buffer
(setq gnus-newsgroup-name group)))))
Then call emacsclient like:
emacsclient -e '(my-gnus-group-mail "example.group")'
Gnus should be running before you call above function.
When you use a posting style for "example.group" that involves something
like (body :file "~/example-group-template.txt"), you can create an
email from the command line or from a script to pull in your patch as an
attachment. You get a buffer to edit the mail, so you don´t need to
queue up all outgoing mail. Of course, you could also point to the
patch file rather than a template that includes it as an attachment to
have the patch directly in the message.
For varying recipients and subjects, I´m using something like ("To"
:file "~/email-template-header-to.txt") and ("Subject" :file
"~/email-template-header-subject.txt") in the posting style.
These files are generated by a perl script. I suppose you could write
one that draws in your patches and sends them off with gnus.
This works fine, though gnus should have some way to automatically send
messages from a script/command line, optionally allowing you to edit the
message before sending it out. The way I´m doing it is going to some
lengths to get there. We shouldn´t need to use mutt or the like to
generate messages which we Cc: or Bcc: to ourselves to get them into
gnus, especially not when we use emacs to edit them before sending them
anyway ...
--
Debugger entered--Lisp error: (error "No error here")
signal(error ("No error here"))
error("No %s here" "error")
next prev parent reply other threads:[~2014-03-04 10:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-22 9:20 Elias Oltmanns
2014-02-27 14:32 ` Ted Zlatanov
2014-03-04 10:40 ` lee [this message]
2014-03-04 16:25 ` Elias Oltmanns
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k3cas0vs.fsf@yun.yagibdah.de \
--to=lee@yun.yagibdah.de \
--cc=ding@gnus.org \
/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.
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 NNTP newsgroup(s).