Skip to content

Commit

Permalink
Regenerate Texinfo manual
Browse files Browse the repository at this point in the history
* doc/Makefile (ivy.texi): List helper scripts as prerequisites.
* doc/scripts.el (org-to-texi): Always indent Texinfo with spaces.
* doc/ivy.org (Key bindings for single selection, action, then exit
minibuffer, Example - ivy-read-with-extra-properties): Fix
indentation.
* doc/ivy.texi: Regenerate (PR abo-abo#2853).
  • Loading branch information
basil-conto committed May 3, 2021
1 parent 67e6734 commit 4ffee1c
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 50 deletions.
2 changes: 1 addition & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
INFO_INSTALL_DIR="${HOME}/git/gnu-elpa/packages/ivy"

ivy.texi: ivy.org
ivy.texi: ivy.org ivy-ox.el scripts.el
emacs -batch -l ivy-ox.el -l scripts.el --eval "(org-to-texi \"ivy.org\")"

ivy.info: ivy.texi
Expand Down
8 changes: 4 additions & 4 deletions doc/ivy.org
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ extends usability of lists in Emacs.
(should
(equal (ivy-with
'(progn
(ivy-read "Test: " '("can do" "can't, sorry" "other"))
ivy-text)
(ivy-read "Test: " '("can do" "can't, sorry" "other"))
ivy-text)
"c <tab>")
"can"))
#+end_src
Expand Down Expand Up @@ -1376,8 +1376,8 @@ displayed strings.
(ivy-read "Find symbols: "
#'find-candidates-function
:action (lambda (x)
(message "Value: %s" (get-text-property 0 'property x)
))))
(message "Value: %s"
(get-text-property 0 'property x)))))
#+END_SRC

Here are the interesting features of the above function:
Expand Down
90 changes: 45 additions & 45 deletions doc/ivy.texi
Original file line number Diff line number Diff line change
Expand Up @@ -486,11 +486,11 @@ Example ERT test:
@lisp
(should
(equal (ivy-with
'(progn
(ivy-read "Test: " '("can do" "can't, sorry" "other"))
ivy-text)
"c <tab>")
"can"))
'(progn
(ivy-read "Test: " '("can do" "can't, sorry" "other"))
ivy-text)
"c <tab>")
"can"))
@end lisp
@end indentedblock
@subsubheading @kbd{C-M-j} (@code{ivy-immediate-done})
Expand Down Expand Up @@ -711,9 +711,9 @@ Hydra menu offers these additional bindings:
Toggle calling the action after each candidate change. It
modifies @kbd{j} to @kbd{jg}, @kbd{k} to @kbd{kg} etc.
@end indentedblock
@subsubheading @kbd{m} (@code{ivy-rotate-preferred-builders})
@subsubheading @kbd{M} (@code{ivy-rotate-preferred-builders})
@vindex ivy-rotate-preferred-builders
@kindex m
@kindex M
@indentedblock
Rotate the current regexp matcher.
@end indentedblock
Expand Down Expand Up @@ -872,7 +872,7 @@ completion:
@lisp
(setq ivy-re-builders-alist
'((read-file-name-internal . ivy--regex-fuzzy)
(t . ivy--regex-plus)))
(t . ivy--regex-plus)))
@end lisp

Here, @code{read-file-name-internal} is a function that is passed as the
Expand Down Expand Up @@ -1241,10 +1241,10 @@ Use the command name as the key:
(defun my-command-with-3-actions ()
(interactive)
(ivy-read "test: " '("foo" "bar" "baz")
:action '(1
("o" my-action-1 "action 1")
("j" my-action-2 "action 2")
("k" my-action-3 "action 3"))))
:action '(1
("o" my-action-1 "action 1")
("j" my-action-2 "action 2")
("k" my-action-3 "action 3"))))
@end lisp

The number 1 above is the index of the default action. Each
Expand Down Expand Up @@ -1644,20 +1644,20 @@ later use yourself. However, it's recommended that you use the
"Forward to `describe-function'."
(interactive)
(ivy-read "Describe function: "
(let (cands)
(mapatoms
(lambda (x)
(when (fboundp x)
(push (symbol-name x) cands))))
cands)
:keymap counsel-describe-map
:preselect (ivy-thing-at-point)
:history 'counsel-describe-symbol-history
:require-match t
:action (lambda (x)
(describe-function
(intern x)))
:caller 'counsel-describe-function))
(let (cands)
(mapatoms
(lambda (x)
(when (fboundp x)
(push (symbol-name x) cands))))
cands)
:keymap counsel-describe-map
:preselect (ivy-thing-at-point)
:history 'counsel-describe-symbol-history
:require-match t
:action (lambda (x)
(describe-function
(intern x)))
:caller 'counsel-describe-function))
@end lisp

Here are the interesting features of the above function, in the order that they appear:
Expand Down Expand Up @@ -1721,9 +1721,9 @@ narrowing) or select a candidate from the visible collection.
(progn
(counsel--async-command
(format "locate %s '%s'"
(mapconcat #'identity counsel-locate-options " ")
(counsel--elisp-to-pcre
(ivy--regex str))))
(mapconcat #'identity counsel-locate-options " ")
(counsel--elisp-to-pcre
(ivy--regex str))))
'("" "working..."))))
;;;###autoload
Expand All @@ -1732,15 +1732,15 @@ narrowing) or select a candidate from the visible collection.
INITIAL-INPUT can be given as the initial minibuffer input."
(interactive)
(ivy-read "Locate: " #'counsel-locate-function
:initial-input initial-input
:dynamic-collection t
:history 'counsel-locate-history
:action (lambda (file)
(with-ivy-window
(when file
(find-file file))))
:unwind #'counsel-delete-process
:caller 'counsel-locate))
:initial-input initial-input
:dynamic-collection t
:history 'counsel-locate-history
:action (lambda (file)
(with-ivy-window
(when file
(find-file file))))
:unwind #'counsel-delete-process
:caller 'counsel-locate))
@end lisp

Here are the interesting features of the above functions, in the order
Expand Down Expand Up @@ -1789,18 +1789,18 @@ displayed strings.
@lisp
(defun find-candidates-function (str pred _)
(let ((props '(1 2))
(strs '("foo" "foo2")))
(strs '("foo" "foo2")))
(cl-mapcar (lambda (s p) (propertize s 'property p))
strs
props)))
strs
props)))
(defun find-candidates ()
(interactive)
(ivy-read "Find symbols: "
#'find-candidates-function
:action (lambda (x)
(message "Value: %s" (get-text-property 0 'property x)
))))
#'find-candidates-function
:action (lambda (x)
(message "Value: %s"
(get-text-property 0 'property x)))))
@end lisp

Here are the interesting features of the above function:
Expand Down
1 change: 1 addition & 0 deletions doc/scripts.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
(setq org-confirm-babel-evaluate nil)
(defun org-to-texi (fname)
(find-file fname)
(setq-default indent-tabs-mode nil)
(org-texinfo-export-to-texinfo))

0 comments on commit 4ffee1c

Please sign in to comment.