all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Let `package-install-selected-packages' install packages without asking for confirmation.
@ 2021-07-16 14:01 Hongyi Zhao
  2021-07-16 14:22 ` Arthur Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Hongyi Zhao @ 2021-07-16 14:01 UTC (permalink / raw)
  To: help-gnu-emacs

I use the following init file:

```
;https://emacs.stackexchange.com/questions/34180/how-can-i-script-emacs-to-install-packages-from-list
;https://stackoverflow.com/questions/10092322/how-to-automatically-install-emacs-packages-by-specifying-a-list-of-package-name
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)

(setq package-selected-packages
      '(company
        async))
(package-install-selected-packages)


(unless package-archive-contents
  (package-refresh-contents))
(package-install-selected-packages t)
```

But when I start Emacs, it still asks me to confirm the installation
of the packages. See the following info shown in minibuffer:

Packages to install: 2 (company async), proceed? (y or n)

As you can see, I've set the `(package-install-selected-packages t)'
option. So, how to let `package-install-selected-packages' install
packages without asking for confirmation.

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



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

end of thread, other threads:[~2021-07-26  0:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-16 14:01 Let `package-install-selected-packages' install packages without asking for confirmation Hongyi Zhao
2021-07-16 14:22 ` Arthur Miller
2021-07-16 14:41   ` Hongyi Zhao
2021-07-26  0:08   ` Rudolf Adamkovič

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.