GNU bug report logs - #38085
[PATCH] Two functions named ‘package-menu--refresh’

Previous Next

Package: emacs;

Reported by: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>

Date: Wed, 6 Nov 2019 09:11:01 UTC

Severity: normal

Tags: patch

Merged with 38084

Found in version 27.0.50

Fixed in version 27.1

Done: Stefan Kangas <stefan <at> marxist.se>

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 38085 in the body.
You can then email your comments to 38085 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#38085; Package emacs. (Wed, 06 Nov 2019 09:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 06 Nov 2019 09:11:02 GMT) Full text and rfc822 format available.

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

From: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Two functions named ‘package-menu--refresh’
Date: Wed, 06 Nov 2019 10:10:48 +0100
[Message part 1 (text/plain, inline)]
Commit 0c293f1520 caused a conflict such that there are now two
functions named ‘package-menu--refresh’.  The attached patch
renames them to:

* ‘package-menu--refresh-entries’, which refreshes
  ‘tabulated-list-entries’; and

* ‘package-menu--refresh-contents’, which refreshes the archive
  contents.

[0001-Disambiguate-package-menu-refresh.patch (text/x-diff, inline)]
From ab0287bc66241907d1f4915d1a35c25f7bc2dda5 Mon Sep 17 00:00:00 2001
From: dgjorgjevski <dario.gjorgjevski <at> zalando.de>
Date: Wed, 6 Nov 2019 09:53:38 +0100
Subject: [PATCH] =?UTF-8?q?Disambiguate=20=E2=80=98package-menu--refresh?=
 =?UTF-8?q?=E2=80=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lisp/emacs-lisp/package.el (package-menu--refresh,
package-menu--refresh): Rename to ‘package-menu--refresh-entries’ and
‘package-menu--refresh-contents’ in order to disambiguate the two.
---
 lisp/emacs-lisp/package.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index b7a528dac4..b35fe022de 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2765,9 +2765,9 @@ package-menu-mode
           ("Description" 0 package-menu--description-predicate)])
   (setq tabulated-list-padding 2)
   (setq tabulated-list-sort-key (cons "Status" nil))
-  (add-hook 'tabulated-list-revert-hook #'package-menu--refresh nil t)
+  (add-hook 'tabulated-list-revert-hook #'package-menu--refresh-entries nil t)
   (tabulated-list-init-header)
