Skip to content

Commit b07932c

Browse files
committed
Improve "Learning Emacs Lisp" doc
- split up into different sections, accommodate people just starting out with Emacs a bit more - add installation instructions for starter kits - add Doom Emacs starter kit for people switching from vim - reference style guide and coding conventions closes exercism#198 works on exercism#18 (exercism#18 (comment))
1 parent 037b969 commit b07932c

File tree

1 file changed

+66
-1
lines changed

1 file changed

+66
-1
lines changed

docs/LEARNING.md

+66-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,69 @@
11
# Learning
22

3+
## Starting out with Emacs
4+
35
So you've installed Emacs. Now what?
46

57
Well, you can start the tutoral by pressing `C-h t`, and that's not a bad place
6-
to start. If you're completely new to Emacs, the [Emacs Prelude](http://batsov.com/prelude/) package offers a
8+
to start. The tutorial will teach you the basics of editing, searching, and navigation in Emacs.
9+
10+
If you're completely new to Emacs, it can make sense to grab a starter kit,
11+
which comes with a set of configurations and packages already set up.
12+
13+
The [Emacs Prelude](http://batsov.com/prelude/) package offers a
714
nice set of sensible defaults and packages.
15+
To install Emacs Prelude run the following in a terminal:
16+
17+
```
18+
curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh
19+
```
20+
21+
and make sure to check out the [installation guide](https://prelude.emacsredux.com/en/latest/installation/) for further instructions.
22+
23+
24+
If you are familiar with vim you might be interested in the [Doom Emacs](https://github.com/doomemacs/doomemacs) starter kit, which integrates vim emulation powered by [evil-mode](https://github.com/emacs-evil/evil).
25+
To install Doom Emacs run the following in a terminal:
26+
27+
```
28+
git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.emacs.d
29+
~/.emacs.d/bin/doom install
30+
```
31+
32+
and make sure to check the [installation guide](https://github.com/doomemacs/doomemacs#install) for further instructions.
33+
34+
## Setting up syntax checking and linting
35+
36+
Setting up syntax checking and linting with [Flycheck](https://www.flycheck.org/en/latest/) is recommended.
37+
38+
If you don't already have added the [MELPA](https://melpa.org/) repositories to your Emacs, do this by adding the following to your [init file](https://www.flycheck.org/en/latest/glossary.html#term-init-file)
39+
40+
```elisp
41+
(require 'package)
42+
43+
(add-to-list 'package-archives
44+
'("MELPA Stable" . "https://stable.melpa.org/packages/") t)
45+
(package-initialize)
46+
(package-refresh-contents)
47+
```
48+
49+
Installation and setup of Flycheck without [use-package](https://github.com/jwiegley/use-package) is done by adding the following to your [init file](https://www.flycheck.org/en/latest/glossary.html#term-init-file)
50+
51+
```elisp
52+
(package-install 'flycheck)
53+
(add-hook 'after-init-hook #'global-flycheck-mode)
54+
```
55+
56+
Installation and setup of Flycheck with [use-package](https://github.com/jwiegley/use-package) is done by adding the following to your [init file](https://www.flycheck.org/en/latest/glossary.html#term-init-file)
57+
58+
```elisp
59+
(use-package flycheck
60+
:ensure t
61+
:init (global-flycheck-mode))
62+
```
63+
64+
For further information and trouble shooting please check the [Flycheck documentation](https://www.flycheck.org/en/latest/user/troubleshooting.html).
65+
66+
## Learning Emacs Lisp
867

968
The best documentation on Emacs Lisp is... shipped with Emacs itself!
1069
to access the
@@ -17,3 +76,9 @@ it [online](https://www.gnu.org/software/emacs/manual/elisp.html).
1776
If you are brand new to Elisp, you can read the
1877
[Introduction to Emacs Lisp](http://www.emacswiki.org/emacs/EmacsLispIntro),
1978
which is opened the same way.
79+
80+
## Emacs Lisp best practices and conventions
81+
82+
The Emacs Manual contains a section on Emacs Lisp [Coding Conventions](https://www.gnu.org/software/emacs/manual/html_node/elisp/Coding-Conventions.html).
83+
84+
There is also a community driven [Style Guide](https://github.com/bbatsov/emacs-lisp-style-guide) maintained on GitHub.

0 commit comments

Comments
 (0)