[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-explorer 9f63344 25/29: Allow specifiying width to
From: |
Clemens Radermacher |
Subject: |
[elpa] externals/ivy-explorer 9f63344 25/29: Allow specifiying width to create the menu string |
Date: |
Tue, 12 Mar 2019 09:04:38 -0400 (EDT) |
branch: externals/ivy-explorer
commit 9f63344d793349bcc1609c6fd5fd83158449c7bf
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Allow specifiying width to create the menu string
---
ivy-explorer.el | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/ivy-explorer.el b/ivy-explorer.el
index d82d99c..335624e 100644
--- a/ivy-explorer.el
+++ b/ivy-explorer.el
@@ -75,6 +75,10 @@ adjusted to a lower number automatically."
:group 'ivy-explorer
:type 'integer)
+(defcustom ivy-explorer-width (frame-width)
+ "Width used to display the grid."
+ :type 'integer)
+
(defcustom ivy-explorer-max-function #'ivy-explorer-max
"Function which should return max number of canidates."
:group 'ivy-explorer
@@ -650,7 +654,7 @@ Call the permanent action if possible.")
(let* ((strings (or (split-string text "\n" t)
(list "")))
(menu (ivy-explorer--get-menu-string
- strings ivy-explorer-max-columns))
+ strings ivy-explorer-max-columns ivy-explorer-width))
(mcols (caar menu))
(mrows (cdar menu))
(mstring (cdr menu)))
@@ -659,16 +663,22 @@ Call the permanent action if possible.")
(funcall ivy-explorer-message-function mstring)))
-(defun ivy-explorer-read (prompt coll &optional avy mcols)
+(defun ivy-explorer-read (prompt coll &optional avy mcols width)
"Read value from an explorer grid.
PROMPT and COLL are the same as for `ivy-read'. If AVY is non-nil
-the grid is initilized with avy selection. MCOLS is the number of
-columns to use. If the grid does not fit on the screen the number
-of columns is adjusted to a lower number automatically. If not
-given the the value is calculated by (/ (frame-width) 30)."
+the grid is initilized with avy selection.
+
+MCOLS is the number of columns to use. If the grid does not fit
+on the screen the number of columns is adjusted to a lower number
+automatically. If not given the the value is calculated
+by (/ (frame-width) 30)
+
+WIDTH is the width to be used to create the grid and defaults to
+frame-width."
(let ((ivy-explorer-max-columns (or mcols (/ (frame-width) 30)))
(ivy-wrap nil)
+ (ivy-explorer-width (or width (frame-width)))
(ivy-height (funcall ivy-explorer-max-function))
(ivy-display-function #'ivy-explorer--display-function)
(ivy-posframe-hide-minibuffer
- [elpa] externals/ivy-explorer e4bb026 26/29: Allow specifying height of grid display, (continued)
- [elpa] externals/ivy-explorer e4bb026 26/29: Allow specifying height of grid display, Clemens Radermacher, 2019/03/12
- [elpa] externals/ivy-explorer 5fb5512 20/29: Only parse visible window part for avy selection with posframe, Clemens Radermacher, 2019/03/12
- [elpa] externals/ivy-explorer 6245f34 28/29: Change some frame paramaters for better posframe display, Clemens Radermacher, 2019/03/12
- [elpa] externals/ivy-explorer 72a511e 21/29: Don't keep avy on after first use, Clemens Radermacher, 2019/03/12
- [elpa] externals/ivy-explorer 384e241 18/29: Use ivy posframe dispatching done when using posframe, Clemens Radermacher, 2019/03/12
- [elpa] externals/ivy-explorer 5f9dafc 29/29: Version bump, Clemens Radermacher, 2019/03/12
- [elpa] externals/ivy-explorer 6481247 08/29: Refactor ivy-explorer-avy, Clemens Radermacher, 2019/03/12
- [elpa] externals/ivy-explorer 2badbe3 09/29: Bytec. fixes for free avy vars, Clemens Radermacher, 2019/03/12
- [elpa] externals/ivy-explorer c2ef475 19/29: Update ivy explorere avy dispatch for posframe, Clemens Radermacher, 2019/03/12
- [elpa] externals/ivy-explorer 8cfe1b4 23/29: Update docstrings, Clemens Radermacher, 2019/03/12
- [elpa] externals/ivy-explorer 9f63344 25/29: Allow specifiying width to create the menu string,
Clemens Radermacher <=
- [elpa] externals/ivy-explorer 36fef40 14/29: Update description, Clemens Radermacher, 2019/03/12
- [elpa] externals/ivy-explorer 81b2a17 24/29: Improve ivy-explorer-read, Clemens Radermacher, 2019/03/12