Skip to content

Commit 847ba97

Browse files
committed
Tweak some documentation
* .dir-locals.el (markdown-mode, org-mode): Codify existing fill-column convention. * CONTRIBUTING.org: * README.md: * doc/ivy.org: Prefer setopt, keymap-set, and keymap-global-set over their older counterparts in examples. End sentences with double spaces. Tweak occasional wording, capitalization, and markup. * doc/ivy.texi: Regenerate manual. * ivy.el (ivy-insert-current-full): Fix docstring.
1 parent e891541 commit 847ba97

File tree

6 files changed

+566
-556
lines changed

6 files changed

+566
-556
lines changed

.dir-locals.el

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@
88
(indent-tabs-mode . nil)
99
;; extra config here: https://github.com/abo-abo/oremacs/blob/github/modes/ora-elisp-style-guide.el
1010
;; (lisp-indent-function . common-lisp-indent-function)
11-
))
11+
)
12+
(markdown-mode
13+
(fill-column . 70))
14+
(org-mode
15+
(fill-column . 70)))

CONTRIBUTING.org

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ Before submitting a change, run:
5454
- =make check-declare= - check accuracy of function declarations
5555
- =make checkdoc= - check documentation guidelines
5656

57-
Use your own judgment for the commit messages, I recommend a verbose
57+
Use your own judgment for the commit messages. I recommend a verbose
5858
style using =magit-commit-add-log=.
5959

