GNU bug report logs -
#43983
[PATCH] Improve package install/delete button action
Previous Next
Reported by: tsuucat <tsuucat <at> icloud.com>
Date: Tue, 13 Oct 2020 19:47:01 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
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 43983 in the body.
You can then email your comments to 43983 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43983
; Package
emacs
.
(Tue, 13 Oct 2020 19:47:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
tsuucat <tsuucat <at> icloud.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 13 Oct 2020 19:47:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi, current package-install-button-action and package-delete-button-action have
some problems so I made a patch.
If user clicks [Install] button, the *Help* buffer is reverted and shows the package is
"available obsolete" in first line.
(steps)
1. emacs -Q
2. M-x list-packages
3. M-x package-refresh-contents
3. Click “ztree” package
4. Click [Install]
(steps end)
I think this is not good for user experience. The buffer shoud shows the package is
“installed” in first line.
And then if user clicks [Delete] button an error happens.
(steps)
1. (Install ztree like above)
2. Type q
3. Click “ztree” package which is marked as installed
4. Click [Delete]
(steps end)
(backstace)
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("\\`https?:" nil nil)
package--with-response-buffer-1(nil #f(compiled-function () #<bytecode 0x1fe0b74a2895>) :file "ztree-readme.txt" :async nil :error-function #f(compiled-function () #<bytecode 0x1fe0b589df81>) :noerror t)
describe-package-1(#s(package-desc :name ztree :version (20191108 2234) :summary "Text mode directory tree" :reqs ((cl-lib (0))) :kind nil :archive nil :dir "/(path/to)/test-home/.emacs...." :extras ((:url . "https://github.com/fourier/ztree") (:maintainer "Alexey Veretennikov" . "alexey.veretennikov <at> gmail.com") (:authors ("Alexey Veretennikov" . "alexey.veretennikov <at> gmail.com")) (:keywords "files" "tools") (:commit . "0a5b25f364490a58ef7371534a39c75d11f54132")) :signed nil))
describe-package(#s(package-desc :name ztree :version (20191108 2234) :summary "Text mode directory tree" :reqs ((cl-lib (0))) :kind nil :archive nil :dir "/(path/to)/test-home/.emacs...." :extras ((:url . "https://github.com/fourier/ztree") (:maintainer "Alexey Veretennikov" . "alexey.veretennikov <at> gmail.com") (:authors ("Alexey Veretennikov" . "alexey.veretennikov <at> gmail.com")) (:keywords "files" "tools") (:commit . "0a5b25f364490a58ef7371534a39c75d11f54132")) :signed nil))
apply(describe-package #s(package-desc :name ztree :version (20191108 2234) :summary "Text mode directory tree" :reqs ((cl-lib (0))) :kind nil :archive nil :dir "/(path/to)/test-home/.emacs...." :extras ((:url . "https://github.com/fourier/ztree") (:maintainer "Alexey Veretennikov" . "alexey.veretennikov <at> gmail.com") (:authors ("Alexey Veretennikov" . "alexey.veretennikov <at> gmail.com")) (:keywords "files" "tools") (:commit . "0a5b25f364490a58ef7371534a39c75d11f54132")) :signed nil))
help-mode-revert-buffer(nil t)
revert-buffer(nil t)
package-delete-button-action(#<marker (moves after insertion) at 483 in *Help*>)
button-activate(#<marker (moves after insertion) at 483 in *Help*> t)
push-button(94 t)
push-button((mouse-2 (#<window 99 on *Help*> 94 (452 . 42) 1086759856 nil 94 (64 . 2) nil (2 . 10) (7 . 20))))
a funcall-interactively(push-button (mouse-2 (#<window 99 on *Help*> 94 (452 . 42) 1086759856 nil 94 (64 . 2) nil (2 . 10) (7 . 20)))) call-interactively(push-button nil nil)
command-execute(push-button)
(backstace end)
This is because package-delete-button-action’s revert-buffer runs describe-package
with old package-desc which archive field is nil.
Running describe-package with just package name instead of revert-buffer fixes
these problems.
Thanks.
--
tsuucat
[0001-Improve-package-install-delete-button-action.patch (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#43983
; Package
emacs
.
(Wed, 14 Oct 2020 04:16:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 43983 <at> debbugs.gnu.org (full text, mbox):
tsuucat <tsuucat <at> icloud.com> writes:
> Running describe-package with just package name instead of
> revert-buffer fixes these problems.
Looks good to me, so I've applied your patch to Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 14 Oct 2020 04:16:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
43983 <at> debbugs.gnu.org and tsuucat <tsuucat <at> icloud.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 14 Oct 2020 04:16:02 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
.
(Wed, 11 Nov 2020 12:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 215 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.