branch: master
commit 5fdb7de40474992bb9cb82538e6dd26967c3a9a9
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
Allow to open an Info file on the file system
* ivy.el (ivy-alt-done): Update.
When in Info-mode, press "g" and select either "(./)" or "(../)" to
switch to file name completion. That file will be opened with Info.
---
ivy.el | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/ivy.el b/ivy.el
index 4ae0c4e..e8299fa 100644
--- a/ivy.el
+++ b/ivy.el
@@ -279,6 +279,16 @@ When ARG is t, exit with current text, ignoring the
candidates."
ivy--current ivy--directory))))))
(ivy--cd dir)
(ivy--exhibit))
+ ((eq (ivy-state-collection ivy-last) 'Info-read-node-name-1)
+ (if (or (equal ivy--current "(./)")
+ (equal ivy--current "(../)"))
+ (ivy-quit-and-run
+ (ivy-read "Go to file: " 'read-file-name-internal
+ :action (lambda (x)
+ (Info-find-node
+ (expand-file-name x ivy--directory)
+ "Top"))))
+ (ivy-done)))
((string-match "\\`/\\([^/]+?\\):\\(?:\\(.*\\)@\\)?" ivy-text)
(let ((method (match-string 1 ivy-text))
(user (match-string 2 ivy-text))