6060
* Copyright Assignment
6161
These packages are subject to the same [[https://www.gnu.org/prep/maintain/html_node/Copyright-Papers.html][Copyright Assignment]] policy as
62-
Emacs itself, org-mode, CEDET and other packages in [[https://elpa.gnu.org/packages/][GNU ELPA]].
62+
Emacs itself, Org Mode, CEDET and other packages in [[https://elpa.gnu.org/packages/][GNU ELPA]].
6363

6464
Any [[https://www.gnu.org/prep/maintain/html_node/Legally-Significant.html#Legally-Significant][legally significant]] contributions can only be accepted after the
6565
author has completed their paperwork. Please see [[https://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/Copyright/request-assign.future][the request form]] if
@@ -70,6 +70,6 @@ copyright for your submitted changes to Emacs belongs to the FSF.
7070
This assignment works for all projects related to Emacs. To obtain it
7171
you need to:
7272
- send one email
73-
- then send one letter (if you live in the US, it's digital)
73+
- then send one letter (in certain countries, it's digital)
7474
- wait for some time (in my case, I had to wait for one month; but
7575
recently it's less than a week)

README.md

Lines changed: 49 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ commands.
1818
[![MELPA](https://melpa.org/packages/ivy-badge.svg)](https://melpa.org/#/ivy)
1919
[![MELPA Stable](https://stable.melpa.org/packages/ivy-badge.svg)](https://stable.melpa.org/#/ivy)
2020

21-
Ivy is a generic completion mechanism for Emacs. While it operates
21+
Ivy is a generic completion mechanism for Emacs. While it operates
2222
similarly to other completion schemes such as `icomplete-mode`, Ivy
2323
aims to be more efficient, smaller, simpler, and smoother to use yet
2424
highly customizable.
2525

26-
To try Ivy, just call <kbd>M-x</kbd> `ivy-mode`. This will enable
26+
To try Ivy, just call <kbd>M-x</kbd> `ivy-mode`. This will enable
2727
generic Ivy completion, including specific completion for file and
2828
buffer names.
2929

@@ -33,46 +33,48 @@ Install the `ivy` package from GNU ELPA or MELPA.
3333

3434
Users of Debian ≥10 (and derivatives such as Ubuntu ≥18.04) can
3535
install Ivy, Counsel, and Swiper with `sudo apt install elpa-counsel`.
36-
To add Hydra support `sudo apt install elpa-ivy-hydra`.
36+
To add Hydra support: `sudo apt install elpa-ivy-hydra`.
3737

3838
## Documentation
3939

4040
### Manual
41-
The manual is available as [HTML](https://oremacs.com/swiper/).
4241

4342
Installing `ivy` from GNU ELPA or MELPA also installs the manual under
4443
the `(ivy)` Info node.
4544

4645
The source file for the Info page is [here](doc/ivy.org).
4746

47+
The manual is also available as [HTML](https://oremacs.com/swiper/).
48+
4849
### Wiki
49-
Ivy and Swiper wiki is here: [the wiki](https://github.com/abo-abo/swiper/wiki).
50+
51+
Ivy and Swiper wiki [is here](https://github.com/abo-abo/swiper/wiki).
5052

5153
### Small config example
5254

5355
```elisp
5456
(ivy-mode)
55-
(setq ivy-use-virtual-buffers t)
56-
(setq enable-recursive-minibuffers t)
57-
;; enable this if you want `swiper' to use it
58-
;; (setq search-default-mode #'char-fold-to-regexp)
59-
(global-set-key "\C-s" 'swiper)
60-
(global-set-key (kbd "C-c C-r") 'ivy-resume)
61-
(global-set-key (kbd "<f6>") 'ivy-resume)
62-
(global-set-key (kbd "M-x") 'counsel-M-x)
63-
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
64-
(global-set-key (kbd "<f1> f") 'counsel-describe-function)
65-
(global-set-key (kbd "<f1> v") 'counsel-describe-variable)
66-
(global-set-key (kbd "<f1> o") 'counsel-describe-symbol)
67-
(global-set-key (kbd "<f1> l") 'counsel-find-library)
68-
(global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
69-
(global-set-key (kbd "<f2> u") 'counsel-unicode-char)
70-
(global-set-key (kbd "C-c g") 'counsel-git)
71-
(global-set-key (kbd "C-c j") 'counsel-git-grep)
72-
(global-set-key (kbd "C-c k") 'counsel-ag)
73-
(global-set-key (kbd "C-x l") 'counsel-locate)
74-
(global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
75-
(define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history)
57+
(setopt ivy-use-virtual-buffers t)
58+
(setopt enable-recursive-minibuffers t)
59+
;; Enable this if you want `swiper' to use it:
60+
;; (setopt search-default-mode #'char-fold-to-regexp)
61+
(keymap-global-set "C-s" #'swiper-isearch)
62+
(keymap-global-set "C-c C-r" #'ivy-resume)
63+
(keymap-global-set "<f6>" #'ivy-resume)
64+
(keymap-global-set "M-x" #'counsel-M-x)
65+
(keymap-global-set "C-x C-f" #'counsel-find-file)
66+
(keymap-global-set "<f1> f" #'counsel-describe-function)
67+
(keymap-global-set "<f1> v" #'counsel-describe-variable)
68+
(keymap-global-set "<f1> o" #'counsel-describe-symbol)
69+
(keymap-global-set "<f1> l" #'counsel-find-library)
70+
(keymap-global-set "<f2> i" #'counsel-info-lookup-symbol)
71+
(keymap-global-set "<f2> u" #'counsel-unicode-char)
72+
(keymap-global-set "C-c g" #'counsel-git)
73+
(keymap-global-set "C-c j" #'counsel-git-grep)
74+
(keymap-global-set "C-c k" #'counsel-ag)
75+
(keymap-global-set "C-x l" #'counsel-locate)
76+
(keymap-global-set "C-S-o" #'counsel-rhythmbox)
77+
(keymap-set minibuffer-local-map "C-r" #'counsel-minibuffer-history)
7678
```
7779

7880
Note: parts of this config can be replaced by using `counsel-mode`.
@@ -84,23 +86,24 @@ Note: parts of this config can be replaced by using `counsel-mode`.
8486
[![MELPA](https://melpa.org/packages/counsel-badge.svg)](https://melpa.org/#/counsel)
8587
[![MELPA Stable](https://stable.melpa.org/packages/counsel-badge.svg)](https://stable.melpa.org/#/counsel)
8688

87-
`ivy-mode` ensures that any Emacs command using
88-
`completing-read-function` uses ivy for completion.
89+
`ivy-mode` ensures that any Emacs command invoking `completing-read`
90+
or `completion-in-region` will use Ivy for completion.
8991

9092
Counsel takes this further, providing versions of common Emacs
91-
commands that are customised to make the best use of Ivy. For example,
92-
`counsel-find-file` has some additional keybindings. Pressing
93-
<kbd>DEL</kbd> will move you to the parent directory.
93+
commands that are customized to make the best use of Ivy. For
94+
example, `counsel-find-file` has some additional keybindings.
95+
Pressing <kbd>DEL</kbd> will move you to the parent directory.
9496

9597
Enabling `counsel-mode` remaps built-in Emacs functions that have
96-
counsel replacements:
98+
Counsel replacements:
9799

98-
| Emacs command | Counsel equivalent |
100+
| Emacs command | Counsel counterpart |
99101
|----------------------------|------------------------------|
100102
| `execute-extended-command` | `counsel-M-x` |
101103
| `describe-bindings` | `counsel-descbinds` |
102104
| `describe-function` | `counsel-describe-function` |
103105
| `describe-variable` | `counsel-describe-variable` |
106+
| `describe-symbol` | `counsel-describe-symbol` |
104107
| `apropos-command` | `counsel-apropos` |
105108
| `describe-face` | `counsel-describe-face` |
106109
| `list-faces-display` | `counsel-faces` |
@@ -121,28 +124,33 @@ counsel replacements:
121124
[![MELPA](https://melpa.org/packages/swiper-badge.svg)](https://melpa.org/#/swiper)
122125
[![MELPA Stable](https://stable.melpa.org/packages/swiper-badge.svg)](https://stable.melpa.org/#/swiper)
123126

124-
Swiper is an alternative to isearch that uses Ivy to show an overview
127+
Swiper is an alternative to Isearch that uses Ivy to show an overview
125128
of all matches.
126129

127130
![swiper.png](https://oremacs.com/download/swiper.png)
128131

129132
A Helm version of Swiper is also available:
130-
[swiper-helm](https://github.com/abo-abo/swiper-helm).
133+
[`swiper-helm`](https://github.com/abo-abo/swiper-helm).
131134

132135
## Screenshots
133136

134137
![ivy-swiper-1.png](https://oremacs.com/download/ivy-swiper-1.png)
135138

136-
There's also a ten minute [video demo](https://www.youtube.com/watch?v=VvnJQpTFVDc).
139+
There's also a ten minute [video demo](https://youtu.be/VvnJQpTFVDc).
137140

138141
# Frequently asked questions
139142

140-
Q: How do I enter an input that matches one of the candidates instead
141-
of this candidate? Example: create a file `bar` when a file
142-
`barricade` exists in the current directory.
143+
- Q: How do I enter an input that matches one of the candidates
144+
instead of this candidate? Example: create a file `bar` when a file
145+
`barricade` exists in the current directory.
143146

144-
A: Press <kbd>C-M-j</kbd>. Alternatively, you can make the prompt line selectable with `(setq ivy-use-selectable-prompt t)`.
147+
- A: Press <kbd>C-M-j</kbd>. Alternatively, you can make the prompt
148+
line selectable with:
149+
```elisp
150+
(setopt ivy-use-selectable-prompt t)
151+
```
145152

146153
# Contributing
147154

148-
Please see the [guidelines](CONTRIBUTING.org) for reporting issues and opening pull requests.
155+
Please see the [guidelines](CONTRIBUTING.org) for reporting issues and
156+
opening pull requests.

0 commit comments

Comments
 (0)