unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* On package-install x package-install-selected-packages
@ 2021-03-13  6:13 Gabriel
  2021-03-13  7:05 ` Stefan Kangas
  2021-03-13 14:13 ` Stefan Monnier
  0 siblings, 2 replies; 3+ messages in thread
From: Gabriel @ 2021-03-13  6:13 UTC (permalink / raw)
  To: emacs-devel

On package.el, the 'package-install' calls
'package--archives-initialize' to initialize the archive contents, but
'package-install-selected-packages' does not calls it, relying on users
to initialize the archive contents by themselves. I could not find any
documentation about this difference. Should we modify
'package-install-selected-packages' to call
'package--archives-initialize' ? Or add some flag to control this
behavior ? Or update the documents to account for these subtle
differences ?

Also, 'package-install-selected-packages' always asks for a confirmation
to install or not the packages. Can we add an option to skip this
confirmation ?



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

* Re: On package-install x package-install-selected-packages
  2021-03-13  6:13 On package-install x package-install-selected-packages Gabriel
@ 2021-03-13  7:05 ` Stefan Kangas
  2021-03-13 14:13 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Kangas @ 2021-03-13  7:05 UTC (permalink / raw)
  To: Gabriel, emacs-devel

Gabriel <gabriel376@hotmail.com> writes:

> On package.el, the 'package-install' calls
> 'package--archives-initialize' to initialize the archive contents, but
> 'package-install-selected-packages' does not calls it, relying on users
> to initialize the archive contents by themselves. I could not find any
> documentation about this difference. Should we modify
> 'package-install-selected-packages' to call
> 'package--archives-initialize' ?

Makes sense to me.  It doesn't seem useful that there should be any
difference with `package-install' in this regard.

> Also, 'package-install-selected-packages' always asks for a confirmation
> to install or not the packages. Can we add an option to skip this
> confirmation ?

Would it be best to add an option, or is it better to add a (prefix?)
argument to `package-install-selected-packages'?

I can only think of the use-case where I would like to call that
function from my Init file to always have things installed (such as on a
new machine), and it seems easier to just pass an argument than to
remember the name of and set an option.  But perhaps you have another
use-case in mind?



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

* Re: On package-install x package-install-selected-packages
  2021-03-13  6:13 On package-install x package-install-selected-packages Gabriel
  2021-03-13  7:05 ` Stefan Kangas
@ 2021-03-13 14:13 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2021-03-13 14:13 UTC (permalink / raw)
  To: Gabriel; +Cc: emacs-devel

> On package.el, the 'package-install' calls
> 'package--archives-initialize' to initialize the archive contents, but
> 'package-install-selected-packages' does not calls it, relying on users
> to initialize the archive contents by themselves. I could not find any
> documentation about this difference. Should we modify
> 'package-install-selected-packages' to call
> 'package--archives-initialize' ?

Yes, please.

> Or add some flag to control this behavior ?

No please.

> Also, 'package-install-selected-packages' always asks for a confirmation
> to install or not the packages. Can we add an option to skip this
> confirmation ?

No strong opinion on this one.  The confirmation doesn't seem too
harmful because I presume it's not a frequent operation, and it takes
a while, and it's not necessarily the case that the user knows
beforehand what will be installed, but admittedly the prompt only tells
how many packages are to be installed, not which ones.


        Stefan




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

end of thread, other threads:[~2021-03-13 14:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-13  6:13 On package-install x package-install-selected-packages Gabriel
2021-03-13  7:05 ` Stefan Kangas
2021-03-13 14:13 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).