-  (setq revert-buffer-function 'package-menu--refresh)
+  (setq revert-buffer-function 'package-menu--refresh-contents)
   (setf imenu-prev-index-position-function
         #'package--imenu-prev-index-position-function)
   (setf imenu-extract-index-name-function
@@ -2926,7 +2926,7 @@ package-hidden-regexps
   :version "25.1"
   :type '(repeat (regexp :tag "Hide packages with name matching")))
 
-(defun package-menu--refresh (&optional packages keywords)
+(defun package-menu--refresh-entries (&optional packages keywords)
   "Re-populate the `tabulated-list-entries'.
 PACKAGES should be nil or t, which means to display all known packages.
 KEYWORDS should be nil or a list of keywords."
@@ -3039,7 +3039,7 @@ package-menu--generate
 
 With KEYWORDS given, only packages with those keywords are
 shown."
-  (package-menu--refresh packages keywords)
+  (package-menu--refresh-entries packages keywords)
   (setf (car (aref tabulated-list-format 0))
         (if keywords
             (let ((filters (mapconcat #'identity keywords ",")))
@@ -3166,7 +3166,7 @@ package-menu--print-info-simple
 (defvar package-menu--old-archive-contents nil
   "`package-archive-contents' before the latest refresh.")
 
-(defun package-menu--refresh (&optional _arg _noconfirm)
+(defun package-menu--refresh-contents (&optional _arg _noconfirm)
   "In Package Menu, download the Emacs Lisp package archive.
 Fetch the contents of each archive specified in
 `package-archives', and then refresh the package menu.  Signal a
@@ -3646,7 +3646,7 @@ list-packages
       (package-menu-mode)
 
       ;; Fetch the remote list of packages.
-      (unless no-fetch (package-menu--refresh))
+      (unless no-fetch (package-menu--refresh-contents))
 
       ;; If we're not async, this would be redundant.
       (when package-menu-async
@@ -3706,7 +3706,7 @@ package-menu-filter-by-name
       (package-show-package-list t nil)
     ;; Update `tabulated-list-entries' so that it contains all
     ;; packages before searching.
-    (package-menu--refresh t nil)
+    (package-menu--refresh-entries t nil)
     (let (matched)
       (dolist (entry tabulated-list-entries)
         (let* ((pkg-name (package-desc-name (car entry))))
-- 
2.17.1


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38085; Package emacs. (Wed, 06 Nov 2019 09:30:02 GMT) Full text and rfc822 format available.

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

From: Tino Calancha <tino.calancha <at> gmail.com>
To: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
Cc: 38085 <at> debbugs.gnu.org, Stefan Kangas <stefankangas <at> gmail.com>
Subject: Re: bug#38085: [PATCH] Two functions named ‘package-menu--refresh’
Date: Wed, 06 Nov 2019 09:29:26 +0000
Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com> writes:

> Commit 0c293f1520 caused a conflict such that there are now two
> functions named ‘package-menu--refresh’.  The attached patch
> renames them to:

this is Bug 38085




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38085; Package emacs. (Wed, 06 Nov 2019 09:31:02 GMT) Full text and rfc822 format available.

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

From: Tino Calancha <tino.calancha <at> gmail.com>
To: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
Cc: 38085 <at> debbugs.gnu.org
Subject: Re: bug#38085: [PATCH] Two functions named ‘package-menu--refresh’
Date: Wed, 06 Nov 2019 09:30:37 +0000
Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com> writes:

I mean, this is bug 38084




Merged 38084 38085. Request was from Tino Calancha <tino.calancha <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 06 Nov 2019 09:34:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38085; Package emacs. (Wed, 06 Nov 2019 09:51:02 GMT) Full text and rfc822 format available.

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

From: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 38085 <at> debbugs.gnu.org
Subject: Re: bug#38085: [PATCH] Two functions named ‘package-menu--refresh’
Date: Wed, 06 Nov 2019 10:50:36 +0100
[Message part 1 (text/plain, inline)]
Tino Calancha <tino.calancha <at> gmail.com> writes:

> I mean, this is bug 38084

Thanks; I did not realize that there is already a bug.  Here is an
amended patch which references bug#38084 in the commit message.

[0001-Disambiguate-package-menu-refresh-bug-38084.patch (text/x-diff, inline)]
From 5b648752499a528ed23f257deccb4a4f5ef0d009 Mon Sep 17 00:00:00 2001
From: Dario Gjorgjevski <dario.gjorgjevski+git <at> gmail.com>
Date: Wed, 6 Nov 2019 09:53:38 +0100
Subject: [PATCH] =?UTF-8?q?Disambiguate=20=E2=80=98package-menu--refresh?=
 =?UTF-8?q?=E2=80=99=20(bug#38084)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lisp/emacs-lisp/package.el (package-menu--refresh,
package-menu--refresh): Rename to ‘package-menu--refresh-entries’ and
‘package-menu--refresh-contents’ in order to disambiguate the two.
---
 lisp/emacs-lisp/package.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index b7a528dac4..b35fe022de 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2765,9 +2765,9 @@ package-menu-mode
           ("Description" 0 package-menu--description-predicate)])
   (setq tabulated-list-padding 2)
   (setq tabulated-list-sort-key (cons "Status" nil))
-  (add-hook 'tabulated-list-revert-hook #'package-menu--refresh nil t)
+  (add-hook 'tabulated-list-revert-hook #'package-menu--refresh-entries nil t)
   (tabulated-list-init-header)
-  (setq revert-buffer-function 'package-menu--refresh)
+  (setq revert-buffer-function 'package-menu--refresh-contents)
   (setf imenu-prev-index-position-function
         #'package--imenu-prev-index-position-function)
   (setf imenu-extract-index-name-function
@@ -2926,7 +2926,7 @@ package-hidden-regexps
   :version "25.1"
   :type '(repeat (regexp :tag "Hide packages with name matching")))
 
-(defun package-menu--refresh (&optional packages keywords)
+(defun package-menu--refresh-entries (&optional packages keywords)
   "Re-populate the `tabulated-list-entries'.
 PACKAGES should be nil or t, which means to display all known packages.
 KEYWORDS should be nil or a list of keywords."
@@ -3039,7 +3039,7 @@ package-menu--generate
 
 With KEYWORDS given, only packages with those keywords are
 shown."
-  (package-menu--refresh packages keywords)
+  (package-menu--refresh-entries packages keywords)
   (setf (car (aref tabulated-list-format 0))
         (if keywords
             (let ((filters (mapconcat #'identity keywords ",")))
@@ -3166,7 +3166,7 @@ package-menu--print-info-simple
 (defvar package-menu--old-archive-contents nil
   "`package-archive-contents' before the latest refresh.")
 
-(defun package-menu--refresh (&optional _arg _noconfirm)
+(defun package-menu--refresh-contents (&optional _arg _noconfirm)
   "In Package Menu, download the Emacs Lisp package archive.
 Fetch the contents of each archive specified in
 `package-archives', and then refresh the package menu.  Signal a
@@ -3646,7 +3646,7 @@ list-packages
       (package-menu-mode)
 
       ;; Fetch the remote list of packages.
-      (unless no-fetch (package-menu--refresh))
+      (unless no-fetch (package-menu--refresh-contents))
 
       ;; If we're not async, this would be redundant.
       (when package-menu-async
@@ -3706,7 +3706,7 @@ package-menu-filter-by-name
       (package-show-package-list t nil)
     ;; Update `tabulated-list-entries' so that it contains all
     ;; packages before searching.
-    (package-menu--refresh t nil)
+    (package-menu--refresh-entries t nil)
     (let (matched)
       (dolist (entry tabulated-list-entries)
         (let* ((pkg-name (package-desc-name (car entry))))
-- 
2.17.1


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38085; Package emacs. (Wed, 06 Nov 2019 14:14:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
Cc: 38084 <at> debbugs.gnu.org, 38085 <at> debbugs.gnu.org,
 Tino Calancha <tino.calancha <at> gmail.com>
Subject: Re: bug#38085: [PATCH] Two functions named ‘package-menu--refresh’
Date: Wed, 06 Nov 2019 15:13:31 +0100
[Message part 1 (text/plain, inline)]
Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com> writes:

> Tino Calancha <tino.calancha <at> gmail.com> writes:
>
>> I mean, this is bug 38084
>
> Thanks; I did not realize that there is already a bug.  Here is an
> amended patch which references bug#38084 in the commit message.

Thanks, I installed a slightly different patch (attached) which I
believe fixes this.

Best regards,
Stefan Kangas

[0001-Fix-problem-with-my-last-commit-in-package.el.patch (text/x-diff, inline)]
From d30f5e7eeecd5425e236542189a1d683c00e7ed7 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas <at> gmail.com>
Date: Wed, 6 Nov 2019 14:48:23 +0100
Subject: [PATCH] Fix problem with my last commit in package.el

* lisp/emacs-lisp/package.el (package-menu--refresh-archives): Rename
from duplicated name package-menu--refresh.  (Bug#38084)
(package-menu-mode, list-packages): Use new name.
---
 lisp/emacs-lisp/package.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index b7a528dac4..9f8ee8368e 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2767,7 +2767,7 @@ package-menu-mode
   (setq tabulated-list-sort-key (cons "Status" nil))
   (add-hook 'tabulated-list-revert-hook #'package-menu--refresh nil t)
   (tabulated-list-init-header)
-  (setq revert-buffer-function 'package-menu--refresh)
+  (setq revert-buffer-function 'package-menu--refresh-contents)
   (setf imenu-prev-index-position-function
         #'package--imenu-prev-index-position-function)
   (setf imenu-extract-index-name-function
@@ -3166,7 +3166,7 @@ package-menu--print-info-simple
 (defvar package-menu--old-archive-contents nil
   "`package-archive-contents' before the latest refresh.")
 
-(defun package-menu--refresh (&optional _arg _noconfirm)
+(defun package-menu--refresh-contents (&optional _arg _noconfirm)
   "In Package Menu, download the Emacs Lisp package archive.
 Fetch the contents of each archive specified in
 `package-archives', and then refresh the package menu.  Signal a
@@ -3646,7 +3646,7 @@ list-packages
       (package-menu-mode)
 
       ;; Fetch the remote list of packages.
-      (unless no-fetch (package-menu--refresh))
+      (unless no-fetch (package-menu--refresh-contents))
 
       ;; If we're not async, this would be redundant.
       (when package-menu-async
-- 
2.20.1


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38085; Package emacs. (Wed, 06 Nov 2019 14:22:02 GMT) Full text and rfc822 format available.

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

From: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 38084 <at> debbugs.gnu.org, 38085 <at> debbugs.gnu.org,
 Tino Calancha <tino.calancha <at> gmail.com>
Subject: Re: bug#38085: [PATCH] Two functions named ‘package-menu--refresh’
Date: Wed, 06 Nov 2019 15:20:53 +0100
Stefan Kangas <stefan <at> marxist.se> writes:

> Thanks, I installed a slightly different patch (attached) which I
> believe fixes this.

Thank you likewise Stefan for taking care of this so quickly!




bug marked as fixed in version 27.1, send any further explanations to 38084 <at> debbugs.gnu.org and Pankaj Jangid <pankaj.jangid <at> gmail.com> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Wed, 06 Nov 2019 23:14:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 05 Dec 2019 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 283 days ago.

Previous Next


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