emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sending patch with Gnus


From: Francis Moreau
Subject: Re: Sending patch with Gnus
Date: Thu, 16 Dec 2010 21:20:10 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Leo <address@hidden> writes:

> On 2010-12-16 10:01 +0000, Francis Moreau wrote:
>> Leo <address@hidden> writes:
>>
>> [...]
>
>>
>>>
>>> I tweaked gnus-dired to support git-send-email (patches attached).
>>
>> Thanks for doing that.
>>
>> Unfortunately your patches don't seem to be based on Gnus repository but
>> rather to emacs one that I don't have. So I can't test them.
>
> OK, I put it in a separate file as attached.
>
>>> So if you have gnus-dired loaded you can in dired buffer:
>>>
>>> C-c C-m C-i    import patches as DRAFTS
>>> C-c C-m C-s    send patches directly
>>>
>>> This is handy when you need to send a large patch set. For one to two
>>> patches I just copy and paste.
>>
>> Funny because I feel the opposite, I use git-send-email(1) when dealing
>> with a large patch set since the overhead to set it up is ok in this
>> case. But for one patch, I do it by hands as you do, but I would prefer
>> to not have editing the email manually.
>>
>> But I think, your approach can still be usefull since it imports patches
>> as _drafts_. I don't think it's a good idea to modify the patch itself,
>> but modifying or adding some header fields like To, Cc, Bcc... should be
>> ok. And I like to check what the patch looks like before sending it.
>>
>> One other idea is to generate one or several drafts from a buffer which
>> contains one or several mbox files. Let's call the magic command: M-x
>> create-draft-from-buffer (yeah the name sucks).
>>
>> With such command, one could do in an emacs session:
>>
>>   M-! git format-patch --stdout HEAD~4
>>   C-x o
>>   M-x create-draft-from-buffer
>>
>> So you're putting in the *Shell Command Output* buffer the mbox files,
>> and then switching to that buffer and generating the drafts. The main
>> advantages I see is that you use a shell command to generate the buffer
>> containing the patches.
>>
>> BTW, if you needn't to modify the patches and only want to see them
>> before sending them then you can currently do this:
>>
>>   M-! git format-patch --stdout HEAD~4 >/tmp/patch-set.mbox
>>   C-x b *Group*
>>   G f /tmp/patch-set.mbox
>>
>> This will create a nndoc group which contains all your patches as
>> articles.
>>
>> Then you can mark all of them and resend them with 'S D r'. But you
>> can't add Cc or Gcc header fields with this method.
>
> Now we have four commands (not bound to any keys for the moment)
>
>   gitmail-import-mbox-as-draft
>   gitmail-send-mbox
>   gitmail-send-mbox-buffer
>   gitmail-import-mbox-buffer

why making them Git specific like the command names suggest ?

I would actually do: 's/gitmail/gnus/'

>
> Editing drafts in Gnus resets the date so you need this small patch (or
> is there a butter way to handle this?):

I know almost nothing in elisp sorry, so I can't comment your patches.

However I would be interested to know what Gnus developpers think about
these new commands. I don't think that Gnus is currently able to import
a mbox file/buffer and make it a draft(s). Also your gnus-dired stuffs
seem interesting.

-- 
Francis



reply via email to

[Prev in Thread] Current Thread [Next in Thread]