How to automatically install Emacs packages by specifying a list of package names?

后端 未结 11 2653
隐瞒了意图╮
隐瞒了意图╮ 2020-12-22 15:22

I am using package to manage my Emacs extensions. In order to synchronize my Emacs settings on different computers, I\'d like a way to specify a list of package

11条回答
  •  盖世英雄少女心
    2020-12-22 15:45

    Call package-install with the package name as a symbol. You can find the package names for your packages by calling package-install interactively and completing on the name. The function package-installed-p will let you know if it's already been installed.

    For example:

    (mapc
     (lambda (package)
       (or (package-installed-p package)
           (package-install package)))
     '(package1 package2 package3))
    

提交回复
热议问题