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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 69017 in the body.
You can then email your comments to 69017 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#69017; Package emacs. (Sat, 10 Feb 2024 17:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eric Abrahamsen <eric <at> ericabrahamsen.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 10 Feb 2024 17:54:02 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; [debbugs] Make compilation step optional in
 debbugs-gnu-apply-patch
Date: Sat, 10 Feb 2024 09:42:57 -0800
I've started using `debbugs-gnu-apply-patch' regularly, and find it
enormously useful -- it's particularly nice that it handles both inline
patches and attachments.

I don't love the automatic compilation step, though. I pretty much never
want to go straight to compilation; it is very long; and the windows are
a mess until it finishes. Even the magit/vc step afterwards is often not
what I want, as I have Magit already open on Emacs somewhere else.

How about some sort of custom option to control this? Either
specifically compile-after-apply, or maybe a list of post-apply-actions,
something like that?

Thanks,
Eric




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69017; Package emacs. (Sat, 10 Feb 2024 19:01:03 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 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 19:54:55 +0100
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

Hi Eric,

> I've started using `debbugs-gnu-apply-patch' regularly, and find it
> enormously useful -- it's particularly nice that it handles both inline
> patches and attachments.
>
> I don't love the automatic compilation step, though. I pretty much never
> want to go straight to compilation; it is very long; and the windows are
> a mess until it finishes. Even the magit/vc step afterwards is often not
> what I want, as I have Magit already open on Emacs somewhere else.
>
> How about some sort of custom option to control this? Either
> specifically compile-after-apply, or maybe a list of post-apply-actions,
> something like that?

I don't use `debbugs-gnu-apply-patch' by myself, so I have no opinion
about. It was written by Lars for his own workflow.

No objections from my side, if you make some optional changes. And
please document them in debbugs-ug.texi.

> Thanks,
> Eric

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69017; Package emacs. (Sat, 10 Feb 2024 19:24:01 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 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 11:23:30 -0800
On 02/10/24 19:54 PM, Michael Albinus wrote:
> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
> Hi Eric,
>
>> I've started using `debbugs-gnu-apply-patch' regularly, and find it
>> enormously useful -- it's particularly nice that it handles both inline
>> patches and attachments.
>>
>> I don't love the automatic compilation step, though. I pretty much never
>> want to go straight to compilation; it is very long; and the windows are
>> a mess until it finishes. Even the magit/vc step afterwards is often not
>> what I want, as I have Magit already open on Emacs somewhere else.
>>
>> How about some sort of custom option to control this? Either
>> specifically compile-after-apply, or maybe a list of post-apply-actions,
>> something like that?
>
> I don't use `debbugs-gnu-apply-patch' by myself, so I have no opinion
> about. It was written by Lars for his own workflow.

Out of curiosity, do you use any convenience functions for applying
patches from email->repository?

> No objections from my side, if you make some optional changes. And
> please document them in debbugs-ug.texi.

Okay! Thanks. I have a quick question: the :version tags on the
defcustoms in debbug-gnu.el all seem to refer to Emacs versions,
shouldn't they refer to debbugs package versions? Or is this also a Lars
thing?

Thanks,
Eric




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69017; Package emacs. (Sat, 10 Feb 2024 19:29:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
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 21:27:46 +0200
> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69017; Package emacs. (Sat, 10 Feb 2024 20:00:02 GMT) Full text and rfc822 format available.

Message #17 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 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69017; Package emacs. (Sat, 10 Feb 2024 20:27:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
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 22:26:03 +0200
> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69017; Package emacs. (Sat, 10 Feb 2024 20:54:02 GMT) Full text and rfc822 format available.

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)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69017; Package emacs. (Sun, 11 Feb 2024 08:20:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 69017 <at> debbugs.gnu.org
Subject: Re: bug#69017: 30.0.50; [debbugs] Make compilation step optional in
 debbugs-gnu-apply-patch
Date: Sun, 11 Feb 2024 09:18:58 +0100
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

Hi Eric,

> 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.

Looks OK in general. You need to adapt the :type of
debbugs-gnu-compile-command, and also to add some few words about in
debbugs-ug.texi.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69017; Package emacs. (Sun, 11 Feb 2024 08:26:01 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 69017 <at> debbugs.gnu.org
Subject: Re: bug#69017: 30.0.50; [debbugs] Make compilation step optional in
 debbugs-gnu-apply-patch
Date: Sun, 11 Feb 2024 09:11:34 +0100
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

Hi Eric,

>> I don't use `debbugs-gnu-apply-patch' by myself, so I have no opinion
>> about. It was written by Lars for his own workflow.
>
> Out of curiosity, do you use any convenience functions for applying
> patches from email->repository?

I stupidly use ediff-patch-file (Tools → Apply Patch → To a File...).
vc-specific operations I perform in a vc-dir buffer afterwards. That's it.

> I have a quick question: the :version tags on the
> defcustoms in debbug-gnu.el all seem to refer to Emacs versions,
> shouldn't they refer to debbugs package versions? Or is this also a Lars
> thing?

No, this is a Michael thing :-)

We could add :package-version tags to the defcustoms, I've been too lazy
until now.

> Thanks,
> Eric

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69017; Package emacs. (Sun, 11 Feb 2024 15:06:01 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 69017 <at> debbugs.gnu.org
Subject: Re: bug#69017: 30.0.50; [debbugs] Make compilation step optional in
 debbugs-gnu-apply-patch
Date: Sun, 11 Feb 2024 07:05:19 -0800
Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:

> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
> Hi Eric,
>
>>> I don't use `debbugs-gnu-apply-patch' by myself, so I have no opinion
>>> about. It was written by Lars for his own workflow.
>>
>> Out of curiosity, do you use any convenience functions for applying
>> patches from email->repository?
>
> I stupidly use ediff-patch-file (Tools → Apply Patch → To a File...).
> vc-specific operations I perform in a vc-dir buffer afterwards. That's it.

It's becoming obvious that the real pros just do it by hand!

>> I have a quick question: the :version tags on the
>> defcustoms in debbug-gnu.el all seem to refer to Emacs versions,
>> shouldn't they refer to debbugs package versions? Or is this also a Lars
>> thing?
>
> No, this is a Michael thing :-)
>
> We could add :package-version tags to the defcustoms, I've been too lazy
> until now.

Actually it's also partially an Eric thing, I see that :version is
documented as specifically referring to Emacs versions. That seems not
very meaningful, but I'm also not trying to create extra work for anyone!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69017; Package emacs. (Sun, 11 Feb 2024 15:44:02 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 69017 <at> debbugs.gnu.org
Subject: Re: bug#69017: 30.0.50; [debbugs] Make compilation step optional in
 debbugs-gnu-apply-patch
Date: Sun, 11 Feb 2024 07:05:44 -0800
Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:

> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
> Hi Eric,
>
>> 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.
>
> Looks OK in general. You need to adapt the :type of
> debbugs-gnu-compile-command, and also to add some few words about in
> debbugs-ug.texi.

Sounds good, I'll do those things and close this up later today. Thanks!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69017; Package emacs. (Sun, 11 Feb 2024 16:11:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 69017 <at> debbugs.gnu.org
Subject: Re: bug#69017: 30.0.50; [debbugs] Make compilation step optional in
 debbugs-gnu-apply-patch
Date: Sun, 11 Feb 2024 16:43:29 +0100
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

Hi Eric,

>> Looks OK in general. You need to adapt the :type of
>> debbugs-gnu-compile-command, and also to add some few words about in
>> debbugs-ug.texi.
>
> Sounds good, I'll do those things and close this up later today. Thanks!

If there's nothing else to do, you might also increase the version in
debbugs.el to 0.40.

Best regards, Michael.




Reply sent to Eric Abrahamsen <eric <at> ericabrahamsen.net>:
You have taken responsibility. (Fri, 16 Feb 2024 05:52:02 GMT) Full text and rfc822 format available.

Notification sent to Eric Abrahamsen <eric <at> ericabrahamsen.net>:
bug acknowledged by developer. (Fri, 16 Feb 2024 05:52:02 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 69017-done <at> debbugs.gnu.org
Subject: Re: bug#69017: 30.0.50; [debbugs] Make compilation step optional in
 debbugs-gnu-apply-patch
Date: Thu, 15 Feb 2024 21:50:36 -0800
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
> Hi Eric,
>
>>> Looks OK in general. You need to adapt the :type of
>>> debbugs-gnu-compile-command, and also to add some few words about in
>>> debbugs-ug.texi.
>>
>> Sounds good, I'll do those things and close this up later today. Thanks!
>
> If there's nothing else to do, you might also increase the version in
> debbugs.el to 0.40.

Done! Thanks.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 15 Mar 2024 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 133 days ago.

Previous Next


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