Subject: bug#64064: [PATCH 3/4] Don't sort bugs in 'debbugs-gnu-show-reports'.

From: Michael Albinus <[email-masked]>
Date: Fri, 16 Jun 2023 12:26:03 +0200

Morgan Smith <[email-masked]> 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.