GNU bug report logs - #64064
[PATCH 0/4] debbugs improvements

Previous Next

Package: emacs;

Reported by: Morgan Smith <Morgan.J.Smith <at> outlook.com>

Date: Wed, 14 Jun 2023 12:17:02 UTC

Severity: normal

Tags: patch

Done: Michael Albinus <michael.albinus <at> gmx.de>

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 64064 in the body.
You can then email your comments to 64064 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#64064; Package emacs. (Wed, 14 Jun 2023 12:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Morgan Smith <Morgan.J.Smith <at> outlook.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 14 Jun 2023 12:17:02 GMT) Full text and rfc822 format available.

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

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: bug-gnu-emacs <at> gnu.org
Cc: Michael Albinus <michael.albinus <at> gmx.de>
Subject: [PATCH 0/4] debbugs improvements
Date: Wed, 14 Jun 2023 08:15:57 -0400
[Message part 1 (text/plain, inline)]
Hello!

These patches enable the use of some more 'tabulated-list' functions
like 'tabulated-list-sort' (bound to "S").

You may or may not want to install the last patch.  It does add
potential network calls to the 'revert-buffer' function.  If there are
legitimate reasons to revert the buffer without fetching new bugs then
people might not like that change.

Morgan Smith (4):
  Call 'tabulated-list-print-entry' in 'debbugs-gnu-print-entry'.
  Don't error out on 'nil' alist value.
  Don't sort bugs in 'debbugs-gnu-show-reports'.
  Add 'debbugs-gnu-rescan' to 'tabulated-list-revert-hook'.

 debbugs-gnu.el | 62 +++++++++-----------------------------------------
 1 file changed, 11 insertions(+), 51 deletions(-)
 
