On Fri, Jan 12, 2024 at 05:21:51PM +0100, Clément Lassieur wrote:
> On Thu, Jan 11 2024, Sharlatan Hellseher wrote:
> 
> > Hi Guix!
> >
> > I am happy to have been granted commit access and I am ready to help
> > review pending issues and prepare queued packages for GNU packages in
> > astronomy. I would like to concentrate on the packages covered by the
> > Go, Lisp, Python, and Science teams.
> >
> > I would like to thank the Guix team for allowing me to become a
> > committer member. I am looking forward to continuing our collaboration.
> >
> > If anyone has a good patch review workflow using Emacs, Gnus, and Magit,
> > I would appreciate it ;-)
> 
> Hey, welcome.
> 
> I use this Emacs code to apply patches, with emacs-debbugs and Gnus.
> 
> --8<---------------cut here---------------start------------->8---
> (defun my-apply-patch-or-abort ()
>   (interactive)
>   (my-apply-patch-internal "git am || git am --abort"))
> 
> (defun my-apply-patch ()
>   (interactive)
>   (my-apply-patch-internal "git am --reject"))
> 
> (defun my-apply-patch-or-abort-attachment (n)
>   (interactive "P")
>   (my-apply-patch-attachment-internal "git am || git am --abort" n))
> 
> (defun my-apply-patch-attachment (n)
>   (interactive "P")
>   (my-apply-patch-attachment-internal "git am --reject" n))
> 
> (defun my-apply-patch-attachment-internal (cmd n)
>   "C-u <attachment number> M-x my-apply-..."
>   (let ((git-dir "~/src/guix"))
>     (save-window-excursion
>       (gnus-article-part-wrapper
>        n
>        (lambda (handle)
>          (let ((default-directory git-dir))
>            (mm-pipe-part handle cmd)))))))
> 
> (defun my-apply-patch-internal (cmd)
>   "Works with a selection of articles."
>   (let ((git-dir "~/src/guix")
>         (articles (gnus-summary-work-articles nil)))
>     (save-window-excursion
>       (while articles
>         (gnus-summary-goto-subject (pop articles))
>         (with-current-buffer gnus-summary-buffer
>           (let ((default-directory git-dir))
>             (gnus-summary-save-in-pipe cmd))
>           (gnus-article-hide-headers))))))
> --8<---------------cut here---------------end--------------->8---
> 
> Just my 2 cents, I imagine every person here has their own workflow.

I'm going to suggest 'git am -3' that someone else here suggested to me.
When a patch fails to apply cleanly git will try harder and leave the
failed-to-apply bits inside the code, making it easier to clean-up the
patch than to manually apply it.

-- 
Efraim Flashner   <efr...@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Attachment: signature.asc
Description: PGP signature

Reply via email to