From unknown Sat Jun 14 18:01:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#43983 <43983@debbugs.gnu.org> To: bug#43983 <43983@debbugs.gnu.org> Subject: Status: [PATCH] Improve package install/delete button action Reply-To: bug#43983 <43983@debbugs.gnu.org> Date: Sun, 15 Jun 2025 01:01:04 +0000 retitle 43983 [PATCH] Improve package install/delete button action reassign 43983 emacs submitter 43983 tsuucat severity 43983 normal tag 43983 patch fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 13 15:46:58 2020 Received: (at submit) by debbugs.gnu.org; 13 Oct 2020 19:46:58 +0000 Received: from localhost ([127.0.0.1]:48927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSQGA-0001M7-0I for submit@debbugs.gnu.org; Tue, 13 Oct 2020 15:46:58 -0400 Received: from lists.gnu.org ([209.51.188.17]:52886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSQG8-0001Lz-31 for submit@debbugs.gnu.org; Tue, 13 Oct 2020 15:46:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSQG6-0003cG-RM for bug-gnu-emacs@gnu.org; Tue, 13 Oct 2020 15:46:55 -0400 Received: from st43p00im-zteg10063501.me.com ([17.58.63.176]:33792) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSQG5-00038u-40 for bug-gnu-emacs@gnu.org; Tue, 13 Oct 2020 15:46:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1602618405; bh=tyzoPsVNOSEEI7zbQ7VgzZcL6kQyEc4IxgvX/aW2xyI=; h=From:Content-Type:Mime-Version:Subject:Message-Id:Date:To; b=LCCYNMrceVgdhS1coERI8TZWHx/jE5G1oMlX5lkk5GsszZtk4oGQvfuPxB5mJjnvQ e0S9fRts1uVUuY30B2+iJ7KzOalp9qotoRjTyHGmVKH7p3GGnW8XETxXRBXnFHHy/2 AMUoBTYcKBTvgF4Dd3TjBQkJK21MO3kKf43dsW7sAr+6RhB+tuhEPekECqgJl2GPB7 RAo4lqafz3E0qViJGUS6Si4eC5ps8KZgU+NrhqO6GBqcf4mU+FSENBCAITJpQSC3We n7UYiQksQo8NtGA7yn7rwTSfgvjLLK6c3AnAoNgSb8lcjlgHcTSzqip5VNYtOEPQtt 9Uo1HhOS/T42g== Received: from [192.168.129.26] (i114-186-197-142.s41.a008.ap.plala.or.jp [114.186.197.142]) by st43p00im-zteg10063501.me.com (Postfix) with ESMTPSA id 5F344C80871 for ; Tue, 13 Oct 2020 19:46:45 +0000 (UTC) From: tsuucat Content-Type: multipart/mixed; boundary="Apple-Mail=_726FF1E1-C353-4584-9F78-AC6EF6C722B5" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: [PATCH] Improve package install/delete button action Message-Id: Date: Wed, 14 Oct 2020 04:46:42 +0900 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-13_13:2020-10-13, 2020-10-13 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=483 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2006250000 definitions=main-2010130139 Received-SPF: pass client-ip=17.58.63.176; envelope-from=tsuucat@icloud.com; helo=st43p00im-zteg10063501.me.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/13 15:46:46 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --Apple-Mail=_726FF1E1-C353-4584-9F78-AC6EF6C722B5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 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 =E2=80=9Cztree=E2=80=9D package 4. Click [Install] (steps end) I think this is not good for user experience. The buffer shoud shows the = package is =E2=80=9Cinstalled=E2=80=9D in first line. And then if user clicks [Delete] button an error happens. (steps) 1. (Install ztree like above) 2. Type q 3. Click =E2=80=9Cztree=E2=80=9D 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 () #) :file "ztree-readme.txt" :async nil :error-function = #f(compiled-function () #) :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@gmail.com") (:authors ("Alexey Veretennikov" . = "alexey.veretennikov@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@gmail.com") (:authors ("Alexey Veretennikov" . = "alexey.veretennikov@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@gmail.com") (:authors ("Alexey Veretennikov" . = "alexey.veretennikov@gmail.com")) (:keywords "files" "tools") (:commit . = "0a5b25f364490a58ef7371534a39c75d11f54132")) :signed nil)) help-mode-revert-buffer(nil t) revert-buffer(nil t) package-delete-button-action(#) button-activate(# t) push-button(94 t) push-button((mouse-2 (# 94 (452 . 42) 1086759856 = nil 94 (64 . 2) nil (2 . 10) (7 . 20)))) a funcall-interactively(push-button (mouse-2 (# 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=E2=80=99s revert-buffer = runs describe-package=20 with old package-desc which archive field is nil. Running describe-package with just package name instead of revert-buffer = fixes=20 these problems. Thanks. -- tsuucat --Apple-Mail=_726FF1E1-C353-4584-9F78-AC6EF6C722B5 Content-Disposition: attachment; filename=0001-Improve-package-install-delete-button-action.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Improve-package-install-delete-button-action.patch" Content-Transfer-Encoding: quoted-printable =46rom=207a663e66d4b851c28043bd79f816c735b1a9a8b4=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Masahiro=20Nakamura=20=0A= Date:=20Wed,=2014=20Oct=202020=2004:13:15=20+0900=0ASubject:=20[PATCH]=20= Improve=20package=20install/delete=20button=20action=0A=0A*=20= lisp/emacs-lisp/package.el=20(package-install-button-action)=0A= (package-delete-button-action):=20Run=20describe-package=20instead=20of=0A= revert-buffer=20in=20order=20to=20use=20newer=20package-desc.=0A---=0A=20= lisp/emacs-lisp/package.el=20|=206=20++----=0A=201=20file=20changed,=202=20= insertions(+),=204=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/emacs-lisp/package.el=20b/lisp/emacs-lisp/package.el=0Aindex=20= 1f81e07754..5b7735125f=20100644=0A---=20a/lisp/emacs-lisp/package.el=0A= +++=20b/lisp/emacs-lisp/package.el=0A@@=20-2630,8=20+2630,7=20@@=20= package-install-button-action=0A=20=20=20=20=20(when=20(y-or-n-p=20= (format-message=20"Install=20package=20`%s'?=20"=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(package-desc-full-name=20pkg-desc)))=0A=20=20=20=20=20=20=20= (package-install=20pkg-desc=20nil)=0A-=20=20=20=20=20=20(revert-buffer=20= nil=20t)=0A-=20=20=20=20=20=20(goto-char=20(point-min)))))=0A+=20=20=20=20= =20=20(describe-package=20(package-desc-name=20pkg-desc)))))=0A=20=0A=20= (defun=20package-delete-button-action=20(button)=0A=20=20=20"Run=20= `package-delete'=20on=20the=20package=20BUTTON=20points=20to.=0A@@=20= -2641,8=20+2640,7=20@@=20package-delete-button-action=0A=20=20=20=20=20= (when=20(y-or-n-p=20(format-message=20"Delete=20package=20`%s'?=20"=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(package-desc-full-name=20pkg-desc)))=0A= =20=20=20=20=20=20=20(package-delete=20pkg-desc)=0A-=20=20=20=20=20=20= (revert-buffer=20nil=20t)=0A-=20=20=20=20=20=20(goto-char=20= (point-min)))))=0A+=20=20=20=20=20=20(describe-package=20= (package-desc-name=20pkg-desc)))))=0A=20=0A=20(defun=20= package-keyword-button-action=20(button)=0A=20=20=20"Show=20filtered=20= \"*Packages*\"=20buffer=20for=20BUTTON.=0A--=20=0A2.28.0=0A=0A= --Apple-Mail=_726FF1E1-C353-4584-9F78-AC6EF6C722B5-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 14 00:15:11 2020 Received: (at 43983) by debbugs.gnu.org; 14 Oct 2020 04:15:11 +0000 Received: from localhost ([127.0.0.1]:49655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSYBy-0007nu-Nn for submit@debbugs.gnu.org; Wed, 14 Oct 2020 00:15:10 -0400 Received: from quimby.gnus.org ([95.216.78.240]:54102) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSYBw-0007fE-Gq for 43983@debbugs.gnu.org; Wed, 14 Oct 2020 00:15:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=RnksLNF+wD4UcokBN1IlLQfn7S+6OVrb00JTb0YFExw=; b=PyOm/5xF+Hm/Ghsl6St08wsllt fsPO6zQSNEXuyEW0gJx/VUhVGF9V8KxbeZEbZz/AMqd1wYS+oECM1eyTo8tdSIVHDCPZ4VCkH8X/5 TT/Lis5ZzgXJNcA3QfBnF3bMkdzDETNdFfWK19jrlfe+i4l650Hb+LTcn9ASvMgrT0yI=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSYBn-0004iY-Jo; Wed, 14 Oct 2020 06:15:02 +0200 From: Lars Ingebrigtsen To: tsuucat Subject: Re: bug#43983: [PATCH] Improve package install/delete button action References: X-Now-Playing: B. Fleischmann's _Welcome Tourist (1)_: "Waiting For You To Come" Date: Wed, 14 Oct 2020 06:14:58 +0200 In-Reply-To: (tsuucat@icloud.com's message of "Wed, 14 Oct 2020 04:46:42 +0900") Message-ID: <875z7d1m0t.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tsuucat 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. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tsuucat 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. Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 2.0 PDS_TONAME_EQ_TOLOCAL_SHORT Short body with To: name matches everything in local email X-Debbugs-Envelope-To: 43983 Cc: 43983@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) tsuucat 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 14 00:15:18 2020 Received: (at control) by debbugs.gnu.org; 14 Oct 2020 04:15:18 +0000 Received: from localhost ([127.0.0.1]:49658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSYC6-0007vb-0e for submit@debbugs.gnu.org; Wed, 14 Oct 2020 00:15:18 -0400 Received: from quimby.gnus.org ([95.216.78.240]:54116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSYC4-0007oa-H7 for control@debbugs.gnu.org; Wed, 14 Oct 2020 00:15:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vGjsIEfYu+QsRc+9eicXLbwPJ+Hg3VCXVd2/63mCtYc=; b=JnvNE4qoav0ObjdifvIZwSsZ0Y CgKYvlLR7QO78HqJbERYmeYQ+Crqk7qOO7ZlDMT9mdkL5Ok67Ff5/cE15npov4IqytirIsV3e3pFe F3udwBGQ45/2bZoclMqEKqvE/qsHNoDXkSmK86GCQbU5K3mmMDBNwrfJpxA7AKHhIeBM=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSYBw-0004im-KC for control@debbugs.gnu.org; Wed, 14 Oct 2020 06:15:11 +0200 Date: Wed, 14 Oct 2020 06:15:07 +0200 Message-Id: <874kmx1m0k.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #43983 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 43983 fixed close 43983 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 43983 fixed close 43983 28.1 quit From unknown Sat Jun 14 18:01:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 11 Nov 2020 12:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator