Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Thierry Volpiatto committed Apr 10, 2019
1 parent ffbae23 commit 0f59a63
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
14 changes: 8 additions & 6 deletions helm-help.el
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,7 @@ enable this you need to add `helm-source-occur' and `helm-source-moccur' to
You can do this with `\\<helm-map>\\[helm-execute-persistent-action]' (persistent-action), to do it repeatedly
you can use `\\<helm-map>\\[helm-follow-action-forward]' and `\\<helm-map>\\[helm-follow-action-backward]' or enable `helm-follow-mode' with `\\<helm-map>\\[helm-follow-mode]'.
Follow mode is enabled by default in helm-occur.
*** Switch to buffer in other window
Expand All @@ -1397,7 +1398,7 @@ in other window horizontally or vertically if a prefix arg is supplied.
*** Save the results
Similarly to Helm-grep, you can save the results with `\\<helm-map>\\[helm-moccur-run-save-buffer]'.
Similarly to Helm-grep, you can save the results with `\\<helm-occur-map>\\[helm-occur-run-save-buffer]'.
Once in the saved buffer, you can edit it, see [[Edit a saved buffer][below]].
Of course if you don't save the results, you can resume the Helm session with
Expand Down Expand Up @@ -1431,13 +1432,14 @@ this region with `mark-defun' the symbol that was at point before
marking defun will be used when `helm-source-occur' is member of
`helm-sources-using-default-as-input'.
*** Switch to next or previous source
See [[Moving in `helm-buffer'][Moving in `helm-buffer']].
** Commands
\\<helm-moccur-map>
\\[helm-goto-next-file]\t\tNext buffer.
\\[helm-goto-precedent-file]\t\tPrevious buffer.
\\[helm-yank-text-at-point]\t\tYank text at point in minibuffer.
\\[helm-moccur-run-goto-line-ow]\t\tGo to line in other window.
\\[helm-moccur-run-goto-line-of]\t\tGo to line in new frame.")
\\[helm-occur-run-goto-line-ow]\t\tGo to line in other window.
\\[helm-occur-run-goto-line-of]\t\tGo to line in new frame.")

;;; Helm Top
;;
Expand Down
4 changes: 4 additions & 0 deletions helm-occur.el
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ engine beeing completely different and also much faster."
:initform nil)))

(defun helm-occur-build-sources (buffers &optional source-name)
"Build sources for helm-occur for each buffer in BUFFERS list."
(cl-loop for buf in buffers
collect
(helm-make-source (or source-name
Expand Down Expand Up @@ -201,6 +202,7 @@ engine beeing completely different and also much faster."
(cl-incf linum)
(insert (format "%s " linum))))))))
:filtered-candidate-transformer 'helm-occur-transformer
:help-message 'helm-moccur-help-message
:nomark t
:migemo t
:history 'helm-occur-history
Expand All @@ -214,6 +216,8 @@ engine beeing completely different and also much faster."
:moccur-buffers buffers)))

(defun helm-multi-occur-1 (buffers &optional input)
"Runs helm-occur on a list of buffers.
Each buffer's result is displayed in a separated source."
(let* ((curbuf (current-buffer))
(bufs (if helm-occur-always-search-in-current
(cons curbuf (remove curbuf buffers))
Expand Down
20 changes: 17 additions & 3 deletions helm.el
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ value of this var.")
"* Helm Generic Help
** Basics

Helm narrows down the list of candidates as you type a filter pattern.
Helm narrows down the list of candidates as you type a filter pattern see [[Matching in Helm][Matching in Helm]].

Helm accepts multiple space-separated patterns, each pattern can be negated with \"!\".

Expand All @@ -1043,6 +1043,19 @@ Note: In addition to the default actions list, additional actions appear
depending of the type of the selected candidate(s). They are called filtered
actions.

** Matching in Helm

All what you write in minibuffer is interpreted as a regexp or
multiple regexps if separated by a space. This is true for most
sources unless developer of source have disabled it or have choosen to
use fuzzy matching. Even if a source have fuzzy matching enabled,
helm will switch to multi match as soon as it detect a space in
pattern, it may also switch to multi match as well if pattern starts
with a \"^\" beginning of line sign, in those cases each pattern
separated with space should be a regexp and not a fuzzy pattern. When
using multi match patterns, each pattern starting with \"!\" is
interpreted as a negation i.e. match everything but this.

** Helm mode

`helm-mode' toggles Helm completion in native Emacs functions,
Expand Down Expand Up @@ -1238,10 +1251,11 @@ e.g. file deletion, file copy etc...

You can move in `helm-buffer' with the usual commands used in Emacs:
\(\\<helm-map>\\[helm-next-line], \\<helm-map>\\[helm-previous-line], etc. See above basic commands.
When `helm-buffer' contains more than one source, change source with \\<helm-map>\\[helm-next-source].
When `helm-buffer' contains more than one source, change source with \\<helm-map>\\[helm-next-source] and \\[helm-previous-source].

Note: When reaching the end of a source, \\<helm-map>\\[helm-next-line] will *not* go to the next source unless
variable `helm-move-to-line-cycle-in-source' is non-nil, so you will have to use \\<helm-map>\\[helm-next-source].
variable `helm-move-to-line-cycle-in-source' is non-nil, so you will have to use \\<helm-map>\\[helm-next-source]
and \\[helm-previous-source].

** Resume previous session from current Helm session

Expand Down

0 comments on commit 0f59a63

Please sign in to comment.