Emacs config utilizing prelude as a base
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

160 lines
5.0 KiB

  1. # Installation
  2. ## Prerequisites
  3. Obviously to use the Emacs Prelude you have to install Emacs
  4. first. We'll assume you can manage this part on your own.
  5. Aim for the newest stable Emacs release, although as a rule of
  6. thumb Prelude aims to support the last 2-3 stable releases.
  7. For spell-checking to work you should install `aspell`, together with its
  8. dictionaries for the languages you wish to check.
  9. You'll also do well to install some of the following:
  10. * `git` (needed by Magit)
  11. * `ag` (`the_silver_searcher`) or `ripgrep` (Projectile has nice integration with them and they are much faster than `grep`)
  12. * your favorite lint tools (for Flycheck)
  13. All those tools are completely optional, though.
  14. !!! Note
  15. Additional external tools might be needed by some of the modules (e.g. tools specific to particular programming languages, etc).
  16. ## Installation
  17. ### Automated
  18. You can install Emacs Prelude via the command line with either `curl` or
  19. `wget`. Naturally `git` is also required.
  20. The installer script will do the following:
  21. * Clone Prelude's GitHub repo
  22. * Check your Emacs version
  23. * Backup any existing `.emacs` or `.emacs.d` you might have
  24. * Create any additional folders if necessary (e.g. for storing package-specific data)
  25. If you have a `.emacs` file it will backed up as `.emacs.pre-prelude` and if you have
  26. a `.emacs.d` folder, it will be backed up as `.emacs.d.pre-prelude.tar`.
  27. #### Via Curl
  28. If you're using `curl` type the following command:
  29. ```shellsession
  30. $ curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh
  31. ```
  32. #### Via Wget
  33. If you're using `wget` type:
  34. ```shellsession
  35. $ wget --no-check-certificate https://github.com/bbatsov/prelude/raw/master/utils/installer.sh -O - | sh
  36. ```
  37. ### Manual
  38. Make sure you do not have any `~/.emacs` file or `~/.emacs.d` folder present.
  39. ```shellsession
  40. $ git clone git://github.com/bbatsov/prelude.git path/to/local/repo
  41. $ ln -s path/to/local/repo ~/.emacs.d
  42. $ cd ~/.emacs.d
  43. ```
  44. !!! Note
  45. If you are using Windows, you should check what Emacs thinks the `~` directory is by running Emacs
  46. and typing `C-x d ~/<RET>`, and then adjust the command appropriately.
  47. ## Updating Prelude
  48. ### Manual update
  49. The update procedure is fairly straightforward and consists of 3 steps:
  50. #### Update all bundled packages
  51. Just run <kbd>M-x package-list-packages RET U x</kbd>.
  52. #### Update Prelude's code
  53. ```shellsession
  54. $ cd path/to/prelude/installation
  55. $ git pull
  56. ```
  57. The `path/to/prelude/installation` is usually `~/.emacs.d` (at least
  58. on Unix systems).
  59. #### Restart Prelude
  60. It's generally a good idea to stop Emacs after you do the update. The
  61. next time Prelude starts it will install any new dependencies (if
  62. there are such).
  63. ### Automatic update
  64. Simply run <kbd>M-x prelude-update</kbd> from Emacs itself and restart Emacs afterwards.
  65. ## Pinning packages
  66. By default, Prelude will install packages from the MELPA and GNU ELPA package
  67. repositories. Occasionally package integration can break when upgrading packages,
  68. as the packages in the MELPA repository are all snapshot builds.
  69. This can be avoided by pinning packages to stable versions in other repositories (e.g. MELPA Stable).
  70. To do so, copy `prelude-pinned-packages.el` from the sample directory to
  71. Prelude's root directory and adjust the [variables](https://www.gnu.org/software/emacs/manual/html_node/emacs/Package-Installation.html)
  72. inside accordingly.
  73. ## Enabling additional modules
  74. By default most of the modules that ship with Prelude are not loaded. For more information on the functionality provided by these modules visit the [docs](modules/index.md).
  75. ```lisp
  76. ;;; Uncomment the modules you'd like to use and restart Prelude afterwards
  77. (require 'prelude-c)
  78. ;; (require 'prelude-clojure)
  79. ;; (require 'prelude-coffee)
  80. ;; (require 'prelude-common-lisp)
  81. ;; (require 'prelude-css)
  82. (require 'prelude-emacs-lisp)
  83. (require 'prelude-erc)
  84. ;; (require 'prelude-erlang)
  85. ;; (require 'prelude-elixir)
  86. ;; (require 'prelude-haskell)
  87. (require 'prelude-js)
  88. ;; (require 'prelude-latex)
  89. (require 'prelude-lisp)
  90. (require 'prelude-org)
  91. (require 'prelude-perl)
  92. ;; (require 'prelude-python)
  93. ;; (require 'prelude-ruby)
  94. ;; (require 'prelude-scala)
  95. (require 'prelude-scheme)
  96. ;; (require 'prelude-scss)
  97. ;; (require 'prelude-web)
  98. (require 'prelude-xml)
  99. ```
  100. You'll need to adjust your `prelude-modules.el` file once the installation is done.
  101. In case of an automated installation, you'll find this file in the `personal` directory of your Emacs installation.
  102. If you are doing a manual install then you first
  103. need to copy the `prelude-modules.el` available in the sample
  104. directory to the root of `path/to/prelude/installation` and then
  105. adjust that one.
  106. After you've uncommented a module you should either restart Emacs or evaluate the module
  107. `require` expression with <kbd>C-x C-e</kbd>.
  108. ## Uninstalling Prelude
  109. Provided you've installed Prelude in `.emacs.d`, all you need to do is delete that folder.
  110. If you opted for the manual installing and making `.emacs.d` a symlink - you remove/update
  111. the link. Yeah, it's as simple as that. No fancy uninstaller required!