all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* package-install-selected-packages and newer versions
@ 2023-07-27  7:35 Jarmo Hurri
  2023-07-27  9:45 ` Tassilo Horn
  0 siblings, 1 reply; 4+ messages in thread
From: Jarmo Hurri @ 2023-07-27  7:35 UTC (permalink / raw)
  To: emacs-devel


Greetings.

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. I ran into a problem
because package-install-selected-packages does not check whether a newer
version of a package is available.

My emacs 28.2 comes with org 9.5.5, while ELPA has org 9.6.7. With

(customize-set-variable 'package-selected-packages (quote (org haskell-mode htmlize yaml-mode dash)))

function package-install-selected-packages will skip org due to the fact
that (package-installed-p 'org) evaluates to true, and packages that are
already installed are ignored (package.el):

(let* ((not-installed (seq-remove #'package-installed-p package-selected-packages))

Would it be desirable to add an option to install a newer version if one
is available?

All the best,

Jarmo




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: package-install-selected-packages and newer versions
  2023-07-27  7:35 package-install-selected-packages and newer versions Jarmo Hurri
@ 2023-07-27  9:45 ` Tassilo Horn
  2023-07-27 10:27   ` Jarmo Hurri
  0 siblings, 1 reply; 4+ messages in thread
From: Tassilo Horn @ 2023-07-27  9:45 UTC (permalink / raw)
  To: Jarmo Hurri; +Cc: emacs-devel

Jarmo Hurri <jarmo.hurri@iki.fi> writes:

Hi Jarmo,

> 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.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: package-install-selected-packages and newer versions
  2023-07-27  9:45 ` Tassilo Horn
@ 2023-07-27 10:27   ` Jarmo Hurri
  2023-07-27 15:01     ` Tassilo Horn
  0 siblings, 1 reply; 4+ messages in thread
From: Jarmo Hurri @ 2023-07-27 10:27 UTC (permalink / raw)
  To: emacs-devel


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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: package-install-selected-packages and newer versions
  2023-07-27 10:27   ` Jarmo Hurri
@ 2023-07-27 15:01     ` Tassilo Horn
  0 siblings, 0 replies; 4+ messages in thread
From: Tassilo Horn @ 2023-07-27 15:01 UTC (permalink / raw)
  To: Jarmo Hurri; +Cc: emacs-devel

Jarmo Hurri <jarmo.hurri@iki.fi> writes:

Hi Jarmo,

> 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.

You asked for Pepsi and I showed you Coca-Cola. ;-)

> Looking forward to 29.1. Thanks!

Indeed.  If you cannot wait, use-package is available as a 3rd party
package and package auto-updates have been available using the
auto-package-update for a long time, too.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-27 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-27  7:35 package-install-selected-packages and newer versions Jarmo Hurri
2023-07-27  9:45 ` Tassilo Horn
2023-07-27 10:27   ` Jarmo Hurri
2023-07-27 15:01     ` Tassilo Horn

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.