GNU bug report logs - #69017
30.0.50; [debbugs] Make compilation step optional in debbugs-gnu-apply-patch

Previous Next

Package: emacs;

Reported by: Eric Abrahamsen <eric <at> ericabrahamsen.net>

Date: Sat, 10 Feb 2024 17:54:02 UTC

Severity: normal

Found in version 30.0.50

Done: Eric Abrahamsen <eric <at> ericabrahamsen.net>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 69017 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: michael.albinus <at> gmx.de, 69017 <at> debbugs.gnu.org
Subject: Re: bug#69017: 30.0.50; [debbugs] Make compilation step optional in
 debbugs-gnu-apply-patch
Date: Sat, 10 Feb 2024 12:52:42 -0800
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
>> Cc: michael.albinus <at> gmx.de,  69017 <at> debbugs.gnu.org
>> Date: Sat, 10 Feb 2024 11:58:56 -0800
>> 
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> 
>> >> Cc: 69017 <at> debbugs.gnu.org
>> >> From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
>> >> Date: Sat, 10 Feb 2024 11:23:30 -0800
>> >> 
>> >> Out of curiosity, do you use any convenience functions for applying
>> >> patches from email->repository?
>> >
>> > I use M-|, FWIW.
>> 
>> That's what I was trying to avoid! You're the one who has to handle
>> attachments vs inline, type out the directory location, decide between
>> "git am" and "git apply", etc...
>> 
>> If you're doing it 50 times a day, maybe the muscle memory (or command
>> history) means it's not a big deal.
>
> Emacs remembers the command history, so all I have to do is press <UP>
> a few times, after I type M-|, then type RET.
>
> And some figuring out is still up to you, because patches could be for
> the release branch or for the master (and maybe for a few more
> branches), so you'd need some "cd foo" before "git am".  I have a
> command for master and for the release branch, and I need to decide
> which one to use in each case.  That cannot be automated.

Yup, that makes plenty of sense. Your situation is more complicated than
mine, no surprise there!

I've attached the minimum workable approach, which just lets the user
set the compile command to nil to skip compilation, and the relevant
window rearrangements afterwards.

A fuller solution might be a "after-apply-patch-actions" option, that takes a
list like '(compile vc). That could obviate
`debbugs-gnu-apply-patch-prefers-magit' because you could just set the
list to '(compile magit) instead. But that would require a pretty
thorough reworking of the window munging code that comes at the end, and
I'd like to just keep this simple.

[0001-Don-t-compile-after-applying-a-patch-if-compile-comm.patch (text/x-patch, attachment)]

This bug report was last modified 1 year and 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.