Customize the list of packages that emacs-prelude provides

I see on this link how emacs prelude ensures that a set of packages will be installed when emacs starts. I was wondering if I can somehow extend the prelude-packages variable to add some other packages without changing the prelude-packages.el file?

The ban on the fact that I was wondering how I can determine the list of packages that are installed at startup if they are not currently installed.

+8
emacs elisp emacs-prelude
source share
3 answers

Prelude recommends using

 (prelude-require-packages '(some-package some-other-package)) 

If you have multiple packages. Or if you want to add only one package:

 (prelude-require-package 'some-package) 

If you want, you can save the list of packages in a variable:

 (setq my-packages '(drupal-mode nginx-mode toto-mode) (prelude-require-package my-packages) 
+5
source share

You can put the .el file in the personal/ directory in Prelude. Prelude loads any .el file that finds it in alphabetical order. The following is the contents of my personal/00-packages.el . File:

 (require 'package) (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) (package-initialize) ;; My packages (setq prelude-packages (append '( drupal-mode nginx-mode ) prelude-packages)) ;; Install my packages (prelude-install-packages) 

A "00" is appended to the file name to ensure that the file is uploaded to all personal settings. Add the new package that you need to add to the prelude-packages list.

In addition, if you want to use any mode not available in MELPA or Marmalade, you can simply leave the mode file in a personal folder, and Prelude will pick it up at boot time. If there are any settings in this mode, just create another .el file and add the Emacs Lisp code there.

+8
source share

In your .emacs file, you can add such code (very similar to the code in the link you provided) to check if each package is installed and install it if it is not:

 (dolist (package '(eredis anything erlang elnode)) (unless (package-installed-p package) (package-install package))) 

In response to your question, there is no reason why you cannot do this after running the prelude code.

+1
source share

All Articles