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

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

[elpa] externals/ivy-explorer 4c19171 22/29: Add ivy-explorer-read funct


From: Clemens Radermacher
Subject: [elpa] externals/ivy-explorer 4c19171 22/29: Add ivy-explorer-read function to read any colledtion with the grid
Date: Tue, 12 Mar 2019 09:04:37 -0400 (EDT)

branch: externals/ivy-explorer
commit 4c19171551d256f8209f8105f100e25827c6328c
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>

    Add ivy-explorer-read function to read any colledtion with the grid
---
 ivy-explorer.el | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/ivy-explorer.el b/ivy-explorer.el
index 9ca7808..862ea7f 100644
--- a/ivy-explorer.el
+++ b/ivy-explorer.el
@@ -656,6 +656,17 @@ Call the permanent action if possible.")
     (funcall ivy-explorer-message-function mstring)))
 
 
+(defun ivy-explorer-read (prompt coll &optional avy mcols)
+  "Read value from a grid.
+
+PROMPT and COLL are the same as for `completing-read'. If AVY is
+non-nil the grid is initilized with avy selection. MCOLS is the maximal
+number of columns to use and defaults to (/ (frame-width) 30)."
+  (let ((ivy-explorer-auto-init-avy avy)
+        (ivy-explorer-max-columns (or mcols (/ (frame-width) 30))))
+    (ivy-explorer--internal #'completing-read prompt coll)))
+
+
 (defun ivy-explorer--internal (f &rest args)
   "Invoke ivy explorer for F with ARGS."
   (let ((ivy-display-function #'ivy-explorer--display-function)



reply via email to

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