From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jarmo Hurri Newsgroups: gmane.emacs.devel Subject: Re: package-install-selected-packages and newer versions Date: Thu, 27 Jul 2023 13:27:51 +0300 Message-ID: <874jlpabtk.fsf@iki.fi> References: <87edkt958f.fsf@iki.fi> <87jzul65sj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37243"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) To: emacs-devel@gnu.org Cancel-Lock: sha1:DkmoTY3a1cKeLRPKN5oCKvb1coo= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jul 27 16:02:57 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qP1Zv-0009S2-6e for ged-emacs-devel@m.gmane-mx.org; Thu, 27 Jul 2023 16:02:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qP15R-0001lP-Q3; Thu, 27 Jul 2023 09:31:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOyDy-00041R-Af for emacs-devel@gnu.org; Thu, 27 Jul 2023 06:28:04 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOyDu-0004os-NZ for emacs-devel@gnu.org; Thu, 27 Jul 2023 06:28:01 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1qOyDs-0001Dc-19 for emacs-devel@gnu.org; Thu, 27 Jul 2023 12:27:56 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 27 Jul 2023 09:31:17 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:308154 Archived-At: Greetings Tassilo. >> I was trying to use the nice variable package-selected-packages and >> the associated function package-install-selected-packages to automate >> package installation on my multiple systems. > > You might also be interested in use-package which is part of emacs since > 29.1 (which, of course, isn't released, yet). I use that in my ~/.emacs > for all external packages and can just copy my ~/.emacs to some new > machine and the first start will install all required packages. > Example: > > (use-package markdown-mode > :ensure t > :mode "\\.md\\'" > :custom > (markdown-command "cmark --unsafe")) > > The :ensure t makes sure the package will be installed if it isn't yet. > >> I ran into a problem because package-install-selected-packages does >> not check whether a newer version of a package is available. >> [...] >> Would it be desirable to add an option to install a newer version if >> one is available? > > In emacs 29.1, there's a new package-upgrade-all command which basically > solves that issue. I feel like in a supermarket when I ask where a product is located, and the shopkeeper kindly tells me that I am standing right next to the thing I just asked for. Looking forward to 29.1. Thanks! Jarmo