emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 5fdb7de 05/90: Allow to open an Info file on the file syst


From: Oleh Krehel
Subject: [elpa] master 5fdb7de 05/90: Allow to open an Info file on the file system
Date: Tue, 30 Jun 2015 07:27:58 +0000

branch: master
commit 5fdb7de40474992bb9cb82538e6dd26967c3a9a9
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]