[0001-Call-tabulated-list-print-entry-in-debbugs-gnu-print.patch (text/x-patch, attachment)]
[0002-Don-t-error-out-on-nil-alist-value.patch (text/x-patch, attachment)]
[0003-Don-t-sort-bugs-in-debbugs-gnu-show-reports.patch (text/x-patch, attachment)]
[0004-Add-debbugs-gnu-rescan-to-tabulated-list-revert-hook.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64064; Package emacs. (Fri, 16 Jun 2023 08:51:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 64064 <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 0/4] debbugs improvements
Date: Fri, 16 Jun 2023 10:50:44 +0200
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

> Hello!

Hi Morgan,

> These patches enable the use of some more 'tabulated-list' functions
> like 'tabulated-list-sort' (bound to "S").

Thanks a lot! I will go through the patches, and add some comments.

However, debbugs is a GNU ELPA package. In order to apply non-trivial
patches there, the patch author shall have signed the FSF copyright
papers. That means, that the copyright is assigned to the FSF, that's
all. Are you willing to sign such papers?

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64064; Package emacs. (Fri, 16 Jun 2023 10:18:01 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 64064 <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 1/4] Call 'tabulated-list-print-entry' in
 'debbugs-gnu-print-entry'.
Date: Fri, 16 Jun 2023 12:16:51 +0200
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

> Some of the features of 'tabulated-list' (tabulated-list-next-column,
> tabulated-list-sort) didn't work properly because 'debbugs-gnu-print-entry'
> didn't set the 'tabulated-list-column-name' text property.  Instead of trying
> to duplicate code we can simply call 'tabulated-list-print-entry'.

Agreed.

> * debbugs-gnu.el (debbugs-gnu-print-entry): Remove all printing logic and
> replace with a call to 'tabulated-list-print-entry'.

According to my tests, this looks good.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64064; Package emacs. (Fri, 16 Jun 2023 10:23:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 64064 <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 2/4] Don't error out on 'nil' alist value.
Date: Fri, 16 Jun 2023 12:22:00 +0200
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

> The intention of the DEFAULT argument to alist-get is to return "" instead of
> 'nil'.  However, this still returns 'nil' if the key exists but the value is
> 'nil'.
>
> This problem wasn't detected previously since the functions
> 'debbugs-gnu-sort-submitter' and 'debbugs-gnu-sort-title' weren't actually
> used until the previous commit.

Couldn't we simply fix this in 'debbugs-gnu-sort-submitter' and
'debbugs-gnu-sort-title'? That is, handling a nil value for submitter
and title?

And do you have an example bug number where this could happen?

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64064; Package emacs. (Fri, 16 Jun 2023 10:27:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 64064 <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 3/4] Don't sort bugs in
 'debbugs-gnu-show-reports'.
Date: Fri, 16 Jun 2023 12:26:03 +0200
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

> Everything is automatically sorted by 'tabulated-list-mode' according to
> 'tabulated-list-sort-key' which we already set to the id.
>
> * debbugs-gnu.el (debbugs-gnu-show-reports): Don't sort the bugs.
> ---
>  debbugs-gnu.el | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/debbugs-gnu.el b/debbugs-gnu.el
> index c28a4aa5e4..c65ea3e827 100644
> --- a/debbugs-gnu.el
> +++ b/debbugs-gnu.el
> @@ -923,7 +923,6 @@ are taken from the cache instead."
>
>      ;; Print bug reports.
>      (dolist (status
> -	     (sort
>  	      (let ((debbugs-cache-expiry (if offline nil debbugs-cache-expiry))
>  		    ids)
>  		(apply #'debbugs-get-status
> @@ -933,11 +932,7 @@ are taken from the cache instead."
>  					(push key ids))
>  				      debbugs-cache-data)
>  			     ids)
> -			 (debbugs-gnu-get-bugs debbugs-gnu-local-query))))
> -	      ;; Sort so that if a new report gets merged with an old
> -	      ;; report, it shows up under the new report.
> -	      (lambda (s1 s2)
> -		(> (alist-get 'id s1) (alist-get 'id s2)))))
> +			 (debbugs-gnu-get-bugs debbugs-gnu-local-query)))))
>        (let* ((id (alist-get 'id status))
>  	     (words (cons (alist-get 'severity status)
>  			  (alist-get 'keywords status)))

Have you tested that the use case mentioned in the comment still works?

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64064; Package emacs. (Fri, 16 Jun 2023 10:35:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 64064 <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 4/4] Add 'debbugs-gnu-rescan' to
 'tabulated-list-revert-hook'.
Date: Fri, 16 Jun 2023 12:34:08 +0200
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

> This now fetches new bugs when the buffer is reverted.
>
> * debbugs-gnu.el (debbugs-gnu-mode): Add 'debbugs-gnu-rescan' to
> 'tabulated-list-revert-hook'.

I haven't tested, but it sounds OK.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64064; Package emacs. (Fri, 16 Jun 2023 10:38:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 64064 <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 0/4] debbugs improvements
Date: Fri, 16 Jun 2023 12:37:14 +0200
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

> Hello!

Hi,

> You may or may not want to install the last patch.  It does add
> potential network calls to the 'revert-buffer' function.  If there are
> legitimate reasons to revert the buffer without fetching new bugs then
> people might not like that change.

If people do revert the buffer, they do it for a reason. So it seems OK
to me to add this.

By default, the cache is used for bug information, so the network
traffic isn't that huge I believe.

If it shows problems, we could still revert the patch.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64064; Package emacs. (Fri, 16 Jun 2023 16:50:02 GMT) Full text and rfc822 format available.

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

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 64064 <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 2/4] Don't error out on 'nil' alist value.
Date: Fri, 16 Jun 2023 12:49:45 -0400
[Message part 1 (text/plain, inline)]
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Couldn't we simply fix this in 'debbugs-gnu-sort-submitter' and
> 'debbugs-gnu-sort-title'? That is, handling a nil value for submitter
> and title?
>
> And do you have an example bug number where this could happen?

You are correct.  I have no example and I doubt such a bug exists.  We
could remove that part of this patch.  Although it is odd that the
DEFAULT argument to alist-get is set in that case.

On a related note, bug#60850 does not have a subject line so here is
more complete patch:

[0001-Don-t-error-out-on-nil-alist-value.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
Morgan

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64064; Package emacs. (Fri, 16 Jun 2023 16:57:02 GMT) Full text and rfc822 format available.

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

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 64064 <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 3/4] Don't sort bugs in
 'debbugs-gnu-show-reports'.
Date: Fri, 16 Jun 2023 12:56:03 -0400
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:
>
>> -	      ;; Sort so that if a new report gets merged with an old
>> -	      ;; report, it shows up under the new report.
>
> Have you tested that the use case mentioned in the comment still works?

This is somehow my first time reading that comment.  I have not tested
it but reading through the code I'm pretty sure that my patch breaks
this.  I would recommend against installing this patch.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64064; Package emacs. (Fri, 16 Jun 2023 16:58:01 GMT) Full text and rfc822 format available.

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

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 64064 <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 0/4] debbugs improvements
Date: Fri, 16 Jun 2023 12:57:46 -0400
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

> Hi Michael,
>
> Michael Albinus <michael.albinus <at> gmx.de> writes:
>
>> However, debbugs is a GNU ELPA package. In order to apply non-trivial
>> patches there, the patch author shall have signed the FSF copyright
>> papers. That means, that the copyright is assigned to the FSF, that's
>> all. Are you willing to sign such papers?
>
> I have already done this for Emacs so I don't think any further action
> is required on this front.  I'm not sure how you validate my claim but I
> have a couple commits in Emacs proper.  Also in Emms.
>
> Morgan

Sorry, still learning how to CC the bug tracker :P




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64064; Package emacs. (Fri, 16 Jun 2023 17:05:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 64064 <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 0/4] debbugs improvements
Date: Fri, 16 Jun 2023 19:04:31 +0200
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

>> Hi Michael,

Hi Morgan,

>>> However, debbugs is a GNU ELPA package. In order to apply non-trivial
>>> patches there, the patch author shall have signed the FSF copyright
>>> papers. That means, that the copyright is assigned to the FSF, that's
>>> all. Are you willing to sign such papers?
>>
>> I have already done this for Emacs so I don't think any further action
>> is required on this front.  I'm not sure how you validate my claim but I
>> have a couple commits in Emacs proper.  Also in Emms.

I've checked the file on the savannah host where all people are listed
who have signed the FSF papers. I couldn't find you as "Morgan Smith".

Checking it again, you're there as "Morgan Stewart James Smith" :-)
So that's OK.

Note that I don't know how much time I'll have over the weekend. If
things go bad (for us), I'll continue to reply next week.

>> Morgan

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64064; Package emacs. (Sun, 18 Jun 2023 10:12:01 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 64064 <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 0/4] debbugs improvements
Date: Sun, 18 Jun 2023 12:11:40 +0200
Michael Albinus <michael.albinus <at> gmx.de> writes:

Hi Morgan,

>> * debbugs-gnu.el (debbugs-gnu-print-entry): Remove all printing logic and
>> replace with a call to 'tabulated-list-print-entry'.
>
> According to my tests, this looks good.

I've pushed it to the git repostory. I've added another patch which sets
the mouse-face property; this was lost in your patch.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64064; Package emacs. (Sun, 18 Jun 2023 11:15:01 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 64064 <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 2/4] Don't error out on 'nil' alist value.
Date: Sun, 18 Jun 2023 13:14:35 +0200
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

Hi Morgan,

> You are correct.  I have no example and I doubt such a bug exists.  We
> could remove that part of this patch.  Although it is odd that the
> DEFAULT argument to alist-get is set in that case.
>
> On a related note, bug#60850 does not have a subject line so here is
> more complete patch:

I've pushed this to the elpa git repo.

> Morgan

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64064; Package emacs. (Sun, 18 Jun 2023 11:51:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 64064 <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 4/4] Add 'debbugs-gnu-rescan' to
 'tabulated-list-revert-hook'.
Date: Sun, 18 Jun 2023 13:50:37 +0200
Michael Albinus <michael.albinus <at> gmx.de> writes:

Hi Morgan,

>> This now fetches new bugs when the buffer is reverted.
>>
>> * debbugs-gnu.el (debbugs-gnu-mode): Add 'debbugs-gnu-rescan' to
>> 'tabulated-list-revert-hook'.
>
> I haven't tested, but it sounds OK.

Pushed to the git repo.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64064; Package emacs. (Sun, 18 Jun 2023 11:53:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 64064 <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 3/4] Don't sort bugs in
 'debbugs-gnu-show-reports'.
Date: Sun, 18 Jun 2023 13:52:29 +0200
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

Hi Morgan,

>>> -	      ;; Sort so that if a new report gets merged with an old
>>> -	      ;; report, it shows up under the new report.
>>
>> Have you tested that the use case mentioned in the comment still works?
>
> This is somehow my first time reading that comment.  I have not tested
> it but reading through the code I'm pretty sure that my patch breaks
> this.  I would recommend against installing this patch.

Please tell me whether you want to work on this. Otherwise, I would
release debbugs on elpa.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64064; Package emacs. (Sun, 18 Jun 2023 19:23:01 GMT) Full text and rfc822 format available.

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

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 64064 <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 3/4] Don't sort bugs in
 'debbugs-gnu-show-reports'.
Date: Sun, 18 Jun 2023 15:22:13 -0400
Michael Albinus <michael.albinus <at> gmx.de> writes:

>
> Please tell me whether you want to work on this. Otherwise, I would
> release debbugs on elpa.
>

To improve performance the next step should be making the network calls
asynchronously.  I thought this was a free performance boost but it is
not.  I have no plans to work on this.

Thanks,

Morgan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64064; Package emacs. (Sun, 18 Jun 2023 19:27:01 GMT) Full text and rfc822 format available.

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

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 64064 <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 0/4] debbugs improvements
Date: Sun, 18 Jun 2023 15:26:32 -0400
Michael Albinus <michael.albinus <at> gmx.de> writes:

>
> I've added another patch which sets
> the mouse-face property; this was lost in your patch.
>

Thanks for catching that!  Reading is not my strong suit :P.  Sometimes
I just feel like deleting code without reading it.

Thanks,

Morgan




Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Mon, 19 Jun 2023 07:41:02 GMT) Full text and rfc822 format available.

Notification sent to Morgan Smith <Morgan.J.Smith <at> outlook.com>:
bug acknowledged by developer. (Mon, 19 Jun 2023 07:41:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 64064-done <at> debbugs.gnu.org
Subject: Re: bug#64064: [PATCH 3/4] Don't sort bugs in
 'debbugs-gnu-show-reports'.
Date: Mon, 19 Jun 2023 09:40:34 +0200
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

Hi Morgan,

> To improve performance the next step should be making the network calls
> asynchronously.  I thought this was a free performance boost but it is
> not.  I have no plans to work on this.

We're doing asynchronous bug fetching already. In `debbugs-get-status',
several calls to `debbugs-soap-invoke-async' are fired in parallel,
every call retrieving up to `debbugs-max-hits-per-request' bugs at once.

I've also made some experiments with other improvements for asynchronous
network calls, those attempts failed (some years ago). And here we are.

Anyway, there's nothing left to do. I've released debbugs 0.36, closing
this bug.

> Thanks,
>
> Morgan

Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Jul 2023 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 26 days ago.

Previous Next


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