[elpa] master 308bd9a: * externals-list: Add ivy-posframe info

2020-10-03 Thread Feng Shu
branch: master
commit 308bd9a0283eee100f2a2f1efeadf15553694a37
Author: Feng Shu 
Commit: Feng Shu 

* externals-list: Add ivy-posframe info
---
 externals-list | 1 +
 1 file changed, 1 insertion(+)

diff --git a/externals-list b/externals-list
index 5590116..fbdc58d 100644
--- a/externals-list
+++ b/externals-list
@@ -102,6 +102,7 @@
  ("hyperbole"   :external 
"http://git.savannah.gnu.org/r/hyperbole.git";)
  ("ioccur" :subtree 
"https://github.com/thierryvolpiatto/ioccur.git";)
  ("ivy-explorer":external "https://github.com/clemera/ivy-explorer";)
+ ;; ("ivy-posframe":external "https://github.com/tumashu/ivy-posframe";)
  ("js2-mode"   :subtree "https://github.com/mooz/js2-mode.git";)
  ("jsonrpc":core "lisp/jsonrpc.el")
  ("leaf"   :external "https://github.com/conao3/leaf.el";)



[elpa] externals/ivy-posframe 8861e54 002/195: Use ivy-display-functions-props

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 8861e5429ac585633e24263ff2891c702e6ce6f6
Author: Feng Shu 
Commit: Feng Shu 

Use ivy-display-functions-props
---
 ivy-posframe.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index e7fcf2a..ef253ba 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -76,13 +76,13 @@ Using current frame's font if it it nil."
   (setq ivy-display-function #'ivy-posframe-display)
   (push '(t . ivy-posframe-display)
 ivy-display-functions-alist)
-  (push '(ivy-posframe
-  :display ivy-posframe-display
+  (push '(ivy-posframe-display
   :cleanup ivy-posframe-cleanup)
-ivy-display-schemes)
+ivy-display-function-props)
   (message "Ivy-posframe is enabled, disable it need restart emacs."))
 
 
+
 (provide 'ivy-posframe)
 
 ;; Local Variables:



[elpa] externals/ivy-posframe 8d0b0ae 008/195: Update

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 8d0b0ae4cf75048d84b461426f8aeb08a7ebf173
Author: Feng Shu 
Commit: Feng Shu 

Update
---
 ivy-posframe.el | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index d0c2f69..01574dc 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -26,8 +26,21 @@
 
 
 ;;; Commentary:
-
 ;; * ivy-posframe README:README:
+;; ** What is ivy-posframe
+;; ivy-posframe is a ivy extension, which let ivy use posframe
+;; to show its candidate menu.
+
+;; [[./snapshots/ivy-posframe1.gif]]
+
+;; [[./snapshots/ivy-posframe2.gif]]
+
+;; ** How to use ivy-posframe
+
+;; #+BEGIN_EXAMPLE
+;; (require 'ivy-posframe)
+;; (ivy-posframe-mode 1)
+;; #+END_EXAMPLE
 
 ;;; Code:
 ;; * ivy-posframe's code



[elpa] externals/ivy-posframe 2733fe1 010/195: Set :position to (point).

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 2733fe1746bcdd5349cc7cae3887cab2f7665f1c
Author: Feng Shu 
Commit: Feng Shu 

Set :position to (point).
---
 ivy-posframe.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 01574dc..c1bea4c 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -86,6 +86,7 @@ More details can be found in docstring of `posframe-show'."
  ivy-posframe-buffer
  :font ivy-posframe-font
  :string (concat ivy--prompt ivy-text str)
+ :position (point)
  :poshandler (or ivy-posframe-poshandler
  #'posframe-poshandler-window-bottom-left-corner)
  :background-color (face-attribute 'ivy-posframe :background)



[elpa] externals/ivy-posframe 550c322 018/195: Fix warn

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 550c3227903242d7162a9bb5a3bf0adbb91b8409
Author: Feng Shu 
Commit: Feng Shu 

Fix warn
---
 ivy-posframe.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 91e4191..6c1078d 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -84,7 +84,7 @@
 
 (defcustom ivy-posframe-font nil
   "The font used by ivy-posframe.
-Using current frame's font if it it nil."
+When nil, Using current frame's font as fallback."
   :group 'ivy-posframe)
 
 (defcustom ivy-posframe-style 'window-buttom-left
@@ -93,11 +93,11 @@ Using current frame's font if it it nil."
 
 (defface ivy-posframe
   '((t (:inherit default :background "#33" :foreground "#dcdccc")))
-  "Face used for the ivy-posframe."
+  "Face used by the ivy-posframe."
   :group 'ivy-posframe)
 
 (defvar ivy-posframe-buffer " *ivy-posframe-buffer*"
-  "The buffer which used by ivy-posframe.")
+  "The posframe-buffer used by ivy-posframe.")
 
 (defvar ivy-posframe-style-alist
   '((window-center . posframe-poshandler-window-center)
@@ -108,7 +108,7 @@ Using current frame's font if it it nil."
   "Alist of ivy posframe styles.")
 
 (defun ivy-posframe-display (str)
-  "Show ivy's posframe."
+  "Show STR in ivy's posframe."
   (if (not (ivy-posframe-workable-p))
   (ivy-display-function-fallback str)
 (with-selected-window (ivy--get-window ivy-last)
@@ -128,12 +128,12 @@ Using current frame's font if it it nil."
:min-width 50
 
 (defun ivy-posframe-cleanup ()
-  "Clean ivy's posframe."
+  "Cleanup ivy's posframe."
   (when (ivy-posframe-workable-p)
 (posframe-hide ivy-posframe-buffer)))
 
 (defun ivy-posframe-workable-p ()
-  "Test ivy-posframe workable or not."
+  "Test ivy-posframe workable status."
   (and (>= emacs-major-version 26)
(not (or noninteractive
 emacs-basic-display



[elpa] externals/ivy-posframe 9db2b75 017/195: Update README

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 9db2b75ee905cdb1f02b7bcfe5a0b9a39d9e339f
Author: Feng Shu 
Commit: Feng Shu 

Update README
---
 README.md   |  21 +
 ivy-posframe.el |   6 ++
 snapshots/ivy-posframe3.gif | Bin 0 -> 111745 bytes
 3 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index 6278036..2f72949 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,18 @@
 
 # 目录
 
-1.  [ivy-posframe README](#org56f4250)
-1.  [What is ivy-posframe](#orge48b949)
-2.  [How to enable ivy-posframe](#orgf9d7738)
-3.  [How to set the style of ivy-posframe](#org3923198)
+1.  [ivy-posframe README](#orgeae4edc)
+1.  [What is ivy-posframe](#org16b85a0)
+2.  [How to enable ivy-posframe](#org6f59c0a)
+3.  [How to set the style of ivy-posframe](#orge1fc1e0)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -20,7 +20,7 @@ ivy-posframe is a ivy extension, which let ivy use posframe
 to show its candidate menu.
 
 
-
+
 
 ## How to enable ivy-posframe
 
@@ -38,7 +38,7 @@ to show its candidate menu.
 (push '(t . ivy-posframe-display) ivy-display-functions-alist)
 
 
-
+
 
 ## How to set the style of ivy-posframe
 
@@ -52,6 +52,11 @@ to show its candidate menu.
 (setq ivy-posframe-style 'window-center)
 
 ![img](./snapshots/ivy-posframe2.gif)
+3.  Point style
+
+(setq ivy-posframe-style 'point)
+
+![img](./snapshots/ivy-posframe3.gif)
 
 
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index f3c69ae..91e4191 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -60,6 +60,12 @@
 ;;(setq ivy-posframe-style 'window-center)
 ;;#+END_EXAMPLE
 ;;[[./snapshots/ivy-posframe2.gif]]
+;; 3. Point style
+;;#+BEGIN_EXAMPLE
+;;(setq ivy-posframe-style 'point)
+;;#+END_EXAMPLE
+;;[[./snapshots/ivy-posframe3.gif]]
+
 
 ;;; Code:
 ;; * ivy-posframe's code
diff --git a/snapshots/ivy-posframe3.gif b/snapshots/ivy-posframe3.gif
new file mode 100644
index 000..270838c
Binary files /dev/null and b/snapshots/ivy-posframe3.gif differ



[elpa] externals/ivy-posframe 2546238 016/195: reuse minibuffer's ivy prompt

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 254623810f64b8bd06820211a70d44add37f14b4
Author: Feng Shu 
Commit: Feng Shu 

reuse minibuffer's ivy prompt
---
 ivy-posframe.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 2bd30b4..f3c69ae 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -109,7 +109,9 @@ Using current frame's font if it it nil."
   (posframe-show
ivy-posframe-buffer
:font ivy-posframe-font
-   :string (concat ivy--prompt ivy-text str)
+   :string
+   (with-current-buffer (get-buffer-create " *Minibuf-1*")
+ (concat (buffer-string) "  " str))
:position (point)
:poshandler (cdr (assq ivy-posframe-style
   ivy-posframe-style-alist))



[elpa] externals/ivy-posframe fc0820a 009/195: Update

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit fc0820a544363cdf5b68666d951764bdf840838e
Author: Feng Shu 
Commit: Feng Shu 

Update
---
 README.md   |  35 +++
 snapshots/ivy-posframe1.gif | Bin 0 -> 313099 bytes
 snapshots/ivy-posframe2.gif | Bin 0 -> 180386 bytes
 3 files changed, 35 insertions(+)

diff --git a/README.md b/README.md
new file mode 100644
index 000..b2ec43e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,35 @@
+
+# 目录
+
+1.  [ivy-posframe README](#org62b81db)
+1.  [What is ivy-posframe](#org28920fa)
+2.  [How to use ivy-posframe](#orgf87cbce)
+
+
+
+
+# ivy-posframe README
+
+
+
+
+## What is ivy-posframe
+
+ivy-posframe is a ivy extension, which let ivy use posframe
+to show its candidate menu.
+
+![img](./snapshots/ivy-posframe1.gif)
+
+![img](./snapshots/ivy-posframe2.gif)
+
+
+
+
+## How to use ivy-posframe
+
+(require 'ivy-posframe)
+(ivy-posframe-mode 1)
+
+
+
+Converted from ivy-posframe.el by [el2org](https://github.com/tumashu/el2org) .
\ No newline at end of file
diff --git a/snapshots/ivy-posframe1.gif b/snapshots/ivy-posframe1.gif
new file mode 100644
index 000..d2203b9
Binary files /dev/null and b/snapshots/ivy-posframe1.gif differ
diff --git a/snapshots/ivy-posframe2.gif b/snapshots/ivy-posframe2.gif
new file mode 100644
index 000..1c421ed
Binary files /dev/null and b/snapshots/ivy-posframe2.gif differ



[elpa] externals/ivy-posframe c36250a 013/195: Update README

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit c36250a5a6d307fdc8f60505be09e23d0b9e1b5a
Author: Feng Shu 
Commit: Feng Shu 

Update README
---
 README.md   | 41 -
 ivy-posframe.el | 32 +---
 2 files changed, 29 insertions(+), 44 deletions(-)

diff --git a/README.md b/README.md
index 923fc91..6278036 100644
--- a/README.md
+++ b/README.md
@@ -1,20 +1,18 @@
 
 # 目录
 
-1.  [ivy-posframe README](#org0fcd3f6)
-1.  [What is ivy-posframe](#org5941743)
-2.  [How to use ivy-posframe](#orgb557f45)
-1.  [How to enable ivy-posframe](#org9056741)
-2.  [Window-buttom-left style](#org3ce6114)
-3.  [Window-center style](#orgadbea28)
+1.  [ivy-posframe README](#org56f4250)
+1.  [What is ivy-posframe](#orge48b949)
+2.  [How to enable ivy-posframe](#orgf9d7738)
+3.  [How to set the style of ivy-posframe](#org3923198)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -22,14 +20,9 @@ ivy-posframe is a ivy extension, which let ivy use posframe
 to show its candidate menu.
 
 
-
+
 
-## How to use ivy-posframe
-
-
-
-
-### How to enable ivy-posframe
+## How to enable ivy-posframe
 
 1.  Global mode
 
@@ -45,22 +38,20 @@ to show its candidate menu.
 (push '(t . ivy-posframe-display) ivy-display-functions-alist)
 
 
-
-
-### Window-buttom-left style
-
-(setq ivy-posframe-style 'window-buttom-left)
+
 
-![img](./snapshots/ivy-posframe1.gif)
+## How to set the style of ivy-posframe
 
+1.  window-buttom-left style
 
-
+(setq ivy-posframe-style 'window-buttom-left)
 
-### Window-center style
+![img](./snapshots/ivy-posframe1.gif)
+2.  Window-center style
 
-(setq ivy-posframe-style 'window-center)
+(setq ivy-posframe-style 'window-center)
 
-![img](./snapshots/ivy-posframe2.gif)
+![img](./snapshots/ivy-posframe2.gif)
 
 
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index f1ecc9b..dd1f09f 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -27,14 +27,12 @@
 
 ;;; Commentary:
 ;; * ivy-posframe README:README:
+
 ;; ** What is ivy-posframe
 ;; ivy-posframe is a ivy extension, which let ivy use posframe
 ;; to show its candidate menu.
 
-;; ** How to use ivy-posframe
-
-;; *** How to enable ivy-posframe
-
+;; ** How to enable ivy-posframe
 ;; 1. Global mode
 ;;#+BEGIN_EXAMPLE
 ;;(require 'ivy-posframe)
@@ -51,21 +49,17 @@
 ;;(push '(t . ivy-posframe-display) ivy-display-functions-alist)
 ;;#+END_EXAMPLE
 
-;; *** Window-buttom-left style
-;; #+BEGIN_EXAMPLE
-;; (setq ivy-posframe-style 'window-buttom-left)
-;; #+END_EXAMPLE
-
-;; [[./snapshots/ivy-posframe1.gif]]
-
-;; *** Window-center style
-;; #+BEGIN_EXAMPLE
-;; (setq ivy-posframe-style 'window-center)
-;; #+END_EXAMPLE
-
-;; [[./snapshots/ivy-posframe2.gif]]
-
-
+;; ** How to set the style of ivy-posframe
+;; 1. window-buttom-left style
+;;#+BEGIN_EXAMPLE
+;;(setq ivy-posframe-style 'window-buttom-left)
+;;#+END_EXAMPLE
+;;[[./snapshots/ivy-posframe1.gif]]
+;; 2. Window-center style
+;;#+BEGIN_EXAMPLE
+;;(setq ivy-posframe-style 'window-center)
+;;#+END_EXAMPLE
+;;[[./snapshots/ivy-posframe2.gif]]
 
 ;;; Code:
 ;; * ivy-posframe's code



[elpa] externals/ivy-posframe 823d3db 023/195: Update README

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 823d3dbf490e4f94b6680ae1b8610e476805e6a6
Author: Feng Shu 
Commit: Feng Shu 

Update README
---
 README.md | 30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/README.md b/README.md
index f82096e..6e34cf6 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,18 @@
 
 # 目录
 
-1.  [ivy-posframe README](#org7b266e1)
-1.  [What is ivy-posframe](#org1c5b744)
-2.  [Display functions](#org2ebfad6)
-3.  [How to enable ivy-posframe](#orgf7e39d4)
+1.  [ivy-posframe README](#orgb15c99c)
+1.  [What is ivy-posframe](#org921bc1e)
+2.  [Display functions](#org0339f42)
+3.  [How to enable ivy-posframe](#org8ca033e)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -22,19 +22,19 @@ to show its candidate menu.
 NOTE: ivy-posframe requires Emacs 26
 
 
-
+
 
 ## Display functions
 
 1.  ivy-posframe-display
 2.  ivy-posframe-display-at-frame-center
 3.  ivy-posframe-display-at-window-center
-4.  ivy-posframe-display-at-frame-buttom-left
-5.  ivy-posframe-display-at-window-buttom-left
+4.  ivy-posframe-display-at-frame-bottom-left
+5.  ivy-posframe-display-at-window-bottom-left
 6.  ivy-posframe-display-at-point
 
 
-
+
 
 ## How to enable ivy-posframe
 
@@ -44,14 +44,14 @@ NOTE: ivy-posframe requires Emacs 26
 (setq ivy-display-function #'ivy-posframe-display)
 ;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
 ;; (setq ivy-display-function #'ivy-posframe-display-at-window-center)
-;; (setq ivy-display-function 
#'ivy-posframe-display-at-frame-buttom-left)
-;; (setq ivy-display-function 
#'ivy-posframe-display-at-window-buttom-left)
+;; (setq ivy-display-function 
#'ivy-posframe-display-at-frame-bottom-left)
+;; (setq ivy-display-function 
#'ivy-posframe-display-at-window-bottom-left)
 ;; (setq ivy-display-function #'ivy-posframe-display-at-point)
 2.  Per-command mode.
 
 (require 'ivy-posframe)
 ;; Different command can use different display function.
-(push '(counsel-M-x . ivy-posframe-display-at-window-buttom-left) 
ivy-display-functions-alist)
+(push '(counsel-M-x . ivy-posframe-display-at-window-bottom-left) 
ivy-display-functions-alist)
 (push '(complete-symbol . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
 3.  Fallback mode
 
@@ -61,9 +61,9 @@ NOTE: ivy-posframe requires Emacs 26
 If you use \`ivy-posframe-display', you can use \`ivy-posframe-style'
 to set show style.
 
-1.  window-buttom-left style
+1.  window-bottom-left style
 
-(setq ivy-posframe-style 'window-buttom-left)
+(setq ivy-posframe-style 'window-bottom-left)
 
 ![img](./snapshots/ivy-posframe1.gif)
 2.  Window-center style



[elpa] externals/ivy-posframe 8a3ecb3 014/195: package-require ivy

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 8a3ecb3c01414aa574a61862bcb918816cfe46f9
Author: Feng Shu 
Commit: Feng Shu 

package-require ivy
---
 ivy-posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index dd1f09f..2db0f73 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -7,7 +7,7 @@
 ;; URL: https://github.com/tumashu/ivy-posframe
 ;; Version: 0.1.0
 ;; Keywords: abbrev, convenience, matching, ivy
-;; Package-Requires: ((emacs "26.0")(posframe "0.1.0"))
+;; Package-Requires: ((emacs "26.0")(posframe "0.1.0")(ivy "0.10.0"))
 
 ;; This file is part of GNU Emacs.
 



[elpa] externals/ivy-posframe 7544bb6 049/195: Implement ivy-posframe-avy

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 7544bb661bfb6543a0673973629fd917b49e5d74
Author: Fox Kiester 
Commit: Fox Kiester 

Implement ivy-posframe-avy

Fixes #6.
---
 ivy-posframe.el | 49 -
 1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index ce7c97f..816a497 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -287,10 +287,57 @@ selection, non-nil otherwise."
(setcar actions (1+ action-idx))
(ivy-set-action actions)))
 
+(defun ivy-posframe--avy-action (pt)
+  "Finish ivy session with the candidate at PT."
+  (with-current-buffer ivy-posframe-buffer
+(ivy--done
+ (substring-no-properties
+  (nth (- (line-number-at-pos pt) 2) ivy--old-cands)
+
+(defvar avy-all-windows)
+(defvar avy-keys)
+(defvar avy-keys-alist)
+(defvar avy-style)
+(defvar avy-styles-alist)
+(defvar avy-action)
+(declare-function avy--process "avy")
+(declare-function avy--style-fn "avy")
 (defun ivy-posframe-avy ()
   "Jump to one of the current ivy candidates."
   (interactive)
-  (message "ivy-posframe: ivy-avy is not supported at the moment."))
+  (unless (require 'avy nil 'noerror)
+(error "Package avy isn't installed"))
+  (unless (boundp 'avy-pre-action)
+(error "A newer version of avy is required for this command"))
+  (let* ((avy-all-windows nil)
+ (avy-keys (or (cdr (assq 'ivy-avy avy-keys-alist))
+   avy-keys))
+ (avy-style (or (cdr (assq 'ivy-avy
+   avy-styles-alist))
+avy-style))
+ (window (frame-selected-window
+  (buffer-local-value 'posframe--frame
+  (get-buffer ivy-posframe-buffer
+ ;; prevent default pre action, which calls
+ ;; `select-frame-set-input-focus', deselecting the minibuffer and
+ ;; causing `ivy-posframe-cleanup' to run prematurely
+ (avy-pre-action #'ignore)
+ candidates)
+(with-current-buffer ivy-posframe-buffer
+  (save-excursion
+(save-restriction
+  (narrow-to-region
+   (window-start window)
+   (window-end window))
+  (goto-char (point-min))
+  (forward-line)
+  (while (< (point) (point-max))
+(push (cons (point) window) candidates)
+(forward-line)
+(setq avy-action #'ivy-posframe--avy-action)
+(avy--process
+ (nreverse candidates)
+ (avy--style-fn avy-style
 
 (defun ivy-posframe--minibuffer-setup (orig-func)
   "Advice function of `ivy--minibuffer-setup'."



[elpa] externals/ivy-posframe 0989e42 039/195: Show cursor's position, fix #9

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 0989e424a2d271fba030eb22f8787dd7adb9dcb1
Author: Feng Shu 
Commit: Feng Shu 

Show cursor's position, fix #9
---
 ivy-posframe.el | 16 
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 1067384..d7b30d0 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -127,6 +127,11 @@ When nil, Using current frame's font as fallback."
   "Face used by the ivy-posframe."
   :group 'ivy-posframe)
 
+(defface ivy-posframe-cursor
+  '((t (:inherit default :background "#00")))
+  "Face used by the ivy-posframe's fake cursor."
+  :group 'ivy-posframe)
+
 (defvar ivy-posframe-buffer " *ivy-posframe-buffer*"
   "The posframe-buffer used by ivy-posframe.")
 
@@ -146,10 +151,13 @@ This variable is useful for `ivy-posframe-read-action' .")
ivy-posframe-buffer
:font ivy-posframe-font
:string
-   (if ivy-posframe--ignore-prompt
-   str
- (with-current-buffer (get-buffer-create " *Minibuf-1*")
-   (concat (buffer-string) "  " str)))
+   (with-current-buffer (get-buffer-create " *Minibuf-1*")
+ (let ((point (point))
+   (string (if ivy-posframe--ignore-prompt
+   str
+ (concat (buffer-string) "  " str
+   (add-text-properties (- point 1) point '(face ivy-posframe-cursor) 
string)
+   string))
:position (point)
:poshandler poshandler
:background-color (face-attribute 'ivy-posframe :background)



[elpa] externals/ivy-posframe 0136107 015/195: Remove ivy-posframe-mode

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 01361072288be54a3de1d0e02ded7e54798cd3ad
Author: Feng Shu 
Commit: Feng Shu 

Remove ivy-posframe-mode
---
 ivy-posframe.el | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 2db0f73..2bd30b4 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -131,17 +131,6 @@ Using current frame's font if it it nil."
 emacs-basic-display
 (not (display-graphic-p))
 
-;;;###autoload
-(define-minor-mode ivy-posframe-mode
-  "ivy-posframe minor mode."
-  :global t
-  :require 'ivy-posframe
-  :group 'ivy-posframe
-  :lighter " ivy-posframe"
-  (if ivy-posframe-mode
-  (setq ivy-display-function #'ivy-posframe-display)
-(setq ivy-display-function nil)))
-
 (provide 'ivy-posframe)
 
 ;; Local Variables:



[elpa] externals/ivy-posframe 990b9b4 007/195: Update

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 990b9b490236f83ef9bbb5019340c69f3d8db46f
Author: Feng Shu 
Commit: Feng Shu 

Update
---
 ivy-posframe.el | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index f69d1ce..d0c2f69 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -46,10 +46,18 @@
   :prefix "ivy-posframe")
 
 (defcustom ivy-posframe-font nil
-  "The font used by ivy-posframe's frame.
+  "The font used by ivy-posframe.
 Using current frame's font if it it nil."
   :group 'ivy-posframe)
 
+(defcustom ivy-posframe-poshandler nil
+  "The posframe poshandler used by ivy-posframe.
+When nil, use `posframe-poshandler-window-bottom-left-corner'
+as fallback.
+
+More details can be found in docstring of `posframe-show'."
+  :group 'ivy-posframe)
+
 (defface ivy-posframe
   '((t (:inherit default :background "#33" :foreground "#dcdccc")))
   "Face used for the ivy-posframe."
@@ -63,8 +71,10 @@ Using current frame's font if it it nil."
   (with-selected-window (ivy--get-window ivy-last)
 (posframe-show
  ivy-posframe-buffer
+ :font ivy-posframe-font
  :string (concat ivy--prompt ivy-text str)
- :poshandler #'posframe-poshandler-window-bottom-left-corner
+ :poshandler (or ivy-posframe-poshandler
+ #'posframe-poshandler-window-bottom-left-corner)
  :background-color (face-attribute 'ivy-posframe :background)
  :foreground-color (face-attribute 'ivy-posframe :foreground)
  :height ivy-height



[elpa] externals/ivy-posframe 8a54dbb 011/195: Use ivy-display-function-fallback

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 8a54dbba1a088f098eadc9c0007e54869f849c30
Author: Feng Shu 
Commit: Feng Shu 

Use ivy-display-function-fallback
---
 ivy-posframe.el | 32 +---
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index c1bea4c..19fbba3 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -49,7 +49,6 @@
 (require 'ivy)
 
 (push '(ivy-posframe-display
-:check ivy-posframe-workable-p
 :cleanup ivy-posframe-cleanup)
   ivy-display-functions-props)
 
@@ -81,23 +80,26 @@ More details can be found in docstring of `posframe-show'."
 
 (defun ivy-posframe-display (str)
   "Show ivy's posframe."
-  (with-selected-window (ivy--get-window ivy-last)
-(posframe-show
- ivy-posframe-buffer
- :font ivy-posframe-font
- :string (concat ivy--prompt ivy-text str)
- :position (point)
- :poshandler (or ivy-posframe-poshandler
- #'posframe-poshandler-window-bottom-left-corner)
- :background-color (face-attribute 'ivy-posframe :background)
- :foreground-color (face-attribute 'ivy-posframe :foreground)
- :height ivy-height
- :min-height 10
- :min-width 50)))
+  (if (not (ivy-posframe-workable-p))
+  (ivy-display-function-fallback str)
+(with-selected-window (ivy--get-window ivy-last)
+  (posframe-show
+   ivy-posframe-buffer
+   :font ivy-posframe-font
+   :string (concat ivy--prompt ivy-text str)
+   :position (point)
+   :poshandler (or ivy-posframe-poshandler
+   #'posframe-poshandler-window-bottom-left-corner)
+   :background-color (face-attribute 'ivy-posframe :background)
+   :foreground-color (face-attribute 'ivy-posframe :foreground)
+   :height ivy-height
+   :min-height 10
+   :min-width 50
 
 (defun ivy-posframe-cleanup ()
   "Clean ivy's posframe."
-  (posframe-hide ivy-posframe-buffer))
+  (when (ivy-posframe-workable-p)
+(posframe-hide ivy-posframe-buffer)))
 
 (defun ivy-posframe-workable-p ()
   "Test ivy-posframe workable or not."



[elpa] externals/ivy-posframe 1651770 012/195: Update

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 1651770787cbf238531e4735ea59e98c289fc5db
Author: Feng Shu 
Commit: Feng Shu 

Update
---
 README.md   | 52 ++--
 ivy-posframe.el | 55 ++-
 2 files changed, 84 insertions(+), 23 deletions(-)

diff --git a/README.md b/README.md
index b2ec43e..923fc91 100644
--- a/README.md
+++ b/README.md
@@ -1,34 +1,66 @@
 
 # 目录
 
-1.  [ivy-posframe README](#org62b81db)
-1.  [What is ivy-posframe](#org28920fa)
-2.  [How to use ivy-posframe](#orgf87cbce)
+1.  [ivy-posframe README](#org0fcd3f6)
+1.  [What is ivy-posframe](#org5941743)
+2.  [How to use ivy-posframe](#orgb557f45)
+1.  [How to enable ivy-posframe](#org9056741)
+2.  [Window-buttom-left style](#org3ce6114)
+3.  [Window-center style](#orgadbea28)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
 ivy-posframe is a ivy extension, which let ivy use posframe
 to show its candidate menu.
 
+
+
+
+## How to use ivy-posframe
+
+
+
+
+### How to enable ivy-posframe
+
+1.  Global mode
+
+(require 'ivy-posframe)
+(setq ivy-display-function #'ivy-posframe-display)
+2.  Per-command mode.
+
+(require 'ivy-posframe)
+(push '(counsel-M-x . ivy-posframe-display) 
ivy-display-functions-alist)
+3.  Fallback mode
+
+(require 'ivy-posframe)
+(push '(t . ivy-posframe-display) ivy-display-functions-alist)
+
+
+
+
+### Window-buttom-left style
+
+(setq ivy-posframe-style 'window-buttom-left)
+
 ![img](./snapshots/ivy-posframe1.gif)
 
-![img](./snapshots/ivy-posframe2.gif)
 
+
 
-
+### Window-center style
 
-## How to use ivy-posframe
+(setq ivy-posframe-style 'window-center)
 
-(require 'ivy-posframe)
-(ivy-posframe-mode 1)
+![img](./snapshots/ivy-posframe2.gif)
 
 
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 19fbba3..f1ecc9b 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -31,17 +31,42 @@
 ;; ivy-posframe is a ivy extension, which let ivy use posframe
 ;; to show its candidate menu.
 
-;; [[./snapshots/ivy-posframe1.gif]]
+;; ** How to use ivy-posframe
 
-;; [[./snapshots/ivy-posframe2.gif]]
+;; *** How to enable ivy-posframe
+
+;; 1. Global mode
+;;#+BEGIN_EXAMPLE
+;;(require 'ivy-posframe)
+;;(setq ivy-display-function #'ivy-posframe-display)
+;;#+END_EXAMPLE
+;; 2. Per-command mode.
+;;#+BEGIN_EXAMPLE
+;;(require 'ivy-posframe)
+;;(push '(counsel-M-x . ivy-posframe-display) ivy-display-functions-alist)
+;;#+END_EXAMPLE
+;; 3. Fallback mode
+;;#+BEGIN_EXAMPLE
+;;(require 'ivy-posframe)
+;;(push '(t . ivy-posframe-display) ivy-display-functions-alist)
+;;#+END_EXAMPLE
+
+;; *** Window-buttom-left style
+;; #+BEGIN_EXAMPLE
+;; (setq ivy-posframe-style 'window-buttom-left)
+;; #+END_EXAMPLE
 
-;; ** How to use ivy-posframe
+;; [[./snapshots/ivy-posframe1.gif]]
 
+;; *** Window-center style
 ;; #+BEGIN_EXAMPLE
-;; (require 'ivy-posframe)
-;; (ivy-posframe-mode 1)
+;; (setq ivy-posframe-style 'window-center)
 ;; #+END_EXAMPLE
 
+;; [[./snapshots/ivy-posframe2.gif]]
+
+
+
 ;;; Code:
 ;; * ivy-posframe's code
 (require 'cl-lib)
@@ -62,12 +87,8 @@
 Using current frame's font if it it nil."
   :group 'ivy-posframe)
 
-(defcustom ivy-posframe-poshandler nil
-  "The posframe poshandler used by ivy-posframe.
-When nil, use `posframe-poshandler-window-bottom-left-corner'
-as fallback.
-
-More details can be found in docstring of `posframe-show'."
+(defcustom ivy-posframe-style 'window-buttom-left
+  "The style of ivy-posframe."
   :group 'ivy-posframe)
 
 (defface ivy-posframe
@@ -78,6 +99,14 @@ More details can be found in docstring of `posframe-show'."
 (defvar ivy-posframe-buffer " *ivy-posframe-buffer*"
   "The buffer which used by ivy-posframe.")
 
+(defvar ivy-posframe-style-alist
+  '((window-center . posframe-poshandler-window-center)
+(frame-center  . posframe-poshandler-frame-center)
+(window-buttom-left . posframe-poshandler-window-bottom-left-corner)
+(frame-buttom-left . posframe-poshandler-frame-bottom-left-corner)
+(point . posframe-poshandler-point-bottom-left-corner))
+  "Alist of ivy posframe styles.")
+
 (defun ivy-posframe-display (str)
   "Show ivy's posframe."
   (if (not (ivy-posframe-workable-p))
@@ -88,8 +117,8 @@ More details can be found in docstring of `posframe-show'."
:font ivy-posframe-font
:string (concat ivy--prompt ivy-text str)
:position (point)
-   :poshandler (or ivy-posframe-poshandler
-   #'posframe-poshandler-window-bottom-left-corner)
+   :poshandler (cdr (assq ivy-posframe-style
+  ivy-posframe-style-alist))
:background-color (face-attribute 'ivy-posframe :background)
:foreground-color (face-attribute 'ivy-posframe :foreground)
:height ivy-height



[elpa] externals/ivy-posframe 5482c07 024/195: Update README

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 5482c07017e18cfca02e4a39e5f6aec80342ab21
Author: Feng Shu 
Commit: Feng Shu 

Update README
---
 README.md  |  25 +
 ivy-posframe.el|   6 ++---
 ...rame3.gif => ivy-posframe-display-at-point.gif} | Bin
 ...ivy-posframe-display-at-window-bottom-left.gif} | Bin
 ...f => ivy-posframe-display-at-window-center.gif} | Bin
 5 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/README.md b/README.md
index 6e34cf6..f5e5c1b 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,18 @@
 
 # 目录
 
-1.  [ivy-posframe README](#orgb15c99c)
-1.  [What is ivy-posframe](#org921bc1e)
-2.  [Display functions](#org0339f42)
-3.  [How to enable ivy-posframe](#org8ca033e)
+1.  [ivy-posframe README](#org31b7799)
+1.  [What is ivy-posframe](#orge59727b)
+2.  [Display functions](#orgf8e0e78)
+3.  [How to enable ivy-posframe](#orgd1a99ab)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -22,19 +22,22 @@ to show its candidate menu.
 NOTE: ivy-posframe requires Emacs 26
 
 
-
+
 
 ## Display functions
 
 1.  ivy-posframe-display
 2.  ivy-posframe-display-at-frame-center
 3.  ivy-posframe-display-at-window-center
+![img](./snapshots/ivy-posframe-display-at-window-center.gif)
 4.  ivy-posframe-display-at-frame-bottom-left
 5.  ivy-posframe-display-at-window-bottom-left
+![img](./snapshots/ivy-posframe-display-at-window-bottom-left.gif)
 6.  ivy-posframe-display-at-point
+![img](./snapshots/ivy-posframe-display-at-point.gif)
 
 
-
+
 
 ## How to enable ivy-posframe
 
@@ -64,19 +67,13 @@ to set show style.
 1.  window-bottom-left style
 
 (setq ivy-posframe-style 'window-bottom-left)
-
-![img](./snapshots/ivy-posframe1.gif)
 2.  Window-center style
 
 (setq ivy-posframe-style 'window-center)
-
-![img](./snapshots/ivy-posframe2.gif)
 3.  Point style
 
 (setq ivy-posframe-style 'point)
 
-![img](./snapshots/ivy-posframe3.gif)
-
 
 
 Converted from ivy-posframe.el by [el2org](https://github.com/tumashu/el2org) .
\ No newline at end of file
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 1f1f4f8..74b2c17 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -39,9 +39,12 @@
 ;; 1. ivy-posframe-display
 ;; 2. ivy-posframe-display-at-frame-center
 ;; 3. ivy-posframe-display-at-window-center
+;;[[./snapshots/ivy-posframe-display-at-window-center.gif]]
 ;; 4. ivy-posframe-display-at-frame-bottom-left
 ;; 5. ivy-posframe-display-at-window-bottom-left
+;;[[./snapshots/ivy-posframe-display-at-window-bottom-left.gif]]
 ;; 6. ivy-posframe-display-at-point
+;;[[./snapshots/ivy-posframe-display-at-point.gif]]
 
 ;; ** How to enable ivy-posframe
 ;; 1. Global mode
@@ -74,17 +77,14 @@
 ;;#+BEGIN_EXAMPLE
 ;;(setq ivy-posframe-style 'window-bottom-left)
 ;;#+END_EXAMPLE
-;;[[./snapshots/ivy-posframe1.gif]]
 ;; 2. Window-center style
 ;;#+BEGIN_EXAMPLE
 ;;(setq ivy-posframe-style 'window-center)
 ;;#+END_EXAMPLE
-;;[[./snapshots/ivy-posframe2.gif]]
 ;; 3. Point style
 ;;#+BEGIN_EXAMPLE
 ;;(setq ivy-posframe-style 'point)
 ;;#+END_EXAMPLE
-;;[[./snapshots/ivy-posframe3.gif]]
 
 
 ;;; Code:
diff --git a/snapshots/ivy-posframe3.gif 
b/snapshots/ivy-posframe-display-at-point.gif
similarity index 100%
rename from snapshots/ivy-posframe3.gif
rename to snapshots/ivy-posframe-display-at-point.gif
diff --git a/snapshots/ivy-posframe1.gif 
b/snapshots/ivy-posframe-display-at-window-bottom-left.gif
similarity index 100%
rename from snapshots/ivy-posframe1.gif
rename to snapshots/ivy-posframe-display-at-window-bottom-left.gif
diff --git a/snapshots/ivy-posframe2.gif 
b/snapshots/ivy-posframe-display-at-window-center.gif
similarity index 100%
rename from snapshots/ivy-posframe2.gif
rename to snapshots/ivy-posframe-display-at-window-center.gif



[elpa] branch externals/ivy-posframe created (now d539ac2)

2020-10-03 Thread Feng Shu
tumashu pushed a change to branch externals/ivy-posframe.

at  d539ac2   version 0.2.0

This branch includes the following new commits:

   new  d6fc7c6   Init commit
   new  8861e54   Use ivy-display-functions-props
   new  229caae   update
   new  3bc6301   Add ivy-posframe-workable-p
   new  6494b38   Add ivy-posframe-mode
   new  f287da7   Add ivy-posframe-mode
   new  990b9b4   Update
   new  8d0b0ae   Update
   new  fc0820a   Update
   new  2733fe1   Set :position to (point).
   new  8a54dbb   Use ivy-display-function-fallback
   new  1651770   Update
   new  c36250a   Update README
   new  8a3ecb3   package-require ivy
   new  0136107   Remove ivy-posframe-mode
   new  2546238   reuse minibuffer's ivy prompt
   new  9db2b75   Update README
   new  550c322   Fix warn
   new  ba42fec   Fix warn
   new  ddaf875   Add Emacs version requirement to README
   new  cef74e6   Different command can set different ivy-posframe display 
function
   new  7e871bd   Fix type: buttom -> bottom
   new  823d3db   Update README
   new  5482c07   Update README
   new  0f159d5   Add frame-bottom-window-center style
   new  1f3dbf4   Add ivy-posframe-setup and use it.
   new  e1624e7   ivy-posframe-display:  style -> style-or-poshandler
   new  d3a82a9   Update README
   new  0be1372   Remove ivy-posframe-style variable
   new  061a125   Re-add ivy-posframe-style for compatible
   new  5312e07   Add ivy-posframe-parameters
   new  387045c   Fix README
   new  8f62984   Add ivy-posframe-read-action and 
ivy-posframe-dispatching-done
   new  26e3a64   ivy-posframe: add ivy-posframe-avy
   new  e0247bf   split ivy-posframe-setup to ivy-posframe-init and 
ivy-posframe-setup
   new  26a7ba7   Add ivy-posframe-enable and use it
   new  04d3719   Update README
   new  b9b9a45   Update
   new  0989e42   Show cursor's position, fix #9
   new  9f6b58d   Cursor face inherits from regular cursor face
   new  b37e713   Merge pull request #10 from drrlvn/patch-1
   new  266d622   Set ivy-posframe-cursor as mulitcursor
   new  15d9a9e   Revert "Set ivy-posframe-cursor as mulitcursor"
   new  ff2578a   Add ivy-posframe-border-width
   new  60e1f99   add variable to customize ivy-posframe style
   new  b92aaa1   Merge pull request #13 from 
samrayleung/feature-add-variable
   new  8be3311   ivy-posframe do not support mouse click
   new  3d98dbd   Add ivy-posframe-hide-minibuffer feature, fix #12
   new  7544bb6   Implement ivy-posframe-avy
   new  3c00455   Add ivy-posframe-swiper-avy
   new  b217e00   Use remaps for all keybindings
   new  9982c6d   Merge pull request #17 from noctuid/ivy-avy
   new  187d14b   ivy-posframe.el (ivy-posframe--display): Simplify
   new  3784f59   ivy-posframe.el (ivy-posframe-avy): Simplify
   new  7ea96ce   Merge pull request #19 from abo-abo/master
   new  f6f07cf   Revert "Simplify ivy-postframe-avy"
   new  52c8209   Merge pull request #20 from tumashu/revert-19-master
   new  aec9d8a   Update ivy-posframe README
   new  19f1382   update README
   new  9e5c4a9   Fix: Should the default width be the frame instead of the 
window? #22
   new  f341bae   Add blank line
   new  704feb2   Let ivy-posframe only inhert default
   new  05432ef   fallback width = frame-width * 0.618
   new  7787514   ivy-posframe-hide-minibuffer default is t
   new  0254f6e   Add document about border
   new  0fdb1b6   Update snapshots
   new  96c2e83   Update README
   new  7bfd14f   Add ivy-posframe-border face and use it
   new  8799af1   Revert "Add ivy-posframe-border face and use it"
   new  233a3ec   Fix Strange behaviour #25
   new  26612b2   Add ivy-posframe-border face and use it
   new  8d18644   Revert "Revert "Simplify ivy-postframe-avy""
   new  23c1619   Update README
   new  78ec80f   ivy-posframe-workable-p -> posframe-workable-p
   new  d5dd254   Update README
   new  31363f3   Get correct prompt for recursive minibuffers
   new  3433b00   Merge pull request #29 from CeleritasCelery/recursive-fix
   new  1297ebc   Fix focus can go out of frame with multi line collections 
#31
   new  4242977   Remove #' (function quote) of `lambda`
   new  0a870c1   Remove top-level ivy-posframe setup function executing
   new  46b4089   Merge pull request #33 from 
conao3/issue/remove-top-level-setup-executing
   new  d70aa81   Merge pull request #32 from conao3/refactoring/lambda
   new  9e01129   Remove ivy-posframe-setup
   new  38aff80   Add ivy-posframe-demo
   new  3aabf14   ivy-posframe-demo: let it toggle
   new  c24f548   fix #34. call ivy--minibuffer-setup in env 
ivy-fixed-height-minibuffer is nil
   new  13180ce   Merge pull request #35 from conao3/fix-minibuffer-iss

[elpa] externals/ivy-posframe 229caae 003/195: update

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 229caaee32d05b04f44dba498a3e973e82dc5dc7
Author: Feng Shu 
Commit: Feng Shu 

update
---
 ivy-posframe.el | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index ef253ba..ac28f8c 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -34,6 +34,10 @@
 (require 'cl-lib)
 (require 'posframe)
 
+(push '(ivy-posframe-display
+:cleanup ivy-posframe-cleanup)
+  ivy-display-function-props)
+
 (defgroup ivy-posframe nil
   "Using posframe to show ivy"
   :group 'ivy
@@ -72,17 +76,9 @@ Using current frame's font if it it nil."
 ;;;###autoload
 (defun ivy-posframe-enable ()
   (interactive)
-  (require 'ivy)
   (setq ivy-display-function #'ivy-posframe-display)
-  (push '(t . ivy-posframe-display)
-ivy-display-functions-alist)
-  (push '(ivy-posframe-display
-  :cleanup ivy-posframe-cleanup)
-ivy-display-function-props)
   (message "Ivy-posframe is enabled, disable it need restart emacs."))
 
-
-
 (provide 'ivy-posframe)
 
 ;; Local Variables:



[elpa] externals/ivy-posframe 3bc6301 004/195: Add ivy-posframe-workable-p

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 3bc6301f9161eb563b098b4cbf0813a1ba4f4b55
Author: Feng Shu 
Commit: Feng Shu 

Add ivy-posframe-workable-p
---
 ivy-posframe.el | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index ac28f8c..b041f34 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -33,10 +33,12 @@
 ;; * ivy-posframe's code
 (require 'cl-lib)
 (require 'posframe)
+(require 'ivy)
 
 (push '(ivy-posframe-display
+:when ivy-posframe-workable-p
 :cleanup ivy-posframe-cleanup)
-  ivy-display-function-props)
+  ivy-display-functions-props)
 
 (defgroup ivy-posframe nil
   "Using posframe to show ivy"
@@ -73,6 +75,13 @@ Using current frame's font if it it nil."
   "Clean ivy's posframe."
   (posframe-hide ivy-posframe-buffer))
 
+(defun ivy-posframe-workable-p ()
+  "Test ivy-posframe workable or not."
+  (and (>= emacs-major-version 26)
+   (not (or noninteractive
+emacs-basic-display
+(not (display-graphic-p))
+
 ;;;###autoload
 (defun ivy-posframe-enable ()
   (interactive)



[elpa] externals/ivy-posframe e0247bf 035/195: split ivy-posframe-setup to ivy-posframe-init and ivy-posframe-setup

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit e0247bf4e54c3e066b50f5661b57890061c9b4ee
Author: Feng Shu 
Commit: Feng Shu 

split ivy-posframe-setup to ivy-posframe-init and ivy-posframe-setup
---
 ivy-posframe.el | 39 ++-
 1 file changed, 22 insertions(+), 17 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 701d86b..33b791b 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -199,23 +199,6 @@ This variable is useful for `ivy-posframe-read-action' .")
 emacs-basic-display
 (not (display-graphic-p))
 
-(defun ivy-posframe-setup ()
-  "Setup ivy-posframe."
-  (interactive)
-  ;; Regedit all display functions of ivy-posframe
-  ;; to `ivy-display-functions-props'.
-  (mapatoms
-   #'(lambda (func)
-   (when (and (functionp func)
-  (string-match-p "^ivy-posframe-display" (symbol-name func))
-  (not (assq func ivy-display-functions-props)))
- (push `(,func :cleanup ivy-posframe-cleanup)
-   ivy-display-functions-props
-  ;; Re-configure ivy keymap.
-  (define-key ivy-minibuffer-map (kbd "C-M-a") 'ivy-posframe-read-action)
-  (define-key ivy-minibuffer-map (kbd "M-o") 'ivy-posframe-dispatching-done)
-  (define-key ivy-minibuffer-map (kbd "C-'") 'ivy-posframe-avy))
-
 (defun ivy-posframe-dispatching-done ()
   "Select one of the available actions and call `ivy-done'."
   (interactive)
@@ -267,6 +250,28 @@ selection, non-nil otherwise."
   (interactive)
   (message "ivy-posframe: ivy-avy is not supported at the moment."))
 
+;;;###autoload
+(defun ivy-posframe-setup ()
+  "Setup ivy-posframe."
+  (interactive)
+  (require 'ivy)
+  (ivy-posframe-init)
+  (define-key ivy-minibuffer-map (kbd "C-M-a") 'ivy-posframe-read-action)
+  (define-key ivy-minibuffer-map (kbd "M-o") 'ivy-posframe-dispatching-done)
+  (define-key ivy-minibuffer-map (kbd "C-'") 'ivy-posframe-avy))
+
+(defun ivy-posframe-init ()
+  "Add all display functions of ivy-posframe to
+`ivy-display-functions-props'."
+  (mapatoms
+   #'(lambda (func)
+   (when (and (functionp func)
+  (string-match-p "^ivy-posframe-display" (symbol-name func))
+  (not (assq func ivy-display-functions-props)))
+ (push `(,func :cleanup ivy-posframe-cleanup)
+   ivy-display-functions-props)
+
+(ivy-posframe-init)
 
 (provide 'ivy-posframe)
 



[elpa] externals/ivy-posframe d6fc7c6 001/195: Init commit

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit d6fc7c6184a943ec40cdf64138d1f25aeb3152fe
Author: Feng Shu 
Commit: Feng Shu 

Init commit
---
 ivy-posframe.el | 92 +
 1 file changed, 92 insertions(+)

diff --git a/ivy-posframe.el b/ivy-posframe.el
new file mode 100644
index 000..e7fcf2a
--- /dev/null
+++ b/ivy-posframe.el
@@ -0,0 +1,92 @@
+;;; ivy-posframe.el --- Using posframe to show Ivy  -*- lexical-binding: t -*-
+
+;; Copyright (C) 2017-2018 Free Software Foundation, Inc.
+
+;; Author: Feng Shu
+;; Maintainer: Feng Shu 
+;; URL: https://github.com/tumashu/ivy-posframe
+;; Version: 0.1.0
+;; Keywords: abbrev, convenience, matching, ivy
+;; Package-Requires: ((emacs "26.0")(posframe "0.1.0"))
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see .
+
+
+;;; Commentary:
+
+;; * ivy-posframe README:README:
+
+;;; Code:
+;; * ivy-posframe's code
+(require 'cl-lib)
+(require 'posframe)
+
+(defgroup ivy-posframe nil
+  "Using posframe to show ivy"
+  :group 'ivy
+  :prefix "ivy-posframe")
+
+(defcustom ivy-posframe-font nil
+  "The font used by ivy-posframe's frame.
+Using current frame's font if it it nil."
+  :group 'ivy-posframe)
+
+(defface ivy-posframe
+  '((t (:inherit default :background "#33" :foreground "#dcdccc")))
+  "Face used for the ivy-posframe."
+  :group 'ivy-posframe)
+
+(defvar ivy-posframe-buffer " *ivy-posframe-buffer*"
+  "The buffer which used by ivy-posframe.")
+
+(defun ivy-posframe-display (str)
+  "Show ivy's posframe."
+  (with-selected-window (ivy--get-window ivy-last)
+(posframe-show
+ ivy-posframe-buffer
+ :string (concat ivy--prompt ivy-text str)
+ :poshandler #'posframe-poshandler-window-bottom-left-corner
+ :background-color (face-attribute 'ivy-posframe :background)
+ :foreground-color (face-attribute 'ivy-posframe :foreground)
+ :height ivy-height
+ :min-height 10
+ :min-width 50)))
+
+(defun ivy-posframe-cleanup ()
+  "Clean ivy's posframe."
+  (posframe-hide ivy-posframe-buffer))
+
+;;;###autoload
+(defun ivy-posframe-enable ()
+  (interactive)
+  (require 'ivy)
+  (setq ivy-display-function #'ivy-posframe-display)
+  (push '(t . ivy-posframe-display)
+ivy-display-functions-alist)
+  (push '(ivy-posframe
+  :display ivy-posframe-display
+  :cleanup ivy-posframe-cleanup)
+ivy-display-schemes)
+  (message "Ivy-posframe is enabled, disable it need restart emacs."))
+
+
+(provide 'ivy-posframe)
+
+;; Local Variables:
+;; coding: utf-8-unix
+;; End:
+
+;;; ivy-posframe.el ends here



[elpa] externals/ivy-posframe ddaf875 020/195: Add Emacs version requirement to README

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit ddaf875d5f5a8629ba49731c199e0ca57effd3d8
Author: Feng Shu 
Commit: Feng Shu 

Add Emacs version requirement to README
---
 README.md   | 18 ++
 ivy-posframe.el |  2 ++
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index 2f72949..96fe711 100644
--- a/README.md
+++ b/README.md
@@ -1,26 +1,28 @@
 
 # 目录
 
-1.  [ivy-posframe README](#orgeae4edc)
-1.  [What is ivy-posframe](#org16b85a0)
-2.  [How to enable ivy-posframe](#org6f59c0a)
-3.  [How to set the style of ivy-posframe](#orge1fc1e0)
+1.  [ivy-posframe README](#org517c951)
+1.  [What is ivy-posframe](#org153958a)
+2.  [How to enable ivy-posframe](#orgfb35379)
+3.  [How to set the style of ivy-posframe](#orgdd1e7a6)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
 ivy-posframe is a ivy extension, which let ivy use posframe
 to show its candidate menu.
 
+NOTE: ivy-posframe requires Emacs 26
 
-
+
+
 
 ## How to enable ivy-posframe
 
@@ -38,7 +40,7 @@ to show its candidate menu.
 (push '(t . ivy-posframe-display) ivy-display-functions-alist)
 
 
-
+
 
 ## How to set the style of ivy-posframe
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 64de112..0724122 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -32,6 +32,8 @@
 ;; ivy-posframe is a ivy extension, which let ivy use posframe
 ;; to show its candidate menu.
 
+;; NOTE: ivy-posframe requires Emacs 26
+
 ;; ** How to enable ivy-posframe
 ;; 1. Global mode
 ;;#+BEGIN_EXAMPLE



[elpa] externals/ivy-posframe 6494b38 005/195: Add ivy-posframe-mode

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 6494b3880bf243a465b4ca26e973f2c5a8578efd
Author: Feng Shu 
Commit: Feng Shu 

Add ivy-posframe-mode
---
 ivy-posframe.el | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index b041f34..9fcd864 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -83,10 +83,15 @@ Using current frame's font if it it nil."
 (not (display-graphic-p))
 
 ;;;###autoload
-(defun ivy-posframe-enable ()
-  (interactive)
-  (setq ivy-display-function #'ivy-posframe-display)
-  (message "Ivy-posframe is enabled, disable it need restart emacs."))
+(define-minor-mode ivy-posframe-mode
+  "ivy-posframe minor mode."
+  :global t
+  :require 'ivy-posframe
+  :group 'ivy-posframe
+  :lighter " ivy-posframe"
+  (if ivy-posframe-mode
+  (setq ivy-display-function #'ivy-posframe-display)
+(setq ivy-display-function nil)))
 
 (provide 'ivy-posframe)
 



[elpa] externals/ivy-posframe f287da7 006/195: Add ivy-posframe-mode

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit f287da7f8944e7c9488a4df436af3c27c33418b0
Author: Feng Shu 
Commit: Feng Shu 

Add ivy-posframe-mode
---
 ivy-posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 9fcd864..f69d1ce 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -36,7 +36,7 @@
 (require 'ivy)
 
 (push '(ivy-posframe-display
-:when ivy-posframe-workable-p
+:check ivy-posframe-workable-p
 :cleanup ivy-posframe-cleanup)
   ivy-display-functions-props)
 



[elpa] externals/ivy-posframe 0be1372 029/195: Remove ivy-posframe-style variable

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 0be1372430b0551effc5b86f52dabcc2de4c595c
Author: Feng Shu 
Commit: Feng Shu 

Remove ivy-posframe-style variable

This feature seem to useless, for user can
set different ivy-posframe display function in ivy-display-function
---
 README.md   | 33 ++--
 ivy-posframe.el | 58 ++---
 2 files changed, 24 insertions(+), 67 deletions(-)

diff --git a/README.md b/README.md
index 55bef0d..ba5e89c 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,19 @@
 
 # 目录
 
-1.  [ivy-posframe README](#org39783d3)
-1.  [What is ivy-posframe](#orgd46557b)
-2.  [Display functions](#orge009677)
-3.  [How to enable ivy-posframe](#org5a3f479)
-4.  [How to custom your ivy-posframe style](#org333b256)
+1.  [ivy-posframe README](#orgad72029)
+1.  [What is ivy-posframe](#orgf3fce48)
+2.  [Display functions](#org1420034)
+3.  [How to enable ivy-posframe](#orgcd8666c)
+4.  [How to custom your ivy-posframe style](#org7c1f241)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -23,7 +23,7 @@ to show its candidate menu.
 NOTE: ivy-posframe requires Emacs 26
 
 
-
+
 
 ## Display functions
 
@@ -39,7 +39,7 @@ NOTE: ivy-posframe requires Emacs 26
 ![img](./snapshots/ivy-posframe-display-at-point.gif)
 
 
-
+
 
 ## How to enable ivy-posframe
 
@@ -63,21 +63,8 @@ NOTE: ivy-posframe requires Emacs 26
 (require 'ivy-posframe)
 (push '(t . ivy-posframe-display) ivy-display-functions-alist)
 
-If you use \`ivy-posframe-display', you can use \`ivy-posframe-style'
-to set show style.
 
-1.  window-bottom-left style
-
-(setq ivy-posframe-style 'window-bottom-left)
-2.  Window-center style
-
-(setq ivy-posframe-style 'window-center)
-3.  Point style
-
-(setq ivy-posframe-style 'point)
-
-
-
+
 
 ## How to custom your ivy-posframe style
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 35218e5..622ba41 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -71,22 +71,6 @@
 ;;(push '(t . ivy-posframe-display) ivy-display-functions-alist)
 ;;#+END_EXAMPLE
 
-;; If you use `ivy-posframe-display', you can use `ivy-posframe-style'
-;; to set show style.
-
-;; 1. window-bottom-left style
-;;#+BEGIN_EXAMPLE
-;;(setq ivy-posframe-style 'window-bottom-left)
-;;#+END_EXAMPLE
-;; 2. Window-center style
-;;#+BEGIN_EXAMPLE
-;;(setq ivy-posframe-style 'window-center)
-;;#+END_EXAMPLE
-;; 3. Point style
-;;#+BEGIN_EXAMPLE
-;;(setq ivy-posframe-style 'point)
-;;#+END_EXAMPLE
-
 ;; ** How to custom your ivy-posframe style
 
 ;; The simplest way is:
@@ -113,11 +97,6 @@ When nil, Using current frame's font as fallback."
   :group 'ivy-posframe
   :type 'string)
 
-(defcustom ivy-posframe-style 'window-bottom-left
-  "The style of ivy-posframe."
-  :group 'ivy-posframe
-  :type 'string)
-
 (defface ivy-posframe
   '((t (:inherit default :background "#33" :foreground "#dcdccc")))
   "Face used by the ivy-posframe."
@@ -126,21 +105,10 @@ When nil, Using current frame's font as fallback."
 (defvar ivy-posframe-buffer " *ivy-posframe-buffer*"
   "The posframe-buffer used by ivy-posframe.")
 
-(defvar ivy-posframe-style-alist
-  '((window-center . posframe-poshandler-window-center)
-(frame-center  . posframe-poshandler-frame-center)
-(window-bottom-left . posframe-poshandler-window-bottom-left-corner)
-(frame-bottom-left . posframe-poshandler-frame-bottom-left-corner)
-(frame-bottom-window-center . (lambda (info)
-(cons (car 
(posframe-poshandler-window-center info))
-  (cdr 
(posframe-poshandler-frame-bottom-left-corner info)
-(point . posframe-poshandler-point-bottom-left-corner))
-  "Alist of ivy posframe styles.")
-
 ;; Fix warn
 (defvar emacs-basic-display)
 
-(defun ivy-posframe-display (str &optional style-or-poshandler)
+(defun ivy-posframe--display (str &optional poshandler)
   "Show STR in ivy's posframe."
   (if (not (ivy-posframe-workable-p))
   (ivy-display-function-fallback str)
@@ -152,34 +120,36 @@ When nil, Using current frame's font as fallback."
(with-current-buffer (get-buffer-create " *Minibuf-1*")
  (concat (buffer-string) "  " str))
:position (point)
-   :poshandler
-   (if (functionp style-or-poshandler)
-   style-or-poshandler
- (cdr (assq (or style-or-poshandler ivy-posframe-style)
-ivy-posframe-style-alist)))
+   :poshandler poshandler
:background-color (face-attribute 'ivy-posframe :background)
:foreground-color (face-attribute 'ivy-posframe :foreground)
:height ivy-height
:min-height 10
:min-width 50
 
+(defun ivy-posframe-display (str)
+  (ivy-posframe--display str #'posframe-poshandler-frame-bottom-left-corner))
+
 (defun ivy-posframe-display-at-wind

[elpa] externals/ivy-posframe 387045c 032/195: Fix README

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 387045c461b3eae8739a0839b87007a76d4968b4
Author: Feng Shu 
Commit: Feng Shu 

Fix README
---
 README.md   | 30 +++---
 ivy-posframe.el |  2 +-
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/README.md b/README.md
index ad29c35..ae75cea 100644
--- a/README.md
+++ b/README.md
@@ -1,21 +1,21 @@
 
 # 目录
 
-1.  [ivy-posframe README](#org097ddbf)
-1.  [What is ivy-posframe](#org670ef83)
-2.  [Display functions](#org67ff507)
-3.  [How to enable ivy-posframe](#orgd00569f)
-4.  [Tips](#org326cf4c)
-1.  [How to show fringe to ivy-posframe](#org3d2991d)
-2.  [How to custom your ivy-posframe style](#orgbeec1d0)
+1.  [ivy-posframe README](#orgf04a3ef)
+1.  [What is ivy-posframe](#org9bf1330)
+2.  [Display functions](#orga76454a)
+3.  [How to enable ivy-posframe](#org422a15a)
+4.  [Tips](#org80ae3b7)
+1.  [How to show fringe to ivy-posframe](#org1592d0f)
+2.  [How to custom your ivy-posframe style](#org0aa3f21)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -25,7 +25,7 @@ to show its candidate menu.
 NOTE: ivy-posframe requires Emacs 26
 
 
-
+
 
 ## Display functions
 
@@ -41,7 +41,7 @@ NOTE: ivy-posframe requires Emacs 26
 ![img](./snapshots/ivy-posframe-display-at-point.gif)
 
 
-
+
 
 ## How to enable ivy-posframe
 
@@ -66,16 +66,16 @@ NOTE: ivy-posframe requires Emacs 26
 (push '(t . ivy-posframe-display) ivy-display-functions-alist)
 
 
-
+
 
 ## Tips
 
 
-
+
 
 ### How to show fringe to ivy-posframe
 
-(setq ivy-posframe-extra-parameters
+(setq ivy-posframe-parameters
   '((left-fringe . 10)
 (right-fringe . 10)))
 
@@ -83,7 +83,7 @@ By the way, User can set **any** parameters of ivy-posframe 
with
 the help of \`ivy-posframe-parameters'.
 
 
-
+
 
 ### How to custom your ivy-posframe style
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index acadd9e..63a9f7a 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -75,7 +75,7 @@
 
 ;; *** How to show fringe to ivy-posframe
 ;; ;; #+BEGIN_EXAMPLE
-;; (setq ivy-posframe-extra-parameters
+;; (setq ivy-posframe-parameters
 ;;   '((left-fringe . 10)
 ;; (right-fringe . 10)))
 ;; ;; #+END_EXAMPLE



[elpa] externals/ivy-posframe 19f1382 059/195: update README

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 19f13821094da5f025a80a8df0b295a113efcef4
Author: Feng Shu 
Commit: Feng Shu 

update README
---
 README.md   | 45 +++--
 ivy-posframe.el |  6 --
 2 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/README.md b/README.md
index b76e6cb..d425bb7 100644
--- a/README.md
+++ b/README.md
@@ -3,34 +3,35 @@ Note: this file is auto converted from ivy-posframe.el by 
[el2org](https://githu
 
 # 目录
 
-1.  [ivy-posframe README](#org05902f8)
-1.  [What is ivy-posframe ivy-posframe is a ivy extension, which 
let](#orgb43a11b)
-2.  [Display functions](#orgc79cbd1)
-3.  [How to enable ivy-posframe](#org15b17c3)
-1.  [Global mode](#orgcb1ad0f)
-2.  [Per-command mode.](#org4aa4955)
-3.  [Fallback mode](#org41b338c)
-4.  [Tips](#orgba0f166)
-1.  [How to show fringe to ivy-posframe](#orgc6476d8)
-2.  [How to custom your ivy-posframe style](#org5b91664)
+1.  [ivy-posframe README](#org7824ac6)
+1.  [What is ivy-posframe](#orgf8d18fa)
+2.  [Display functions](#orgfd0c067)
+3.  [How to enable ivy-posframe](#org4a5ecba)
+1.  [Global mode](#orgeac1ac6)
+2.  [Per-command mode.](#org98486b4)
+3.  [Fallback mode](#org30bb098)
+4.  [Tips](#orge1faadb)
+1.  [How to show fringe to ivy-posframe](#orga6b6100)
+2.  [How to custom your ivy-posframe style](#orgbdc62ff)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
-## What is ivy-posframe ivy-posframe is a ivy extension, which let
+## What is ivy-posframe
 
-ivy use posframe to show its candidate menu.
+ivy-posframe is a ivy extension, which let ivy use posframe to show
+its candidate menu.
 
 NOTE: ivy-posframe requires Emacs 26 and do not support mouse
 click.
 
 
-
+
 
 ## Display functions
 
@@ -46,12 +47,12 @@ click.
 ![img](./snapshots/ivy-posframe-display-at-point.gif)
 
 
-
+
 
 ## How to enable ivy-posframe
 
 
-
+
 
 ### Global mode
 
@@ -65,7 +66,7 @@ click.
 (ivy-posframe-enable)
 
 
-
+
 
 ### Per-command mode.
 
@@ -87,7 +88,7 @@ by ivy to find display function in 
\`ivy-display-functions-alist',
 "C-h v this-command" is a good idea.
 
 
-
+
 
 ### Fallback mode
 
@@ -96,12 +97,12 @@ by ivy to find display function in 
\`ivy-display-functions-alist',
 (ivy-posframe-enable)
 
 
-
+
 
 ## Tips
 
 
-
+
 
 ### How to show fringe to ivy-posframe
 
@@ -113,7 +114,7 @@ By the way, User can set **any** parameters of ivy-posframe 
with
 the help of \`ivy-posframe-parameters'.
 
 
-
+
 
 ### How to custom your ivy-posframe style
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 4f4bf3f..2fe050d 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -29,8 +29,10 @@
 ;;; Commentary:
 ;; * ivy-posframe README:README:
 
-;; ** What is ivy-posframe ivy-posframe is a ivy extension, which let
-;; ivy use posframe to show its candidate menu.
+;; ** What is ivy-posframe
+
+;; ivy-posframe is a ivy extension, which let ivy use posframe to show
+;; its candidate menu.
 
 ;; NOTE: ivy-posframe requires Emacs 26 and do not support mouse
 ;; click.



[elpa] externals/ivy-posframe aec9d8a 058/195: Update ivy-posframe README

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit aec9d8a616edeb886532aaf604cae522724f8ef5
Author: Feng Shu 
Commit: Feng Shu 

Update ivy-posframe README
---
 README.md   | 110 ++--
 ivy-posframe.el |  71 
 2 files changed, 108 insertions(+), 73 deletions(-)

diff --git a/README.md b/README.md
index 8d2fc87..b76e6cb 100644
--- a/README.md
+++ b/README.md
@@ -3,32 +3,34 @@ Note: this file is auto converted from ivy-posframe.el by 
[el2org](https://githu
 
 # 目录
 
-1.  [ivy-posframe README](#orga0194dc)
-1.  [What is ivy-posframe](#org9479e4f)
-2.  [Display functions](#org77c90ff)
-3.  [How to enable ivy-posframe](#orgbdb78e5)
-4.  [Tips](#orgd370bc2)
-1.  [How to show fringe to ivy-posframe](#orgdefc2c7)
-2.  [How to custom your ivy-posframe style](#org34f3a1d)
+1.  [ivy-posframe README](#org05902f8)
+1.  [What is ivy-posframe ivy-posframe is a ivy extension, which 
let](#orgb43a11b)
+2.  [Display functions](#orgc79cbd1)
+3.  [How to enable ivy-posframe](#org15b17c3)
+1.  [Global mode](#orgcb1ad0f)
+2.  [Per-command mode.](#org4aa4955)
+3.  [Fallback mode](#org41b338c)
+4.  [Tips](#orgba0f166)
+1.  [How to show fringe to ivy-posframe](#orgc6476d8)
+2.  [How to custom your ivy-posframe style](#org5b91664)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
-## What is ivy-posframe
+## What is ivy-posframe ivy-posframe is a ivy extension, which let
 
-ivy-posframe is a ivy extension, which let ivy use posframe
-to show its candidate menu.
+ivy use posframe to show its candidate menu.
 
-NOTE: ivy-posframe requires Emacs 26 and do not support
-mouse click.
+NOTE: ivy-posframe requires Emacs 26 and do not support mouse
+click.
 
 
-
+
 
 ## Display functions
 
@@ -44,40 +46,62 @@ mouse click.
 ![img](./snapshots/ivy-posframe-display-at-point.gif)
 
 
-
+
 
 ## How to enable ivy-posframe
 
-1.  Global mode
-
-(require 'ivy-posframe)
-(setq ivy-display-function #'ivy-posframe-display)
-;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
-;; (setq ivy-display-function #'ivy-posframe-display-at-window-center)
-;; (setq ivy-display-function 
#'ivy-posframe-display-at-frame-bottom-left)
-;; (setq ivy-display-function 
#'ivy-posframe-display-at-window-bottom-left)
-;; (setq ivy-display-function #'ivy-posframe-display-at-point)
-(ivy-posframe-enable)
-2.  Per-command mode.
-
-(require 'ivy-posframe)
-;; Different command can use different display function.
-(push '(counsel-M-x . ivy-posframe-display-at-window-bottom-left) 
ivy-display-functions-alist)
-(push '(complete-symbol . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
-(ivy-posframe-enable)
-3.  Fallback mode
-
-(require 'ivy-posframe)
-(push '(t . ivy-posframe-display) ivy-display-functions-alist)
-(ivy-posframe-enable)
-
-
-
+
+
+
+### Global mode
+
+(require 'ivy-posframe)
+(setq ivy-display-function #'ivy-posframe-display)
+(setq ivy-display-function #'ivy-posframe-display-at-frame-center)
+(setq ivy-display-function #'ivy-posframe-display-at-window-center)
+(setq ivy-display-function #'ivy-posframe-display-at-frame-bottom-left)
+(setq ivy-display-function #'ivy-posframe-display-at-window-bottom-left)
+(setq ivy-display-function #'ivy-posframe-display-at-point)
+(ivy-posframe-enable)
+
+
+
+
+### Per-command mode.
+
+(require 'ivy-posframe)
+Different command can use different display function.
+(push '(counsel-M-x . ivy-posframe-display-at-window-bottom-left) 
ivy-display-functions-alist)
+(push '(complete-symbol . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
+(push '(swiper . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
+(ivy-posframe-enable)
+
+NOTE: Using swiper as example: swiper's display function **only**
+take effect when you call swiper command with global keybinding, if
+you call swiper command with 'M-x' (for example: counsel-M-x),
+counsel-M-x's display function will take effect instead of
+swiper's.
+
+The value of variable \`this-command' will be used as the search key
+by ivy to find display function in \`ivy-display-functions-alist',
+"C-h v this-command" is a good idea.
+
+
+
+
+### Fallback mode
+
+(require 'ivy-posframe)
+(push '(t . ivy-posframe-display) ivy-display-functions-alist)
+(ivy-posframe-enable)
+
+
+
 
 ## Tips
 
 
-
+
 
 ### How to show fringe to ivy-posframe
 
@@ -89,7 +113,7 @@ By the way, User can set **any** parameters of ivy-posframe 
with
 the help of \`ivy-posframe-parameters'.
 
 
-
+
 
 ### How to custom your ivy-posframe style
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 0a323d1..4f4bf3f 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -29,12 +29,11 @@
 ;;; Commentary:
 ;

[elpa] externals/ivy-posframe 96c2e83 067/195: Update README

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 96c2e835e17fecf6e3589079acb240e24cd4f029
Author: Feng Shu 
Commit: Feng Shu 

Update README
---
 README.md   | 56 
 ivy-posframe.el | 16 +---
 2 files changed, 37 insertions(+), 35 deletions(-)

diff --git a/README.md b/README.md
index 485295f..775a01b 100644
--- a/README.md
+++ b/README.md
@@ -3,25 +3,25 @@ Note: this file is auto converted from ivy-posframe.el by 
[el2org](https://githu
 
 # 目录
 
-1.  [ivy-posframe README](#org5c5431a)
-1.  [What is ivy-posframe](#org3d9d060)
-2.  [Display functions](#orgdc7402d)
-3.  [How to enable ivy-posframe](#org6f45977)
-1.  [Global mode](#orga37e9fc)
-2.  [Per-command mode.](#org06630e3)
-3.  [Fallback mode](#org57abbb6)
-4.  [Tips](#orge5c47f2)
-1.  [How to show a border](#org13ed17e)
-2.  [How to show fringe to ivy-posframe](#org74a1823)
-3.  [How to custom your ivy-posframe style](#org5cf37a7)
+1.  [ivy-posframe README](#org68c65a1)
+1.  [What is ivy-posframe](#org03624ec)
+2.  [Display functions](#org99df55a)
+3.  [How to enable ivy-posframe](#org2040f8e)
+1.  [Global mode](#org6cc7219)
+2.  [Per-command mode.](#orgcd58b06)
+3.  [Fallback mode](#org7941a0a)
+4.  [Tips](#org5cfed99)
+1.  [How to let ivy-posframe show border](#orgb370bbe)
+2.  [How to show fringe to ivy-posframe](#orgb28f068)
+3.  [How to custom your ivy-posframe style](#org96e6893)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -32,28 +32,28 @@ NOTE: ivy-posframe requires Emacs 26 and do not support 
mouse
 click.
 
 
-
+
 
 ## Display functions
 
 1.  ivy-posframe-display
 2.  ivy-posframe-display-at-frame-center
 3.  ivy-posframe-display-at-window-center
-![img](./snapshots/ivy-posframe-display-at-window-center.gif)
+![img](./snapshots/ivy-posframe-display-at-window-center.png)
 4.  ivy-posframe-display-at-frame-bottom-left
 5.  ivy-posframe-display-at-window-bottom-left
-![img](./snapshots/ivy-posframe-display-at-window-bottom-left.gif)
+![img](./snapshots/ivy-posframe-display-at-window-bottom-left.png)
 6.  ivy-posframe-display-at-frame-bottom-window-center
 7.  ivy-posframe-display-at-point
-![img](./snapshots/ivy-posframe-display-at-point.gif)
+![img](./snapshots/ivy-posframe-display-at-point.png)
 
 
-
+
 
 ## How to enable ivy-posframe
 
 
-
+
 
 ### Global mode
 
@@ -67,7 +67,7 @@ click.
 (ivy-posframe-enable)
 
 
-
+
 
 ### Per-command mode.
 
@@ -89,7 +89,7 @@ by ivy to find display function in 
\`ivy-display-functions-alist',
 "C-h v this-command" is a good idea.
 
 
-
+
 
 ### Fallback mode
 
@@ -98,20 +98,20 @@ by ivy to find display function in 
\`ivy-display-functions-alist',
 (ivy-posframe-enable)
 
 
-
+
 
 ## Tips
 
 
-
+
 
-### How to show a border
+### How to let ivy-posframe show border
 
-1.  M-x customize-face internal-border
-2.  (setq ivy-posframe-border-width 1)
+(set-face-attribute 'internal-border nil :background "gray50")
+(setq ivy-posframe-border-width 1)
 
 
-
+
 
 ### How to show fringe to ivy-posframe
 
@@ -123,7 +123,7 @@ By the way, User can set **any** parameters of ivy-posframe 
with
 the help of \`ivy-posframe-parameters'.
 
 
-
+
 
 ### How to custom your ivy-posframe style
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index b5f6380..4b35100 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -91,16 +91,18 @@
 
 ;; ** Tips
 
-;; *** How to show a border
-;; 1. M-x customize-face internal-border
-;; 2. (setq ivy-posframe-border-width 1) 
+;; *** How to let ivy-posframe show border
+;; #+BEGIN_EXAMPLE
+;; (set-face-attribute 'internal-border nil :background "gray50")
+;; (setq ivy-posframe-border-width 1)
+;; #+END_EXAMPLE
 
 ;; *** How to show fringe to ivy-posframe
-;; ;; #+BEGIN_EXAMPLE
+;; #+BEGIN_EXAMPLE
 ;; (setq ivy-posframe-parameters
 ;;   '((left-fringe . 8)
 ;; (right-fringe . 8)))
-;; ;; #+END_EXAMPLE
+;; #+END_EXAMPLE
 
 ;; By the way, User can set *any* parameters of ivy-posframe with
 ;; the help of `ivy-posframe-parameters'.
@@ -108,11 +110,11 @@
 ;; *** How to custom your ivy-posframe style
 
 ;; The simplest way is:
-;; ;; #+BEGIN_EXAMPLE
+;; #+BEGIN_EXAMPLE
 ;; (defun ivy-posframe-display-at-XXX (str)
 ;;   (ivy-posframe--display str #'your-own-poshandler-function))
 ;; (ivy-posframe-enable) ; This line is needed.
-;; ;; #+END_EXAMPLE
+;; #+END_EXAMPLE
 
 ;;; Code:
 ;; * ivy-posframe's code



[elpa] externals/ivy-posframe e6f4e1c 088/195: Fix ""ivy-posframe-font seems take no effect." #36

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit e6f4e1ced809f2ffd318fcce2e03a5e9f1ba4812
Author: Feng Shu 
Commit: Feng Shu 

Fix ""ivy-posframe-font seems take no effect." #36
---
 ivy-posframe.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 8bd548b..6bac621 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -215,8 +215,8 @@ This variable is useful for `ivy-posframe-read-action' .")
string))
:position (point)
:poshandler poshandler
-   :background-color (face-attribute 'ivy-posframe :background)
-   :foreground-color (face-attribute 'ivy-posframe :foreground)
+   :background-color (face-attribute 'ivy-posframe :background nil t)
+   :foreground-color (face-attribute 'ivy-posframe :foreground nil t)
:height ivy-posframe-height
:width ivy-posframe-width
:min-height (or ivy-posframe-min-height (+ ivy-height 1))



[elpa] externals/ivy-posframe 0f159d5 025/195: Add frame-bottom-window-center style

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 0f159d505fc9cc7aebbe7c0cf53840d7ac7a236d
Author: Feng Shu 
Commit: Feng Shu 

Add frame-bottom-window-center style
---
 README.md   | 19 ++-
 ivy-posframe.el | 10 +-
 2 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/README.md b/README.md
index f5e5c1b..513eea6 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,18 @@
 
 # 目录
 
-1.  [ivy-posframe README](#org31b7799)
-1.  [What is ivy-posframe](#orge59727b)
-2.  [Display functions](#orgf8e0e78)
-3.  [How to enable ivy-posframe](#orgd1a99ab)
+1.  [ivy-posframe README](#org607d67c)
+1.  [What is ivy-posframe](#org9e02c4f)
+2.  [Display functions](#org050c36b)
+3.  [How to enable ivy-posframe](#org0a6499b)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -22,7 +22,7 @@ to show its candidate menu.
 NOTE: ivy-posframe requires Emacs 26
 
 
-
+
 
 ## Display functions
 
@@ -33,11 +33,12 @@ NOTE: ivy-posframe requires Emacs 26
 4.  ivy-posframe-display-at-frame-bottom-left
 5.  ivy-posframe-display-at-window-bottom-left
 ![img](./snapshots/ivy-posframe-display-at-window-bottom-left.gif)
-6.  ivy-posframe-display-at-point
+6.  ivy-posframe-display-at-frame-bottom-window-center
+7.  ivy-posframe-display-at-point
 ![img](./snapshots/ivy-posframe-display-at-point.gif)
 
 
-
+
 
 ## How to enable ivy-posframe
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 74b2c17..cb748af 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -43,7 +43,8 @@
 ;; 4. ivy-posframe-display-at-frame-bottom-left
 ;; 5. ivy-posframe-display-at-window-bottom-left
 ;;[[./snapshots/ivy-posframe-display-at-window-bottom-left.gif]]
-;; 6. ivy-posframe-display-at-point
+;; 6. ivy-posframe-display-at-frame-bottom-window-center
+;; 7. ivy-posframe-display-at-point
 ;;[[./snapshots/ivy-posframe-display-at-point.gif]]
 
 ;; ** How to enable ivy-posframe
@@ -98,6 +99,7 @@
  ivy-posframe-display-at-window-center
  ivy-posframe-display-at-frame-bottom-left
  ivy-posframe-display-at-window-bottom-left
+ ivy-posframe-display-at-frame-bottom-window-center
  ivy-posframe-display-at-point))
   (push `(,f :cleanup ivy-posframe-cleanup)
 ivy-display-functions-props))
@@ -131,6 +133,9 @@ When nil, Using current frame's font as fallback."
 (frame-center  . posframe-poshandler-frame-center)
 (window-bottom-left . posframe-poshandler-window-bottom-left-corner)
 (frame-bottom-left . posframe-poshandler-frame-bottom-left-corner)
+(frame-bottom-window-center . (lambda (info)
+(cons (car 
(posframe-poshandler-window-center info))
+  (cdr 
(posframe-poshandler-frame-bottom-left-corner info)
 (point . posframe-poshandler-point-bottom-left-corner))
   "Alist of ivy posframe styles.")
 
@@ -169,6 +174,9 @@ When nil, Using current frame's font as fallback."
 (defun ivy-posframe-display-at-frame-bottom-left (str)
   (ivy-posframe-display str 'frame-bottom-left))
 
+(defun ivy-posframe-display-at-frame-bottom-window-center (str)
+  (ivy-posframe-display str 'frame-bottom-window-center))
+
 (defun ivy-posframe-display-at-point (str)
   (ivy-posframe-display str 'point))
 



[elpa] externals/ivy-posframe 26a7ba7 036/195: Add ivy-posframe-enable and use it

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 26a7ba744a06ef97811c79b9d723b0125267b512
Author: Feng Shu 
Commit: Feng Shu 

Add ivy-posframe-enable and use it
---
 README.md   | 36 ++--
 ivy-posframe.el | 18 +-
 2 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/README.md b/README.md
index ed8014c..53f2855 100644
--- a/README.md
+++ b/README.md
@@ -3,21 +3,21 @@ Note: this file is converted from ivy-posframe.el by 
[el2org](https://github.com
 
 # 目录
 
-1.  [ivy-posframe README](#orgcfa545c)
-1.  [What is ivy-posframe](#org3c6ad89)
-2.  [Display functions](#orgda8366d)
-3.  [How to enable ivy-posframe](#org4d648e7)
-4.  [Tips](#orgcef74d7)
-1.  [How to show fringe to ivy-posframe](#org7a32697)
-2.  [How to custom your ivy-posframe style](#org06a0215)
+1.  [ivy-posframe README](#org73a5a3f)
+1.  [What is ivy-posframe](#org711a00d)
+2.  [Display functions](#org8ff600c)
+3.  [How to enable ivy-posframe](#orgedfde9d)
+4.  [Tips](#org7fbf393)
+1.  [How to show fringe to ivy-posframe](#org79a88f5)
+2.  [How to custom your ivy-posframe style](#orgd33a170)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -27,7 +27,7 @@ to show its candidate menu.
 NOTE: ivy-posframe requires Emacs 26
 
 
-
+
 
 ## Display functions
 
@@ -43,14 +43,14 @@ NOTE: ivy-posframe requires Emacs 26
 ![img](./snapshots/ivy-posframe-display-at-point.gif)
 
 
-
+
 
 ## How to enable ivy-posframe
 
 1.  Global mode
 
 (require 'ivy-posframe)
-(ivy-posframe-setup)
+(ivy-posframe-enable)
 (setq ivy-display-function #'ivy-posframe-display)
 ;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
 ;; (setq ivy-display-function #'ivy-posframe-display-at-window-center)
@@ -60,23 +60,23 @@ NOTE: ivy-posframe requires Emacs 26
 2.  Per-command mode.
 
 (require 'ivy-posframe)
-(ivy-posframe-setup)
+(ivy-posframe-enable)
 ;; Different command can use different display function.
 (push '(counsel-M-x . ivy-posframe-display-at-window-bottom-left) 
ivy-display-functions-alist)
 (push '(complete-symbol . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
 3.  Fallback mode
 
 (require 'ivy-posframe)
-(ivy-posframe-setup)
+(ivy-posframe-enable)
 (push '(t . ivy-posframe-display) ivy-display-functions-alist)
 
 
-
+
 
 ## Tips
 
 
-
+
 
 ### How to show fringe to ivy-posframe
 
@@ -88,7 +88,7 @@ By the way, User can set **any** parameters of ivy-posframe 
with
 the help of \`ivy-posframe-parameters'.
 
 
-
+
 
 ### How to custom your ivy-posframe style
 
@@ -96,4 +96,4 @@ The simplest way is:
 
 (defun ivy-posframe-display-at-XXX (str)
   (ivy-posframe--display str #'your-own-poshandler-function))
-(ivy-posframe-setup) ; This line is needed.
+(ivy-posframe-enable) ; This line is needed.
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 33b791b..5985ed5 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -51,7 +51,7 @@
 ;; 1. Global mode
 ;;#+BEGIN_EXAMPLE
 ;;(require 'ivy-posframe)
-;;(ivy-posframe-setup)
+;;(ivy-posframe-enable)
 ;;(setq ivy-display-function #'ivy-posframe-display)
 ;;;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
 ;;;; (setq ivy-display-function #'ivy-posframe-display-at-window-center)
@@ -62,7 +62,7 @@
 ;; 2. Per-command mode.
 ;;#+BEGIN_EXAMPLE
 ;;(require 'ivy-posframe)
-;;(ivy-posframe-setup)
+;;(ivy-posframe-enable)
 ;;;; Different command can use different display function.
 ;;(push '(counsel-M-x . ivy-posframe-display-at-window-bottom-left) 
ivy-display-functions-alist)
 ;;(push '(complete-symbol . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
@@ -70,7 +70,7 @@
 ;; 3. Fallback mode
 ;;#+BEGIN_EXAMPLE
 ;;(require 'ivy-posframe)
-;;(ivy-posframe-setup)
+;;(ivy-posframe-enable)
 ;;(push '(t . ivy-posframe-display) ivy-display-functions-alist)
 ;;#+END_EXAMPLE
 
@@ -92,7 +92,7 @@
 ;; ;; #+BEGIN_EXAMPLE
 ;; (defun ivy-posframe-display-at-XXX (str)
 ;;   (ivy-posframe--display str #'your-own-poshandler-function))
-;; (ivy-posframe-setup) ; This line is needed.
+;; (ivy-posframe-enable) ; This line is needed.
 ;; ;; #+END_EXAMPLE
 
 ;;; Code:
@@ -251,16 +251,16 @@ selection, non-nil otherwise."
   (message "ivy-posframe: ivy-avy is not supported at the moment."))
 
 ;;;###autoload
-(defun ivy-posframe-setup ()
-  "Setup ivy-posframe."
+(defun ivy-posframe-enable ()
+  "Enable ivy-posframe."
   (interactive)
   (require 'ivy)
-  (ivy-posframe-init)
+  (ivy-posframe-setup)
   (define-key ivy-minibuffer-map (kbd "C-M-a") 'ivy-posframe-read-action)
   (define-key ivy-minibuffer-map (kbd "M-o") 'ivy-posframe-dispatching-done)
   (define-key ivy-minibuffer-map (kbd "C-'") 'ivy-posframe-avy))
 
-(defun ivy-posf

[elpa] externals/ivy-posframe 7ea96ce 055/195: Merge pull request #19 from abo-abo/master

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 7ea96ce97857b4d4898e7a908429e61a714b412a
Merge: 9982c6d 3784f59
Author: tumashu 
Commit: GitHub 

Merge pull request #19 from abo-abo/master

Simplify ivy-postframe-avy
---
 ivy-posframe.el | 49 +
 1 file changed, 5 insertions(+), 44 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 0a323d1..8304c6a 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -178,7 +178,7 @@ This variable is useful for `ivy-posframe-read-action' .")
   "Show STR in ivy's posframe."
   (if (not (ivy-posframe-workable-p))
   (ivy-display-function-fallback str)
-(with-selected-window (ivy--get-window ivy-last)
+(with-ivy-window
   (posframe-show
ivy-posframe-buffer
:font ivy-posframe-font
@@ -287,13 +287,6 @@ selection, non-nil otherwise."
(setcar actions (1+ action-idx))
(ivy-set-action actions)))
 
-(defun ivy-posframe--avy-action (pt)
-  "Finish ivy session with the candidate at PT."
-  (with-current-buffer ivy-posframe-buffer
-(ivy--done
- (substring-no-properties
-  (nth (- (line-number-at-pos pt) 2) ivy--old-cands)
-
 (defun ivy-posframe--window ()
   "Return the posframe window displaying `ivy-posframe-buffer'."
   (frame-selected-window
@@ -302,46 +295,14 @@ selection, non-nil otherwise."
 
 (defvar avy-all-windows)
 (defvar avy-keys)
-(defvar avy-keys-alist)
 (defvar avy-style)
-(defvar avy-styles-alist)
-(defvar avy-action)
-(declare-function avy--process "avy")
-(declare-function avy--style-fn "avy")
+
 (defun ivy-posframe-avy ()
   "Jump to one of the current ivy candidates."
   (interactive)
-  (unless (require 'avy nil 'noerror)
-(error "Package avy isn't installed"))
-  (unless (boundp 'avy-pre-action)
-(error "A newer version of avy is required for this command"))
-  (let* ((avy-all-windows nil)
- (avy-keys (or (cdr (assq 'ivy-avy avy-keys-alist))
-   avy-keys))
- (avy-style (or (cdr (assq 'ivy-avy
-   avy-styles-alist))
-avy-style))
- ;; prevent default pre action, which calls
- ;; `select-frame-set-input-focus', deselecting the minibuffer and
- ;; causing `ivy-posframe-cleanup' to run prematurely
- (avy-pre-action #'ignore)
- (window (ivy-posframe--window))
- candidates)
-(with-current-buffer ivy-posframe-buffer
-  (save-excursion
-(save-restriction
-  (narrow-to-region
-   (window-start window)
-   (window-end window))
-  (goto-char (point-min))
-  (forward-line)
-  (while (< (point) (point-max))
-(push (cons (point) window) candidates)
-(forward-line)
-(setq avy-action #'ivy-posframe--avy-action)
-(avy--process
- (nreverse candidates)
- (avy--style-fn avy-style
+  (let ((avy-pre-action #'ignore))
+(with-selected-window (ivy-posframe--window)
+  (ivy-avy
 
 (declare-function avy--make-backgrounds "avy")
 (declare-function avy-window-list "avy")



[elpa] externals/ivy-posframe f341bae 061/195: Add blank line

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit f341bae22aee4cd4b0c51dd40c95bce8771a1e77
Author: Feng Shu 
Commit: Feng Shu 

Add blank line
---
 ivy-posframe.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 319ce6b..35dd872 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -131,6 +131,7 @@
 When nil, Using current frame's font as fallback."
   :group 'ivy-posframe
   :type 'string)
+
 (defcustom ivy-posframe-width nil
   "The width of ivy-posframe."
   :group 'ivy-posframe



[elpa] externals/ivy-posframe 38aff80 084/195: Add ivy-posframe-demo

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 38aff80113d62b588acbb66d9f7f22ce3c54ec03
Author: Feng Shu 
Commit: Feng Shu 

Add ivy-posframe-demo
---
 ivy-posframe.el | 9 +
 1 file changed, 9 insertions(+)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 9b5b1bd..13953b3 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -442,6 +442,15 @@ selection, non-nil otherwise."
   (advice-add 'ivy--minibuffer-setup :around #'ivy-posframe--minibuffer-setup)
   (message "ivy-posframe is enabled, disabling it need to reboot emacs."))
 
+;;;###autoload
+(defun ivy-posframe-demo ()
+  "Enable a demo config of ivy-posframe.
+This function is used to test ivy-posframe."
+  (interactive)
+  (push '(t . ivy-posframe-display-at-frame-center)
+ivy-display-functions-alist)
+  (ivy-posframe-enable))
+
 (provide 'ivy-posframe)
 
 ;; Local Variables:



[elpa] externals/ivy-posframe b217e00 051/195: Use remaps for all keybindings

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit b217e00690d11341ec8a458de88387505d873f44
Author: Fox Kiester 
Commit: Fox Kiester 

Use remaps for all keybindings
---
 ivy-posframe.el | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 692600f..0a323d1 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -444,9 +444,11 @@ selection, non-nil otherwise."
   (interactive)
   (require 'ivy)
   (ivy-posframe-setup)
-  (define-key ivy-minibuffer-map (kbd "C-M-a") 'ivy-posframe-read-action)
-  (define-key ivy-minibuffer-map (kbd "M-o") 'ivy-posframe-dispatching-done)
-  (define-key ivy-minibuffer-map (kbd "C-'") 'ivy-posframe-avy)
+  (define-key ivy-minibuffer-map
+[remap ivy-read-action] 'ivy-posframe-read-action)
+  (define-key ivy-minibuffer-map
+[remap ivy-dispatching-done] 'ivy-posframe-dispatching-done)
+  (define-key ivy-minibuffer-map [remap ivy-avy] 'ivy-posframe-avy)
   (define-key ivy-minibuffer-map [remap swiper-avy] 'ivy-posframe-swiper-avy)
   (advice-add 'ivy--minibuffer-setup :around #'ivy-posframe--minibuffer-setup)
   (message "ivy-posframe is enabled, disabling it need to reboot emacs."))



[elpa] externals/ivy-posframe 9f6b58d 040/195: Cursor face inherits from regular cursor face

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 9f6b58d02ac2478e4a246ed701018f4e2ac6e06e
Author: Dror Levin 
Commit: GitHub 

Cursor face inherits from regular cursor face
---
 ivy-posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index d7b30d0..861c595 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -128,7 +128,7 @@ When nil, Using current frame's font as fallback."
   :group 'ivy-posframe)
 
 (defface ivy-posframe-cursor
-  '((t (:inherit default :background "#00")))
+  '((t (:inherit cursor)))
   "Face used by the ivy-posframe's fake cursor."
   :group 'ivy-posframe)
 



[elpa] externals/ivy-posframe f6f07cf 056/195: Revert "Simplify ivy-postframe-avy"

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit f6f07cf34feb4a7389386db4a617b04c5e4fa9b1
Author: tumashu 
Commit: GitHub 

Revert "Simplify ivy-postframe-avy"
---
 ivy-posframe.el | 49 -
 1 file changed, 44 insertions(+), 5 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 8304c6a..0a323d1 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -178,7 +178,7 @@ This variable is useful for `ivy-posframe-read-action' .")
   "Show STR in ivy's posframe."
   (if (not (ivy-posframe-workable-p))
   (ivy-display-function-fallback str)
-(with-ivy-window
+(with-selected-window (ivy--get-window ivy-last)
   (posframe-show
ivy-posframe-buffer
:font ivy-posframe-font
@@ -287,6 +287,13 @@ selection, non-nil otherwise."
(setcar actions (1+ action-idx))
(ivy-set-action actions)))
 
+(defun ivy-posframe--avy-action (pt)
+  "Finish ivy session with the candidate at PT."
+  (with-current-buffer ivy-posframe-buffer
+(ivy--done
+ (substring-no-properties
+  (nth (- (line-number-at-pos pt) 2) ivy--old-cands)
+
 (defun ivy-posframe--window ()
   "Return the posframe window displaying `ivy-posframe-buffer'."
   (frame-selected-window
@@ -295,14 +302,46 @@ selection, non-nil otherwise."
 
 (defvar avy-all-windows)
 (defvar avy-keys)
+(defvar avy-keys-alist)
 (defvar avy-style)
-
+(defvar avy-styles-alist)
+(defvar avy-action)
+(declare-function avy--process "avy")
+(declare-function avy--style-fn "avy")
 (defun ivy-posframe-avy ()
   "Jump to one of the current ivy candidates."
   (interactive)
-  (let ((avy-pre-action #'ignore))
-(with-selected-window (ivy-posframe--window)
-  (ivy-avy
+  (unless (require 'avy nil 'noerror)
+(error "Package avy isn't installed"))
+  (unless (boundp 'avy-pre-action)
+(error "A newer version of avy is required for this command"))
+  (let* ((avy-all-windows nil)
+ (avy-keys (or (cdr (assq 'ivy-avy avy-keys-alist))
+   avy-keys))
+ (avy-style (or (cdr (assq 'ivy-avy
+   avy-styles-alist))
+avy-style))
+ ;; prevent default pre action, which calls
+ ;; `select-frame-set-input-focus', deselecting the minibuffer and
+ ;; causing `ivy-posframe-cleanup' to run prematurely
+ (avy-pre-action #'ignore)
+ (window (ivy-posframe--window))
+ candidates)
+(with-current-buffer ivy-posframe-buffer
+  (save-excursion
+(save-restriction
+  (narrow-to-region
+   (window-start window)
+   (window-end window))
+  (goto-char (point-min))
+  (forward-line)
+  (while (< (point) (point-max))
+(push (cons (point) window) candidates)
+(forward-line)
+(setq avy-action #'ivy-posframe--avy-action)
+(avy--process
+ (nreverse candidates)
+ (avy--style-fn avy-style
 
 (declare-function avy--make-backgrounds "avy")
 (declare-function avy-window-list "avy")



[elpa] externals/ivy-posframe 60e1f99 045/195: add variable to customize ivy-posframe style

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 60e1f99bc131690611e169bd0a4d940a1c57c6e6
Author: Samray 
Commit: Samray 

add variable to customize ivy-posframe style
---
 ivy-posframe.el | 27 ---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 6b2ec86..7f49589 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -1,5 +1,6 @@
 ;;; ivy-posframe.el --- Using posframe to show Ivy  -*- lexical-binding: t -*-
 
+
 ;; Copyright (C) 2017-2018 Free Software Foundation, Inc.
 
 ;; Author: Feng Shu
@@ -116,6 +117,25 @@
 When nil, Using current frame's font as fallback."
   :group 'ivy-posframe
   :type 'string)
+(defcustom ivy-posframe-width nil
+  "The width of ivy-posframe."
+  :group 'ivy-posframe
+  :type 'number)
+
+(defcustom ivy-posframe-height nil
+  "The height of ivy-posframe."
+  :group 'ivy-posframe
+  :type 'number)
+
+(defcustom ivy-posframe-min-width nil
+  "The width of ivy-min-posframe."
+  :group 'ivy-posframe
+  :type 'number)
+
+(defcustom ivy-posframe-min-height nil
+  "The height of ivy-min-posframe."
+  :group 'ivy-posframe
+  :type 'number)
 
 (defcustom ivy-posframe-border-width 0
   "The border width used by ivy-posframe.
@@ -168,9 +188,10 @@ This variable is useful for `ivy-posframe-read-action' .")
:poshandler poshandler
:background-color (face-attribute 'ivy-posframe :background)
:foreground-color (face-attribute 'ivy-posframe :foreground)
-   :height ivy-height
-   :min-height 10
-   :min-width 50
+   :height (or ivy-posframe-height ivy-height)
+   :width (or ivy-posframe-width (/ (window-width) 2))
+   :min-height (or ivy-posframe-min-height 10)
+   :min-width (or ivy-posframe-min-width 50)
:internal-border-width ivy-posframe-border-width
:override-parameters ivy-posframe-parameters
 



[elpa] externals/ivy-posframe 7bfd14f 068/195: Add ivy-posframe-border face and use it

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 7bfd14f8b9a5209dde484619dd565104cc59d546
Author: Feng Shu 
Commit: Feng Shu 

Add ivy-posframe-border face and use it
---
 README.md   | 49 -
 ivy-posframe.el | 16 
 2 files changed, 28 insertions(+), 37 deletions(-)

diff --git a/README.md b/README.md
index 775a01b..eb39709 100644
--- a/README.md
+++ b/README.md
@@ -3,25 +3,24 @@ Note: this file is auto converted from ivy-posframe.el by 
[el2org](https://githu
 
 # 目录
 
-1.  [ivy-posframe README](#org68c65a1)
-1.  [What is ivy-posframe](#org03624ec)
-2.  [Display functions](#org99df55a)
-3.  [How to enable ivy-posframe](#org2040f8e)
-1.  [Global mode](#org6cc7219)
-2.  [Per-command mode.](#orgcd58b06)
-3.  [Fallback mode](#org7941a0a)
-4.  [Tips](#org5cfed99)
-1.  [How to let ivy-posframe show border](#orgb370bbe)
-2.  [How to show fringe to ivy-posframe](#orgb28f068)
-3.  [How to custom your ivy-posframe style](#org96e6893)
+1.  [ivy-posframe README](#org3d85bc4)
+1.  [What is ivy-posframe](#org5b2bac3)
+2.  [Display functions](#org76e7f43)
+3.  [How to enable ivy-posframe](#org45fc4c8)
+1.  [Global mode](#orge1a8047)
+2.  [Per-command mode.](#org13272c5)
+3.  [Fallback mode](#org2f40fde)
+4.  [Tips](#org0d52e7c)
+1.  [How to show fringe to ivy-posframe](#orgcf3e519)
+2.  [How to custom your ivy-posframe style](#org841efef)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -32,7 +31,7 @@ NOTE: ivy-posframe requires Emacs 26 and do not support mouse
 click.
 
 
-
+
 
 ## Display functions
 
@@ -48,12 +47,12 @@ click.
 ![img](./snapshots/ivy-posframe-display-at-point.png)
 
 
-
+
 
 ## How to enable ivy-posframe
 
 
-
+
 
 ### Global mode
 
@@ -67,7 +66,7 @@ click.
 (ivy-posframe-enable)
 
 
-
+
 
 ### Per-command mode.
 
@@ -89,7 +88,7 @@ by ivy to find display function in 
\`ivy-display-functions-alist',
 "C-h v this-command" is a good idea.
 
 
-
+
 
 ### Fallback mode
 
@@ -98,20 +97,12 @@ by ivy to find display function in 
\`ivy-display-functions-alist',
 (ivy-posframe-enable)
 
 
-
+
 
 ## Tips
 
 
-
-
-### How to let ivy-posframe show border
-
-(set-face-attribute 'internal-border nil :background "gray50")
-(setq ivy-posframe-border-width 1)
-
-
-
+
 
 ### How to show fringe to ivy-posframe
 
@@ -123,7 +114,7 @@ By the way, User can set **any** parameters of ivy-posframe 
with
 the help of \`ivy-posframe-parameters'.
 
 
-
+
 
 ### How to custom your ivy-posframe style
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 4b35100..662ea5d 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -91,12 +91,6 @@
 
 ;; ** Tips
 
-;; *** How to let ivy-posframe show border
-;; #+BEGIN_EXAMPLE
-;; (set-face-attribute 'internal-border nil :background "gray50")
-;; (setq ivy-posframe-border-width 1)
-;; #+END_EXAMPLE
-
 ;; *** How to show fringe to ivy-posframe
 ;; #+BEGIN_EXAMPLE
 ;; (setq ivy-posframe-parameters
@@ -158,7 +152,7 @@ When nil, Using current frame's font as fallback."
   :group 'ivy-posframe
   :type 'number)
 
-(defcustom ivy-posframe-border-width 0
+(defcustom ivy-posframe-border-width 1
   "The border width used by ivy-posframe.
 When 0, no border is showed."
   :group 'ivy-posframe
@@ -179,6 +173,11 @@ When 0, no border is showed."
   "Face used by the ivy-posframe."
   :group 'ivy-posframe)
 
+(defface ivy-posframe-border
+  '((t (:inherit default :background "gray50")))
+  "Face used by the ivy-posframe."
+  :group 'ivy-posframe)
+
 (defface ivy-posframe-cursor
   '((t (:inherit cursor)))
   "Face used by the ivy-posframe's fake cursor."
@@ -219,7 +218,8 @@ This variable is useful for `ivy-posframe-read-action' .")
:min-height (or ivy-posframe-min-height 10)
:min-width (or ivy-posframe-min-width 50)
:internal-border-width ivy-posframe-border-width
-   :override-parameters ivy-posframe-parameters
+   :override-parameters ivy-posframe-parameters
+   :face-remap '((internal-border . ivy-posframe-border))
 
 (defun ivy-posframe-display (str)
   (let ((func (intern (format "ivy-posframe-display-at-%s"



[elpa] externals/ivy-posframe b9b9a45 038/195: Update

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit b9b9a45455692d06b89d4fbf40bba6852b9a109a
Author: Feng Shu 
Commit: Feng Shu 

Update
---
 ivy-posframe.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index ce615ed..1067384 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -258,7 +258,8 @@ selection, non-nil otherwise."
   (ivy-posframe-setup)
   (define-key ivy-minibuffer-map (kbd "C-M-a") 'ivy-posframe-read-action)
   (define-key ivy-minibuffer-map (kbd "M-o") 'ivy-posframe-dispatching-done)
-  (define-key ivy-minibuffer-map (kbd "C-'") 'ivy-posframe-avy))
+  (define-key ivy-minibuffer-map (kbd "C-'") 'ivy-posframe-avy)
+  (message "ivy-posframe is enabled."))
 
 (defun ivy-posframe-setup ()
   "Add all display functions of ivy-posframe to



[elpa] externals/ivy-posframe d3a82a9 028/195: Update README

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit d3a82a9f95744261ad0e11cc6123d0e0a8e81adb
Author: Feng Shu 
Commit: Feng Shu 

Update README
---
 README.md   | 28 
 ivy-posframe.el |  8 
 2 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index 513eea6..55bef0d 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,19 @@
 
 # 目录
 
-1.  [ivy-posframe README](#org607d67c)
-1.  [What is ivy-posframe](#org9e02c4f)
-2.  [Display functions](#org050c36b)
-3.  [How to enable ivy-posframe](#org0a6499b)
+1.  [ivy-posframe README](#org39783d3)
+1.  [What is ivy-posframe](#orgd46557b)
+2.  [Display functions](#orge009677)
+3.  [How to enable ivy-posframe](#org5a3f479)
+4.  [How to custom your ivy-posframe style](#org333b256)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -22,7 +23,7 @@ to show its candidate menu.
 NOTE: ivy-posframe requires Emacs 26
 
 
-
+
 
 ## Display functions
 
@@ -38,7 +39,7 @@ NOTE: ivy-posframe requires Emacs 26
 ![img](./snapshots/ivy-posframe-display-at-point.gif)
 
 
-
+
 
 ## How to enable ivy-posframe
 
@@ -76,5 +77,16 @@ to set show style.
 (setq ivy-posframe-style 'point)
 
 
+
+
+## How to custom your ivy-posframe style
+
+The simplest way is:
+
+(defun ivy-posframe-display-at-XXX (str)
+  (ivy-posframe-display str 'your-own-poshandler-function))
+(ivy-posframe-setup) ; This line is need.
+
+
 
 Converted from ivy-posframe.el by [el2org](https://github.com/tumashu/el2org) .
\ No newline at end of file
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 981e09f..35218e5 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -87,6 +87,14 @@
 ;;(setq ivy-posframe-style 'point)
 ;;#+END_EXAMPLE
 
+;; ** How to custom your ivy-posframe style
+
+;; The simplest way is:
+;; ;; #+BEGIN_EXAMPLE
+;; (defun ivy-posframe-display-at-XXX (str)
+;;   (ivy-posframe-display str 'your-own-poshandler-function))
+;; (ivy-posframe-setup) ; This line is need.
+;; ;; #+END_EXAMPLE
 
 ;;; Code:
 ;; * ivy-posframe's code



[elpa] externals/ivy-posframe 0254f6e 065/195: Add document about border

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 0254f6e8d2e29d0d986bc49fda60b4b374b0fca7
Author: Feng Shu 
Commit: Feng Shu 

Add document about border
---
 README.md   | 53 +++--
 ivy-posframe.el |  8 ++--
 2 files changed, 37 insertions(+), 24 deletions(-)

diff --git a/README.md b/README.md
index d425bb7..485295f 100644
--- a/README.md
+++ b/README.md
@@ -3,24 +3,25 @@ Note: this file is auto converted from ivy-posframe.el by 
[el2org](https://githu
 
 # 目录
 
-1.  [ivy-posframe README](#org7824ac6)
-1.  [What is ivy-posframe](#orgf8d18fa)
-2.  [Display functions](#orgfd0c067)
-3.  [How to enable ivy-posframe](#org4a5ecba)
-1.  [Global mode](#orgeac1ac6)
-2.  [Per-command mode.](#org98486b4)
-3.  [Fallback mode](#org30bb098)
-4.  [Tips](#orge1faadb)
-1.  [How to show fringe to ivy-posframe](#orga6b6100)
-2.  [How to custom your ivy-posframe style](#orgbdc62ff)
+1.  [ivy-posframe README](#org5c5431a)
+1.  [What is ivy-posframe](#org3d9d060)
+2.  [Display functions](#orgdc7402d)
+3.  [How to enable ivy-posframe](#org6f45977)
+1.  [Global mode](#orga37e9fc)
+2.  [Per-command mode.](#org06630e3)
+3.  [Fallback mode](#org57abbb6)
+4.  [Tips](#orge5c47f2)
+1.  [How to show a border](#org13ed17e)
+2.  [How to show fringe to ivy-posframe](#org74a1823)
+3.  [How to custom your ivy-posframe style](#org5cf37a7)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -31,7 +32,7 @@ NOTE: ivy-posframe requires Emacs 26 and do not support mouse
 click.
 
 
-
+
 
 ## Display functions
 
@@ -47,12 +48,12 @@ click.
 ![img](./snapshots/ivy-posframe-display-at-point.gif)
 
 
-
+
 
 ## How to enable ivy-posframe
 
 
-
+
 
 ### Global mode
 
@@ -66,7 +67,7 @@ click.
 (ivy-posframe-enable)
 
 
-
+
 
 ### Per-command mode.
 
@@ -88,7 +89,7 @@ by ivy to find display function in 
\`ivy-display-functions-alist',
 "C-h v this-command" is a good idea.
 
 
-
+
 
 ### Fallback mode
 
@@ -97,24 +98,32 @@ by ivy to find display function in 
\`ivy-display-functions-alist',
 (ivy-posframe-enable)
 
 
-
+
 
 ## Tips
 
 
-
+
+
+### How to show a border
+
+1.  M-x customize-face internal-border
+2.  (setq ivy-posframe-border-width 1)
+
+
+
 
 ### How to show fringe to ivy-posframe
 
 (setq ivy-posframe-parameters
-  '((left-fringe . 10)
-(right-fringe . 10)))
+  '((left-fringe . 8)
+(right-fringe . 8)))
 
 By the way, User can set **any** parameters of ivy-posframe with
 the help of \`ivy-posframe-parameters'.
 
 
-
+
 
 ### How to custom your ivy-posframe style
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 705614f..2ffba11 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -91,11 +91,15 @@
 
 ;; ** Tips
 
+;; *** How to show a border
+;; 1. M-x customize-face internal-border
+;; 2. (setq ivy-posframe-border-width 1)
+
 ;; *** How to show fringe to ivy-posframe
 ;; ;; #+BEGIN_EXAMPLE
 ;; (setq ivy-posframe-parameters
-;;   '((left-fringe . 10)
-;; (right-fringe . 10)))
+;;   '((left-fringe . 8)
+;; (right-fringe . 8)))
 ;; ;; #+END_EXAMPLE
 
 ;; By the way, User can set *any* parameters of ivy-posframe with



[elpa] externals/ivy-posframe 8d18644 072/195: Revert "Revert "Simplify ivy-postframe-avy""

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 8d18644d0320f6c009ec7e1a96e88e8266a6d1c8
Author: Feng Shu 
Commit: Feng Shu 

Revert "Revert "Simplify ivy-postframe-avy""

This reverts commit f6f07cf34feb4a7389386db4a617b04c5e4fa9b1.
---
 ivy-posframe.el | 49 +
 1 file changed, 5 insertions(+), 44 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 18a31e4..3736df4 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -207,7 +207,7 @@ This variable is useful for `ivy-posframe-read-action' .")
   (if (not (ivy-posframe-workable-p))
   (ivy-display-function-fallback str)
 (setq ivy-posframe--display-p t)
-(with-selected-window (ivy--get-window ivy-last)
+(with-ivy-window
   (posframe-show
ivy-posframe-buffer
:font ivy-posframe-font
@@ -318,13 +318,6 @@ selection, non-nil otherwise."
(setcar actions (1+ action-idx))
(ivy-set-action actions)))
 
-(defun ivy-posframe--avy-action (pt)
-  "Finish ivy session with the candidate at PT."
-  (with-current-buffer ivy-posframe-buffer
-(ivy--done
- (substring-no-properties
-  (nth (- (line-number-at-pos pt) 2) ivy--old-cands)
-
 (defun ivy-posframe--window ()
   "Return the posframe window displaying `ivy-posframe-buffer'."
   (frame-selected-window
@@ -333,46 +326,14 @@ selection, non-nil otherwise."
 
 (defvar avy-all-windows)
 (defvar avy-keys)
-(defvar avy-keys-alist)
 (defvar avy-style)
-(defvar avy-styles-alist)
-(defvar avy-action)
-(declare-function avy--process "avy")
-(declare-function avy--style-fn "avy")
+
 (defun ivy-posframe-avy ()
   "Jump to one of the current ivy candidates."
   (interactive)
-  (unless (require 'avy nil 'noerror)
-(error "Package avy isn't installed"))
-  (unless (boundp 'avy-pre-action)
-(error "A newer version of avy is required for this command"))
-  (let* ((avy-all-windows nil)
- (avy-keys (or (cdr (assq 'ivy-avy avy-keys-alist))
-   avy-keys))
- (avy-style (or (cdr (assq 'ivy-avy
-   avy-styles-alist))
-avy-style))
- ;; prevent default pre action, which calls
- ;; `select-frame-set-input-focus', deselecting the minibuffer and
- ;; causing `ivy-posframe-cleanup' to run prematurely
- (avy-pre-action #'ignore)
- (window (ivy-posframe--window))
- candidates)
-(with-current-buffer ivy-posframe-buffer
-  (save-excursion
-(save-restriction
-  (narrow-to-region
-   (window-start window)
-   (window-end window))
-  (goto-char (point-min))
-  (forward-line)
-  (while (< (point) (point-max))
-(push (cons (point) window) candidates)
-(forward-line)
-(setq avy-action #'ivy-posframe--avy-action)
-(avy--process
- (nreverse candidates)
- (avy--style-fn avy-style
+  (let ((avy-pre-action #'ignore))
+(with-selected-window (ivy-posframe--window)
+  (ivy-avy
 
 (declare-function avy--make-backgrounds "avy")
 (declare-function avy-window-list "avy")



[elpa] externals/ivy-posframe 9e5c4a9 060/195: Fix: Should the default width be the frame instead of the window? #22

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 9e5c4a9d446f565834118a23b46b538a26c039bf
Author: Feng Shu 
Commit: Feng Shu 

Fix: Should the default width be the frame instead of the window? #22
---
 ivy-posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 2fe050d..319ce6b 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -208,7 +208,7 @@ This variable is useful for `ivy-posframe-read-action' .")
:background-color (face-attribute 'ivy-posframe :background)
:foreground-color (face-attribute 'ivy-posframe :foreground)
:height (or ivy-posframe-height ivy-height)
-   :width (or ivy-posframe-width (/ (window-width) 2))
+   :width (or ivy-posframe-width (/ (frame-width) 2))
:min-height (or ivy-posframe-min-height 10)
:min-width (or ivy-posframe-min-width 50)
:internal-border-width ivy-posframe-border-width



[elpa] externals/ivy-posframe 786dcc7 094/195: Fix "ivy-posframe copies prompt text as kill" #41

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 786dcc76ba831277190f1a684f42b5987460f81b
Author: SeungKi Kim 
Commit: SeungKi Kim 

Fix "ivy-posframe copies prompt text as kill" #41
---
 ivy-posframe.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 27bb838..37c1155 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -268,7 +268,9 @@ This variable is useful for `ivy-posframe-read-action' .")
 (remove-text-properties 0 (length prompt) '(read-only nil) prompt)
 (with-current-buffer ivy-posframe-buffer
   (goto-char (point-min))
-  (kill-line 1)
+  (delete-region
+   (point)
+   (save-excursion (move-end-of-line 1) (point)))
   (insert prompt "  \n")
   (add-text-properties point (1+ point) '(face 
ivy-posframe-cursor)))
 



[elpa] externals/ivy-posframe 7787514 064/195: ivy-posframe-hide-minibuffer default is t

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 7787514ddd12161a88504b025b8a0a9767de33b1
Author: Feng Shu 
Commit: Feng Shu 

ivy-posframe-hide-minibuffer default is t
---
 ivy-posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 10eb265..705614f 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -158,7 +158,7 @@ When 0, no border is showed."
   :group 'ivy-posframe
   :type 'number)
 
-(defcustom ivy-posframe-hide-minibuffer nil
+(defcustom ivy-posframe-hide-minibuffer t
   "Hide input of minibuffer when using ivy-posframe."
   :group 'ivy-posframe
   :type 'boolean)



[elpa] externals/ivy-posframe 8f62984 033/195: Add ivy-posframe-read-action and ivy-posframe-dispatching-done

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 8f6298494da7ae35cece906050bce4f099fb7ecb
Author: Feng Shu 
Commit: Feng Shu 

Add ivy-posframe-read-action and ivy-posframe-dispatching-done
---
 README.md   | 37 ---
 ivy-posframe.el | 69 -
 2 files changed, 83 insertions(+), 23 deletions(-)

diff --git a/README.md b/README.md
index ae75cea..ed8014c 100644
--- a/README.md
+++ b/README.md
@@ -1,21 +1,23 @@
+Note: this file is converted from ivy-posframe.el by 
[el2org](https://github.com/tumashu/el2org), please do not edit it by hand!!!
+
 
 # 目录
 
-1.  [ivy-posframe README](#orgf04a3ef)
-1.  [What is ivy-posframe](#org9bf1330)
-2.  [Display functions](#orga76454a)
-3.  [How to enable ivy-posframe](#org422a15a)
-4.  [Tips](#org80ae3b7)
-1.  [How to show fringe to ivy-posframe](#org1592d0f)
-2.  [How to custom your ivy-posframe style](#org0aa3f21)
+1.  [ivy-posframe README](#orgcfa545c)
+1.  [What is ivy-posframe](#org3c6ad89)
+2.  [Display functions](#orgda8366d)
+3.  [How to enable ivy-posframe](#org4d648e7)
+4.  [Tips](#orgcef74d7)
+1.  [How to show fringe to ivy-posframe](#org7a32697)
+2.  [How to custom your ivy-posframe style](#org06a0215)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -25,7 +27,7 @@ to show its candidate menu.
 NOTE: ivy-posframe requires Emacs 26
 
 
-
+
 
 ## Display functions
 
@@ -41,13 +43,14 @@ NOTE: ivy-posframe requires Emacs 26
 ![img](./snapshots/ivy-posframe-display-at-point.gif)
 
 
-
+
 
 ## How to enable ivy-posframe
 
 1.  Global mode
 
 (require 'ivy-posframe)
+(ivy-posframe-setup)
 (setq ivy-display-function #'ivy-posframe-display)
 ;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
 ;; (setq ivy-display-function #'ivy-posframe-display-at-window-center)
@@ -57,21 +60,23 @@ NOTE: ivy-posframe requires Emacs 26
 2.  Per-command mode.
 
 (require 'ivy-posframe)
+(ivy-posframe-setup)
 ;; Different command can use different display function.
 (push '(counsel-M-x . ivy-posframe-display-at-window-bottom-left) 
ivy-display-functions-alist)
 (push '(complete-symbol . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
 3.  Fallback mode
 
 (require 'ivy-posframe)
+(ivy-posframe-setup)
 (push '(t . ivy-posframe-display) ivy-display-functions-alist)
 
 
-
+
 
 ## Tips
 
 
-
+
 
 ### How to show fringe to ivy-posframe
 
@@ -83,7 +88,7 @@ By the way, User can set **any** parameters of ivy-posframe 
with
 the help of \`ivy-posframe-parameters'.
 
 
-
+
 
 ### How to custom your ivy-posframe style
 
@@ -92,7 +97,3 @@ The simplest way is:
 (defun ivy-posframe-display-at-XXX (str)
   (ivy-posframe--display str #'your-own-poshandler-function))
 (ivy-posframe-setup) ; This line is needed.
-
-
-
-Converted from ivy-posframe.el by [el2org](https://github.com/tumashu/el2org) .
\ No newline at end of file
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 63a9f7a..4ca9fb9 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -51,6 +51,7 @@
 ;; 1. Global mode
 ;;#+BEGIN_EXAMPLE
 ;;(require 'ivy-posframe)
+;;(ivy-posframe-setup)
 ;;(setq ivy-display-function #'ivy-posframe-display)
 ;;;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
 ;;;; (setq ivy-display-function #'ivy-posframe-display-at-window-center)
@@ -61,6 +62,7 @@
 ;; 2. Per-command mode.
 ;;#+BEGIN_EXAMPLE
 ;;(require 'ivy-posframe)
+;;(ivy-posframe-setup)
 ;;;; Different command can use different display function.
 ;;(push '(counsel-M-x . ivy-posframe-display-at-window-bottom-left) 
ivy-display-functions-alist)
 ;;(push '(complete-symbol . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
@@ -68,6 +70,7 @@
 ;; 3. Fallback mode
 ;;#+BEGIN_EXAMPLE
 ;;(require 'ivy-posframe)
+;;(ivy-posframe-setup)
 ;;(push '(t . ivy-posframe-display) ivy-display-functions-alist)
 ;;#+END_EXAMPLE
 
@@ -127,6 +130,10 @@ When nil, Using current frame's font as fallback."
 (defvar ivy-posframe-buffer " *ivy-posframe-buffer*"
   "The posframe-buffer used by ivy-posframe.")
 
+(defvar ivy-posframe--ignore-prompt nil
+  "When non-nil, ivy-posframe will ignore prompt.
+This variable is useful for `ivy-posframe-read-action' .")
+
 ;; Fix warn
 (defvar emacs-basic-display)
 
@@ -139,8 +146,10 @@ When nil, Using current frame's font as fallback."
ivy-posframe-buffer
:font ivy-posframe-font
:string
-   (with-current-buffer (get-buffer-create " *Minibuf-1*")
- (concat (buffer-string) "  " str))
+   (if ivy-posframe--ignore-prompt
+   str
+ (with-current-buffer (get-buffer-create " *Minibuf-1*")
+   (concat (buffer-string) "  " str)))
:position (point)
:poshandler poshandle

[elpa] externals/ivy-posframe 266d622 042/195: Set ivy-posframe-cursor as mulitcursor

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 266d622debcba214e62f164afbde82b19e57354c
Author: Feng Shu 
Commit: Feng Shu 

Set ivy-posframe-cursor as mulitcursor
---
 ivy-posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 861c595..2828a79 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -128,7 +128,7 @@ When nil, Using current frame's font as fallback."
   :group 'ivy-posframe)
 
 (defface ivy-posframe-cursor
-  '((t (:inherit cursor)))
+  `((t (:height 1 :background ,(face-attribute 'cursor :background
   "Face used by the ivy-posframe's fake cursor."
   :group 'ivy-posframe)
 



[elpa] externals/ivy-posframe 8be3311 047/195: ivy-posframe do not support mouse click

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 8be3311d59e9be48e0440b3ebc539d24bc692b9e
Author: Feng Shu 
Commit: Feng Shu 

ivy-posframe do not support mouse click
---
 README.md   | 40 +---
 ivy-posframe.el |  3 ++-
 2 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/README.md b/README.md
index 5663595..8d2fc87 100644
--- a/README.md
+++ b/README.md
@@ -1,33 +1,34 @@
-Note: this file is converted from ivy-posframe.el by 
[el2org](https://github.com/tumashu/el2org), please do not edit it by hand!!!
+Note: this file is auto converted from ivy-posframe.el by 
[el2org](https://github.com/tumashu/el2org), please do not edit it by hand!!!
 
 
 # 目录
 
-1.  [ivy-posframe README](#org7f9a5fe)
-1.  [What is ivy-posframe](#org5057226)
-2.  [Display functions](#orgbde602c)
-3.  [How to enable ivy-posframe](#org6bfc45d)
-4.  [Tips](#orgd52c7c9)
-1.  [How to show fringe to ivy-posframe](#orga286c1f)
-2.  [How to custom your ivy-posframe style](#orgf8a38da)
+1.  [ivy-posframe README](#orga0194dc)
+1.  [What is ivy-posframe](#org9479e4f)
+2.  [Display functions](#org77c90ff)
+3.  [How to enable ivy-posframe](#orgbdb78e5)
+4.  [Tips](#orgd370bc2)
+1.  [How to show fringe to ivy-posframe](#orgdefc2c7)
+2.  [How to custom your ivy-posframe style](#org34f3a1d)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
 ivy-posframe is a ivy extension, which let ivy use posframe
 to show its candidate menu.
 
-NOTE: ivy-posframe requires Emacs 26
+NOTE: ivy-posframe requires Emacs 26 and do not support
+mouse click.
 
 
-
+
 
 ## Display functions
 
@@ -43,12 +44,12 @@ NOTE: ivy-posframe requires Emacs 26
 ![img](./snapshots/ivy-posframe-display-at-point.gif)
 
 
-
+
 
 ## How to enable ivy-posframe
 
 1.  Global mode
-
+
 (require 'ivy-posframe)
 (setq ivy-display-function #'ivy-posframe-display)
 ;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
@@ -58,25 +59,25 @@ NOTE: ivy-posframe requires Emacs 26
 ;; (setq ivy-display-function #'ivy-posframe-display-at-point)
 (ivy-posframe-enable)
 2.  Per-command mode.
-
+
 (require 'ivy-posframe)
 ;; Different command can use different display function.
 (push '(counsel-M-x . ivy-posframe-display-at-window-bottom-left) 
ivy-display-functions-alist)
 (push '(complete-symbol . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
 (ivy-posframe-enable)
 3.  Fallback mode
-
+
 (require 'ivy-posframe)
 (push '(t . ivy-posframe-display) ivy-display-functions-alist)
 (ivy-posframe-enable)
 
 
-
+
 
 ## Tips
 
 
-
+
 
 ### How to show fringe to ivy-posframe
 
@@ -88,7 +89,7 @@ By the way, User can set **any** parameters of ivy-posframe 
with
 the help of \`ivy-posframe-parameters'.
 
 
-
+
 
 ### How to custom your ivy-posframe style
 
@@ -97,3 +98,4 @@ The simplest way is:
 (defun ivy-posframe-display-at-XXX (str)
   (ivy-posframe--display str #'your-own-poshandler-function))
 (ivy-posframe-enable) ; This line is needed.
+
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 7f49589..7931a2d 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -33,7 +33,8 @@
 ;; ivy-posframe is a ivy extension, which let ivy use posframe
 ;; to show its candidate menu.
 
-;; NOTE: ivy-posframe requires Emacs 26
+;; NOTE: ivy-posframe requires Emacs 26 and do not support
+;; mouse click.
 
 ;; ** Display functions
 



[elpa] externals/ivy-posframe 26e3a64 034/195: ivy-posframe: add ivy-posframe-avy

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 26e3a64c60eab2239db1f09dcbe951c690f4b24e
Author: Feng Shu 
Commit: Feng Shu 

ivy-posframe: add ivy-posframe-avy

ivy-avy is not supported by ivy-posframe at the moment.
---
 ivy-posframe.el | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 4ca9fb9..701d86b 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -213,7 +213,8 @@ This variable is useful for `ivy-posframe-read-action' .")
ivy-display-functions-props
   ;; Re-configure ivy keymap.
   (define-key ivy-minibuffer-map (kbd "C-M-a") 'ivy-posframe-read-action)
-  (define-key ivy-minibuffer-map (kbd "M-o") 'ivy-posframe-dispatching-done))
+  (define-key ivy-minibuffer-map (kbd "M-o") 'ivy-posframe-dispatching-done)
+  (define-key ivy-minibuffer-map (kbd "C-'") 'ivy-posframe-avy))
 
 (defun ivy-posframe-dispatching-done ()
   "Select one of the available actions and call `ivy-done'."
@@ -261,6 +262,11 @@ selection, non-nil otherwise."
(setcar actions (1+ action-idx))
(ivy-set-action actions)))
 
+(defun ivy-posframe-avy ()
+  "Jump to one of the current ivy candidates."
+  (interactive)
+  (message "ivy-posframe: ivy-avy is not supported at the moment."))
+
 
 (provide 'ivy-posframe)
 



[elpa] externals/ivy-posframe 3d98dbd 048/195: Add ivy-posframe-hide-minibuffer feature, fix #12

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 3d98dbde1d9b1b170b87828d34d068c358de591d
Author: Feng Shu 
Commit: Feng Shu 

Add ivy-posframe-hide-minibuffer feature, fix #12
---
 ivy-posframe.el | 19 ++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 7931a2d..ce7c97f 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -144,6 +144,11 @@ When 0, no border is showed."
   :group 'ivy-posframe
   :type 'number)
 
+(defcustom ivy-posframe-hide-minibuffer nil
+  "Hide input of minibuffer when using ivy-posframe."
+  :group 'ivy-posframe
+  :type 'boolean)
+
 (defcustom ivy-posframe-parameters nil
   "The frame parameters used by ivy-posframe."
   :group 'ivy-posframe
@@ -287,6 +292,17 @@ selection, non-nil otherwise."
   (interactive)
   (message "ivy-posframe: ivy-avy is not supported at the moment."))
 
+(defun ivy-posframe--minibuffer-setup (orig-func)
+  "Advice function of `ivy--minibuffer-setup'."
+  (funcall orig-func)
+  (when ivy-posframe-hide-minibuffer
+(let ((ov (make-overlay (point-min) (point-max) nil nil t)))
+  (overlay-put ov 'window (selected-window))
+  (overlay-put ov 'face
+   (let ((bg-color (face-background 'default nil)))
+ `(:background ,bg-color :foreground ,bg-color)))
+  (setq-local cursor-type nil
+
 ;;;###autoload
 (defun ivy-posframe-enable ()
   "Enable ivy-posframe."
@@ -296,7 +312,8 @@ selection, non-nil otherwise."
   (define-key ivy-minibuffer-map (kbd "C-M-a") 'ivy-posframe-read-action)
   (define-key ivy-minibuffer-map (kbd "M-o") 'ivy-posframe-dispatching-done)
   (define-key ivy-minibuffer-map (kbd "C-'") 'ivy-posframe-avy)
-  (message "ivy-posframe is enabled."))
+  (advice-add 'ivy--minibuffer-setup :around #'ivy-posframe--minibuffer-setup)
+  (message "ivy-posframe is enabled, disabling it need to reboot emacs."))
 
 (defun ivy-posframe-setup ()
   "Add all display functions of ivy-posframe to



[elpa] externals/ivy-posframe b37e713 041/195: Merge pull request #10 from drrlvn/patch-1

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit b37e7135f308149831867eb59625e4090f6d43ca
Merge: 0989e42 9f6b58d
Author: tumashu 
Commit: GitHub 

Merge pull request #10 from drrlvn/patch-1

Cursor face inherits from regular cursor face
---
 ivy-posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index d7b30d0..861c595 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -128,7 +128,7 @@ When nil, Using current frame's font as fallback."
   :group 'ivy-posframe)
 
 (defface ivy-posframe-cursor
-  '((t (:inherit default :background "#00")))
+  '((t (:inherit cursor)))
   "Face used by the ivy-posframe's fake cursor."
   :group 'ivy-posframe)
 



[elpa] externals/ivy-posframe 5312e07 031/195: Add ivy-posframe-parameters

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 5312e07686ecf2ab5877046ea263bb7645654a6a
Author: Feng Shu 
Commit: Feng Shu 

Add ivy-posframe-parameters
---
 README.md   | 41 ++---
 ivy-posframe.el | 22 --
 2 files changed, 50 insertions(+), 13 deletions(-)

diff --git a/README.md b/README.md
index 296cb54..ad29c35 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,21 @@
 
 # 目录
 
-1.  [ivy-posframe README](#orgcc900c2)
-1.  [What is ivy-posframe](#org5f83be3)
-2.  [Display functions](#org24f03db)
-3.  [How to enable ivy-posframe](#orgcedf7a7)
-4.  [How to custom your ivy-posframe style](#org7b3c825)
+1.  [ivy-posframe README](#org097ddbf)
+1.  [What is ivy-posframe](#org670ef83)
+2.  [Display functions](#org67ff507)
+3.  [How to enable ivy-posframe](#orgd00569f)
+4.  [Tips](#org326cf4c)
+1.  [How to show fringe to ivy-posframe](#org3d2991d)
+2.  [How to custom your ivy-posframe style](#orgbeec1d0)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -23,7 +25,7 @@ to show its candidate menu.
 NOTE: ivy-posframe requires Emacs 26
 
 
-
+
 
 ## Display functions
 
@@ -39,7 +41,7 @@ NOTE: ivy-posframe requires Emacs 26
 ![img](./snapshots/ivy-posframe-display-at-point.gif)
 
 
-
+
 
 ## How to enable ivy-posframe
 
@@ -64,9 +66,26 @@ NOTE: ivy-posframe requires Emacs 26
 (push '(t . ivy-posframe-display) ivy-display-functions-alist)
 
 
-
+
 
-## How to custom your ivy-posframe style
+## Tips
+
+
+
+
+### How to show fringe to ivy-posframe
+
+(setq ivy-posframe-extra-parameters
+  '((left-fringe . 10)
+(right-fringe . 10)))
+
+By the way, User can set **any** parameters of ivy-posframe with
+the help of \`ivy-posframe-parameters'.
+
+
+
+
+### How to custom your ivy-posframe style
 
 The simplest way is:
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 9f2d8bf..acadd9e 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -71,7 +71,19 @@
 ;;(push '(t . ivy-posframe-display) ivy-display-functions-alist)
 ;;#+END_EXAMPLE
 
-;; ** How to custom your ivy-posframe style
+;; ** Tips
+
+;; *** How to show fringe to ivy-posframe
+;; ;; #+BEGIN_EXAMPLE
+;; (setq ivy-posframe-extra-parameters
+;;   '((left-fringe . 10)
+;; (right-fringe . 10)))
+;; ;; #+END_EXAMPLE
+
+;; By the way, User can set *any* parameters of ivy-posframe with
+;; the help of `ivy-posframe-parameters'.
+
+;; *** How to custom your ivy-posframe style
 
 ;; The simplest way is:
 ;; ;; #+BEGIN_EXAMPLE
@@ -102,6 +114,11 @@ When nil, Using current frame's font as fallback."
   :group 'ivy-posframe
   :type 'string)
 
+(defcustom ivy-posframe-parameters nil
+  "The frame parameters used by ivy-posframe."
+  :group 'ivy-posframe
+  :type 'string)
+
 (defface ivy-posframe
   '((t (:inherit default :background "#33" :foreground "#dcdccc")))
   "Face used by the ivy-posframe."
@@ -130,7 +147,8 @@ When nil, Using current frame's font as fallback."
:foreground-color (face-attribute 'ivy-posframe :foreground)
:height ivy-height
:min-height 10
-   :min-width 50
+   :min-width 50
+   :override-parameters ivy-posframe-parameters
 
 (defun ivy-posframe-display (str)
   (let ((func (intern (format "ivy-posframe-display-at-%s"



[elpa] externals/ivy-posframe ba42fec 019/195: Fix warn

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit ba42fecc20fe61bec26b582011a1b473a0f47819
Author: Feng Shu 
Commit: Feng Shu 

Fix warn
---
 ivy-posframe.el | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 6c1078d..64de112 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -85,11 +85,13 @@
 (defcustom ivy-posframe-font nil
   "The font used by ivy-posframe.
 When nil, Using current frame's font as fallback."
-  :group 'ivy-posframe)
+  :group 'ivy-posframe
+  :type 'string)
 
 (defcustom ivy-posframe-style 'window-buttom-left
   "The style of ivy-posframe."
-  :group 'ivy-posframe)
+  :group 'ivy-posframe
+  :type 'string)
 
 (defface ivy-posframe
   '((t (:inherit default :background "#33" :foreground "#dcdccc")))
@@ -107,6 +109,9 @@ When nil, Using current frame's font as fallback."
 (point . posframe-poshandler-point-bottom-left-corner))
   "Alist of ivy posframe styles.")
 
+;; Fix warn
+(defvar emacs-basic-display)
+
 (defun ivy-posframe-display (str)
   "Show STR in ivy's posframe."
   (if (not (ivy-posframe-workable-p))



[elpa] externals/ivy-posframe 3784f59 054/195: ivy-posframe.el (ivy-posframe-avy): Simplify

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 3784f593f7260a392f1646e8aeb583cdf23f25d7
Author: Oleh Krehel 
Commit: Oleh Krehel 

ivy-posframe.el (ivy-posframe-avy): Simplify
---
 ivy-posframe.el | 47 ---
 1 file changed, 4 insertions(+), 43 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index f8675e1..8304c6a 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -287,13 +287,6 @@ selection, non-nil otherwise."
(setcar actions (1+ action-idx))
(ivy-set-action actions)))
 
-(defun ivy-posframe--avy-action (pt)
-  "Finish ivy session with the candidate at PT."
-  (with-current-buffer ivy-posframe-buffer
-(ivy--done
- (substring-no-properties
-  (nth (- (line-number-at-pos pt) 2) ivy--old-cands)
-
 (defun ivy-posframe--window ()
   "Return the posframe window displaying `ivy-posframe-buffer'."
   (frame-selected-window
@@ -302,46 +295,14 @@ selection, non-nil otherwise."
 
 (defvar avy-all-windows)
 (defvar avy-keys)
-(defvar avy-keys-alist)
 (defvar avy-style)
-(defvar avy-styles-alist)
-(defvar avy-action)
-(declare-function avy--process "avy")
-(declare-function avy--style-fn "avy")
+
 (defun ivy-posframe-avy ()
   "Jump to one of the current ivy candidates."
   (interactive)
-  (unless (require 'avy nil 'noerror)
-(error "Package avy isn't installed"))
-  (unless (boundp 'avy-pre-action)
-(error "A newer version of avy is required for this command"))
-  (let* ((avy-all-windows nil)
- (avy-keys (or (cdr (assq 'ivy-avy avy-keys-alist))
-   avy-keys))
- (avy-style (or (cdr (assq 'ivy-avy
-   avy-styles-alist))
-avy-style))
- ;; prevent default pre action, which calls
- ;; `select-frame-set-input-focus', deselecting the minibuffer and
- ;; causing `ivy-posframe-cleanup' to run prematurely
- (avy-pre-action #'ignore)
- (window (ivy-posframe--window))
- candidates)
-(with-current-buffer ivy-posframe-buffer
-  (save-excursion
-(save-restriction
-  (narrow-to-region
-   (window-start window)
-   (window-end window))
-  (goto-char (point-min))
-  (forward-line)
-  (while (< (point) (point-max))
-(push (cons (point) window) candidates)
-(forward-line)
-(setq avy-action #'ivy-posframe--avy-action)
-(avy--process
- (nreverse candidates)
- (avy--style-fn avy-style
+  (let ((avy-pre-action #'ignore))
+(with-selected-window (ivy-posframe--window)
+  (ivy-avy
 
 (declare-function avy--make-backgrounds "avy")
 (declare-function avy-window-list "avy")



[elpa] externals/ivy-posframe 04d3719 037/195: Update README

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 04d3719c54866e9712140437fc89ae4cdd0a479b
Author: Feng Shu 
Commit: Feng Shu 

Update README
---
 README.md   | 34 +-
 ivy-posframe.el |  6 +++---
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/README.md b/README.md
index 53f2855..5663595 100644
--- a/README.md
+++ b/README.md
@@ -3,21 +3,21 @@ Note: this file is converted from ivy-posframe.el by 
[el2org](https://github.com
 
 # 目录
 
-1.  [ivy-posframe README](#org73a5a3f)
-1.  [What is ivy-posframe](#org711a00d)
-2.  [Display functions](#org8ff600c)
-3.  [How to enable ivy-posframe](#orgedfde9d)
-4.  [Tips](#org7fbf393)
-1.  [How to show fringe to ivy-posframe](#org79a88f5)
-2.  [How to custom your ivy-posframe style](#orgd33a170)
+1.  [ivy-posframe README](#org7f9a5fe)
+1.  [What is ivy-posframe](#org5057226)
+2.  [Display functions](#orgbde602c)
+3.  [How to enable ivy-posframe](#org6bfc45d)
+4.  [Tips](#orgd52c7c9)
+1.  [How to show fringe to ivy-posframe](#orga286c1f)
+2.  [How to custom your ivy-posframe style](#orgf8a38da)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -27,7 +27,7 @@ to show its candidate menu.
 NOTE: ivy-posframe requires Emacs 26
 
 
-
+
 
 ## Display functions
 
@@ -43,40 +43,40 @@ NOTE: ivy-posframe requires Emacs 26
 ![img](./snapshots/ivy-posframe-display-at-point.gif)
 
 
-
+
 
 ## How to enable ivy-posframe
 
 1.  Global mode
 
 (require 'ivy-posframe)
-(ivy-posframe-enable)
 (setq ivy-display-function #'ivy-posframe-display)
 ;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
 ;; (setq ivy-display-function #'ivy-posframe-display-at-window-center)
 ;; (setq ivy-display-function 
#'ivy-posframe-display-at-frame-bottom-left)
 ;; (setq ivy-display-function 
#'ivy-posframe-display-at-window-bottom-left)
 ;; (setq ivy-display-function #'ivy-posframe-display-at-point)
+(ivy-posframe-enable)
 2.  Per-command mode.
 
 (require 'ivy-posframe)
-(ivy-posframe-enable)
 ;; Different command can use different display function.
 (push '(counsel-M-x . ivy-posframe-display-at-window-bottom-left) 
ivy-display-functions-alist)
 (push '(complete-symbol . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
+(ivy-posframe-enable)
 3.  Fallback mode
 
 (require 'ivy-posframe)
-(ivy-posframe-enable)
 (push '(t . ivy-posframe-display) ivy-display-functions-alist)
+(ivy-posframe-enable)
 
 
-
+
 
 ## Tips
 
 
-
+
 
 ### How to show fringe to ivy-posframe
 
@@ -88,7 +88,7 @@ By the way, User can set **any** parameters of ivy-posframe 
with
 the help of \`ivy-posframe-parameters'.
 
 
-
+
 
 ### How to custom your ivy-posframe style
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 5985ed5..ce615ed 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -51,27 +51,27 @@
 ;; 1. Global mode
 ;;#+BEGIN_EXAMPLE
 ;;(require 'ivy-posframe)
-;;(ivy-posframe-enable)
 ;;(setq ivy-display-function #'ivy-posframe-display)
 ;;;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
 ;;;; (setq ivy-display-function #'ivy-posframe-display-at-window-center)
 ;;;; (setq ivy-display-function 
#'ivy-posframe-display-at-frame-bottom-left)
 ;;;; (setq ivy-display-function 
#'ivy-posframe-display-at-window-bottom-left)
 ;;;; (setq ivy-display-function #'ivy-posframe-display-at-point)
+;;(ivy-posframe-enable)
 ;;#+END_EXAMPLE
 ;; 2. Per-command mode.
 ;;#+BEGIN_EXAMPLE
 ;;(require 'ivy-posframe)
-;;(ivy-posframe-enable)
 ;;;; Different command can use different display function.
 ;;(push '(counsel-M-x . ivy-posframe-display-at-window-bottom-left) 
ivy-display-functions-alist)
 ;;(push '(complete-symbol . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
+;;(ivy-posframe-enable)
 ;;#+END_EXAMPLE
 ;; 3. Fallback mode
 ;;#+BEGIN_EXAMPLE
 ;;(require 'ivy-posframe)
-;;(ivy-posframe-enable)
 ;;(push '(t . ivy-posframe-display) ivy-display-functions-alist)
+;;(ivy-posframe-enable)
 ;;#+END_EXAMPLE
 
 ;; ** Tips



[elpa] externals/ivy-posframe 061a125 030/195: Re-add ivy-posframe-style for compatible

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 061a12550c5b7c75b345c4005c80b67436693608
Author: Feng Shu 
Commit: Feng Shu 

Re-add ivy-posframe-style for compatible
---
 README.md   | 24 
 ivy-posframe.el | 15 ---
 2 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/README.md b/README.md
index ba5e89c..296cb54 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,19 @@
 
 # 目录
 
-1.  [ivy-posframe README](#orgad72029)
-1.  [What is ivy-posframe](#orgf3fce48)
-2.  [Display functions](#org1420034)
-3.  [How to enable ivy-posframe](#orgcd8666c)
-4.  [How to custom your ivy-posframe style](#org7c1f241)
+1.  [ivy-posframe README](#orgcc900c2)
+1.  [What is ivy-posframe](#org5f83be3)
+2.  [Display functions](#org24f03db)
+3.  [How to enable ivy-posframe](#orgcedf7a7)
+4.  [How to custom your ivy-posframe style](#org7b3c825)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -23,7 +23,7 @@ to show its candidate menu.
 NOTE: ivy-posframe requires Emacs 26
 
 
-
+
 
 ## Display functions
 
@@ -39,7 +39,7 @@ NOTE: ivy-posframe requires Emacs 26
 ![img](./snapshots/ivy-posframe-display-at-point.gif)
 
 
-
+
 
 ## How to enable ivy-posframe
 
@@ -64,15 +64,15 @@ NOTE: ivy-posframe requires Emacs 26
 (push '(t . ivy-posframe-display) ivy-display-functions-alist)
 
 
-
+
 
 ## How to custom your ivy-posframe style
 
 The simplest way is:
 
 (defun ivy-posframe-display-at-XXX (str)
-  (ivy-posframe-display str 'your-own-poshandler-function))
-(ivy-posframe-setup) ; This line is need.
+  (ivy-posframe--display str #'your-own-poshandler-function))
+(ivy-posframe-setup) ; This line is needed.
 
 
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 622ba41..9f2d8bf 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -76,8 +76,8 @@
 ;; The simplest way is:
 ;; ;; #+BEGIN_EXAMPLE
 ;; (defun ivy-posframe-display-at-XXX (str)
-;;   (ivy-posframe-display str 'your-own-poshandler-function))
-;; (ivy-posframe-setup) ; This line is need.
+;;   (ivy-posframe--display str #'your-own-poshandler-function))
+;; (ivy-posframe-setup) ; This line is needed.
 ;; ;; #+END_EXAMPLE
 
 ;;; Code:
@@ -91,6 +91,11 @@
   :group 'ivy
   :prefix "ivy-posframe")
 
+(defcustom ivy-posframe-style 'window-bottom-left
+  "The style of ivy-posframe."
+  :group 'ivy-posframe
+  :type 'string)
+
 (defcustom ivy-posframe-font nil
   "The font used by ivy-posframe.
 When nil, Using current frame's font as fallback."
@@ -128,7 +133,11 @@ When nil, Using current frame's font as fallback."
:min-width 50
 
 (defun ivy-posframe-display (str)
-  (ivy-posframe--display str #'posframe-poshandler-frame-bottom-left-corner))
+  (let ((func (intern (format "ivy-posframe-display-at-%s"
+  ivy-posframe-style
+(if (functionp func)
+(funcall func str)
+  (ivy-posframe-display-at-frame-bottom-left str
 
 (defun ivy-posframe-display-at-window-center (str)
   (ivy-posframe--display str #'posframe-poshandler-window-center))



[elpa] externals/ivy-posframe 187d14b 053/195: ivy-posframe.el (ivy-posframe--display): Simplify

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 187d14b3567c1b9d1cde0bbcd7308c30f068f85e
Author: Oleh Krehel 
Commit: Oleh Krehel 

ivy-posframe.el (ivy-posframe--display): Simplify

Try to avoid using `ivy--*' functions.
---
 ivy-posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 0a323d1..f8675e1 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -178,7 +178,7 @@ This variable is useful for `ivy-posframe-read-action' .")
   "Show STR in ivy's posframe."
   (if (not (ivy-posframe-workable-p))
   (ivy-display-function-fallback str)
-(with-selected-window (ivy--get-window ivy-last)
+(with-ivy-window
   (posframe-show
ivy-posframe-buffer
:font ivy-posframe-font



[elpa] externals/ivy-posframe 7e871bd 022/195: Fix type: buttom -> bottom

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 7e871bd85c9e677fa0940727daa945f18accd7f5
Author: Feng Shu 
Commit: Feng Shu 

Fix type: buttom -> bottom
---
 ivy-posframe.el | 32 
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 10b6b18..1f1f4f8 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -39,8 +39,8 @@
 ;; 1. ivy-posframe-display
 ;; 2. ivy-posframe-display-at-frame-center
 ;; 3. ivy-posframe-display-at-window-center
-;; 4. ivy-posframe-display-at-frame-buttom-left
-;; 5. ivy-posframe-display-at-window-buttom-left
+;; 4. ivy-posframe-display-at-frame-bottom-left
+;; 5. ivy-posframe-display-at-window-bottom-left
 ;; 6. ivy-posframe-display-at-point
 
 ;; ** How to enable ivy-posframe
@@ -50,15 +50,15 @@
 ;;(setq ivy-display-function #'ivy-posframe-display)
 ;;;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
 ;;;; (setq ivy-display-function #'ivy-posframe-display-at-window-center)
-;;;; (setq ivy-display-function 
#'ivy-posframe-display-at-frame-buttom-left)
-;;;; (setq ivy-display-function 
#'ivy-posframe-display-at-window-buttom-left)
+;;;; (setq ivy-display-function 
#'ivy-posframe-display-at-frame-bottom-left)
+;;;; (setq ivy-display-function 
#'ivy-posframe-display-at-window-bottom-left)
 ;;;; (setq ivy-display-function #'ivy-posframe-display-at-point)
 ;;#+END_EXAMPLE
 ;; 2. Per-command mode.
 ;;#+BEGIN_EXAMPLE
 ;;(require 'ivy-posframe)
 ;;;; Different command can use different display function.
-;;(push '(counsel-M-x . ivy-posframe-display-at-window-buttom-left) 
ivy-display-functions-alist)
+;;(push '(counsel-M-x . ivy-posframe-display-at-window-bottom-left) 
ivy-display-functions-alist)
 ;;(push '(complete-symbol . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
 ;;#+END_EXAMPLE
 ;; 3. Fallback mode
@@ -70,9 +70,9 @@
 ;; If you use `ivy-posframe-display', you can use `ivy-posframe-style'
 ;; to set show style.
 
-;; 1. window-buttom-left style
+;; 1. window-bottom-left style
 ;;#+BEGIN_EXAMPLE
-;;(setq ivy-posframe-style 'window-buttom-left)
+;;(setq ivy-posframe-style 'window-bottom-left)
 ;;#+END_EXAMPLE
 ;;[[./snapshots/ivy-posframe1.gif]]
 ;; 2. Window-center style
@@ -96,8 +96,8 @@
 (dolist (f '(ivy-posframe-display
  ivy-posframe-display-at-frame-center
  ivy-posframe-display-at-window-center
- ivy-posframe-display-at-frame-buttom-left
- ivy-posframe-display-at-window-buttom-left
+ ivy-posframe-display-at-frame-bottom-left
+ ivy-posframe-display-at-window-bottom-left
  ivy-posframe-display-at-point))
   (push `(,f :cleanup ivy-posframe-cleanup)
 ivy-display-functions-props))
@@ -113,7 +113,7 @@ When nil, Using current frame's font as fallback."
   :group 'ivy-posframe
   :type 'string)
 
-(defcustom ivy-posframe-style 'window-buttom-left
+(defcustom ivy-posframe-style 'window-bottom-left
   "The style of ivy-posframe."
   :group 'ivy-posframe
   :type 'string)
@@ -129,8 +129,8 @@ When nil, Using current frame's font as fallback."
 (defvar ivy-posframe-style-alist
   '((window-center . posframe-poshandler-window-center)
 (frame-center  . posframe-poshandler-frame-center)
-(window-buttom-left . posframe-poshandler-window-bottom-left-corner)
-(frame-buttom-left . posframe-poshandler-frame-bottom-left-corner)
+(window-bottom-left . posframe-poshandler-window-bottom-left-corner)
+(frame-bottom-left . posframe-poshandler-frame-bottom-left-corner)
 (point . posframe-poshandler-point-bottom-left-corner))
   "Alist of ivy posframe styles.")
 
@@ -163,11 +163,11 @@ When nil, Using current frame's font as fallback."
 (defun ivy-posframe-display-at-frame-center (str)
   (ivy-posframe-display str 'frame-center))
 
-(defun ivy-posframe-display-at-window-buttom-left (str)
-  (ivy-posframe-display str 'window-buttom-left))
+(defun ivy-posframe-display-at-window-bottom-left (str)
+  (ivy-posframe-display str 'window-bottom-left))
 
-(defun ivy-posframe-display-at-frame-buttom-left (str)
-  (ivy-posframe-display str 'frame-buttom-left))
+(defun ivy-posframe-display-at-frame-bottom-left (str)
+  (ivy-posframe-display str 'frame-bottom-left))
 
 (defun ivy-posframe-display-at-point (str)
   (ivy-posframe-display str 'point))



[elpa] externals/ivy-posframe 0fdb1b6 066/195: Update snapshots

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 0fdb1b6038b16959a9e24eb52a272590c4718e41
Author: Feng Shu 
Commit: Feng Shu 

Update snapshots
---
 ivy-posframe.el|   8 
 snapshots/ivy-posframe-display-at-point.gif| Bin 111745 -> 0 bytes
 snapshots/ivy-posframe-display-at-point.png| Bin 0 -> 99526 bytes
 .../ivy-posframe-display-at-window-bottom-left.gif | Bin 313099 -> 0 bytes
 .../ivy-posframe-display-at-window-bottom-left.png | Bin 0 -> 99203 bytes
 snapshots/ivy-posframe-display-at-window-center.gif| Bin 180386 -> 0 bytes
 snapshots/ivy-posframe-display-at-window-center.png| Bin 0 -> 100356 bytes
 7 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 2ffba11..b5f6380 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -42,13 +42,13 @@
 ;; 1. ivy-posframe-display
 ;; 2. ivy-posframe-display-at-frame-center
 ;; 3. ivy-posframe-display-at-window-center
-;;[[./snapshots/ivy-posframe-display-at-window-center.gif]]
+;;[[./snapshots/ivy-posframe-display-at-window-center.png]]
 ;; 4. ivy-posframe-display-at-frame-bottom-left
 ;; 5. ivy-posframe-display-at-window-bottom-left
-;;[[./snapshots/ivy-posframe-display-at-window-bottom-left.gif]]
+;;[[./snapshots/ivy-posframe-display-at-window-bottom-left.png]]
 ;; 6. ivy-posframe-display-at-frame-bottom-window-center
 ;; 7. ivy-posframe-display-at-point
-;;[[./snapshots/ivy-posframe-display-at-point.gif]]
+;;[[./snapshots/ivy-posframe-display-at-point.png]]
 
 ;; ** How to enable ivy-posframe
 ;; *** Global mode
@@ -93,7 +93,7 @@
 
 ;; *** How to show a border
 ;; 1. M-x customize-face internal-border
-;; 2. (setq ivy-posframe-border-width 1)
+;; 2. (setq ivy-posframe-border-width 1) 
 
 ;; *** How to show fringe to ivy-posframe
 ;; ;; #+BEGIN_EXAMPLE
diff --git a/snapshots/ivy-posframe-display-at-point.gif 
b/snapshots/ivy-posframe-display-at-point.gif
deleted file mode 100644
index 270838c..000
Binary files a/snapshots/ivy-posframe-display-at-point.gif and /dev/null differ
diff --git a/snapshots/ivy-posframe-display-at-point.png 
b/snapshots/ivy-posframe-display-at-point.png
new file mode 100644
index 000..66f8f04
Binary files /dev/null and b/snapshots/ivy-posframe-display-at-point.png differ
diff --git a/snapshots/ivy-posframe-display-at-window-bottom-left.gif 
b/snapshots/ivy-posframe-display-at-window-bottom-left.gif
deleted file mode 100644
index d2203b9..000
Binary files a/snapshots/ivy-posframe-display-at-window-bottom-left.gif and 
/dev/null differ
diff --git a/snapshots/ivy-posframe-display-at-window-bottom-left.png 
b/snapshots/ivy-posframe-display-at-window-bottom-left.png
new file mode 100644
index 000..6e935cb
Binary files /dev/null and 
b/snapshots/ivy-posframe-display-at-window-bottom-left.png differ
diff --git a/snapshots/ivy-posframe-display-at-window-center.gif 
b/snapshots/ivy-posframe-display-at-window-center.gif
deleted file mode 100644
index 1c421ed..000
Binary files a/snapshots/ivy-posframe-display-at-window-center.gif and 
/dev/null differ
diff --git a/snapshots/ivy-posframe-display-at-window-center.png 
b/snapshots/ivy-posframe-display-at-window-center.png
new file mode 100644
index 000..d090a3d
Binary files /dev/null and 
b/snapshots/ivy-posframe-display-at-window-center.png differ



[elpa] externals/ivy-posframe e1624e7 027/195: ivy-posframe-display: style -> style-or-poshandler

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit e1624e7951d282f8c4767f6eaa1711c10b7d45ff
Author: Feng Shu 
Commit: Feng Shu 

ivy-posframe-display:  style -> style-or-poshandler
---
 ivy-posframe.el | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index bc47716..981e09f 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -132,7 +132,7 @@ When nil, Using current frame's font as fallback."
 ;; Fix warn
 (defvar emacs-basic-display)
 
-(defun ivy-posframe-display (str &optional style)
+(defun ivy-posframe-display (str &optional style-or-poshandler)
   "Show STR in ivy's posframe."
   (if (not (ivy-posframe-workable-p))
   (ivy-display-function-fallback str)
@@ -144,8 +144,11 @@ When nil, Using current frame's font as fallback."
(with-current-buffer (get-buffer-create " *Minibuf-1*")
  (concat (buffer-string) "  " str))
:position (point)
-   :poshandler (cdr (assq (or style ivy-posframe-style)
-  ivy-posframe-style-alist))
+   :poshandler
+   (if (functionp style-or-poshandler)
+   style-or-poshandler
+ (cdr (assq (or style-or-poshandler ivy-posframe-style)
+ivy-posframe-style-alist)))
:background-color (face-attribute 'ivy-posframe :background)
:foreground-color (face-attribute 'ivy-posframe :foreground)
:height ivy-height



[elpa] externals/ivy-posframe 15d9a9e 043/195: Revert "Set ivy-posframe-cursor as mulitcursor"

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 15d9a9eb9f528ea2f1fb1ea1038ba9093a9a6f46
Author: Feng Shu 
Commit: Feng Shu 

Revert "Set ivy-posframe-cursor as mulitcursor"

This reverts commit 266d622debcba214e62f164afbde82b19e57354c.
---
 ivy-posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 2828a79..861c595 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -128,7 +128,7 @@ When nil, Using current frame's font as fallback."
   :group 'ivy-posframe)
 
 (defface ivy-posframe-cursor
-  `((t (:height 1 :background ,(face-attribute 'cursor :background
+  '((t (:inherit cursor)))
   "Face used by the ivy-posframe's fake cursor."
   :group 'ivy-posframe)
 



[elpa] externals/ivy-posframe ff2578a 044/195: Add ivy-posframe-border-width

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit ff2578a044dbe3ba5711ed727cc778b5aa108676
Author: Feng Shu 
Commit: Feng Shu 

Add ivy-posframe-border-width
---
 ivy-posframe.el | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 861c595..6b2ec86 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -117,6 +117,12 @@ When nil, Using current frame's font as fallback."
   :group 'ivy-posframe
   :type 'string)
 
+(defcustom ivy-posframe-border-width 0
+  "The border width used by ivy-posframe.
+When 0, no border is showed."
+  :group 'ivy-posframe
+  :type 'number)
+
 (defcustom ivy-posframe-parameters nil
   "The frame parameters used by ivy-posframe."
   :group 'ivy-posframe
@@ -165,6 +171,7 @@ This variable is useful for `ivy-posframe-read-action' .")
:height ivy-height
:min-height 10
:min-width 50
+   :internal-border-width ivy-posframe-border-width
:override-parameters ivy-posframe-parameters
 
 (defun ivy-posframe-display (str)



[elpa] externals/ivy-posframe 9e01129 083/195: Remove ivy-posframe-setup

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 9e01129448c4fed0acfbf99a38981cb54179c697
Author: Feng Shu 
Commit: Feng Shu 

Remove ivy-posframe-setup
---
 ivy-posframe.el | 21 +
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index e6723b2..9b5b1bd 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -424,7 +424,15 @@ selection, non-nil otherwise."
   "Enable ivy-posframe."
   (interactive)
   (require 'ivy)
-  (ivy-posframe-setup)
+  ;; Add all display functions of ivy-posframe to
+  ;; `ivy-display-functions-props'.
+  (mapatoms
+   (lambda (func)
+ (when (and (functionp func)
+(string-match-p "^ivy-posframe-display" (symbol-name func))
+(not (assq func ivy-display-functions-props)))
+   (push `(,func :cleanup ivy-posframe-cleanup)
+ ivy-display-functions-props
   (define-key ivy-minibuffer-map
 [remap ivy-read-action] 'ivy-posframe-read-action)
   (define-key ivy-minibuffer-map
@@ -434,17 +442,6 @@ selection, non-nil otherwise."
   (advice-add 'ivy--minibuffer-setup :around #'ivy-posframe--minibuffer-setup)
   (message "ivy-posframe is enabled, disabling it need to reboot emacs."))
 
-(defun ivy-posframe-setup ()
-  "Add all display functions of ivy-posframe to
-`ivy-display-functions-props'."
-  (mapatoms
-   (lambda (func)
- (when (and (functionp func)
-(string-match-p "^ivy-posframe-display" (symbol-name func))
-(not (assq func ivy-display-functions-props)))
-   (push `(,func :cleanup ivy-posframe-cleanup)
- ivy-display-functions-props)
-
 (provide 'ivy-posframe)
 
 ;; Local Variables:



[elpa] externals/ivy-posframe cef74e6 021/195: Different command can set different ivy-posframe display function

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit cef74e68eaa4629f7c31e5b7038ef721f70aae21
Author: Feng Shu 
Commit: Feng Shu 

Different command can set different ivy-posframe display function
---
 README.md   | 41 +
 ivy-posframe.el | 52 +---
 2 files changed, 74 insertions(+), 19 deletions(-)

diff --git a/README.md b/README.md
index 96fe711..f82096e 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,18 @@
 
 # 目录
 
-1.  [ivy-posframe README](#org517c951)
-1.  [What is ivy-posframe](#org153958a)
-2.  [How to enable ivy-posframe](#orgfb35379)
-3.  [How to set the style of ivy-posframe](#orgdd1e7a6)
+1.  [ivy-posframe README](#org7b266e1)
+1.  [What is ivy-posframe](#org1c5b744)
+2.  [Display functions](#org2ebfad6)
+3.  [How to enable ivy-posframe](#orgf7e39d4)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -22,7 +22,19 @@ to show its candidate menu.
 NOTE: ivy-posframe requires Emacs 26
 
 
-
+
+
+## Display functions
+
+1.  ivy-posframe-display
+2.  ivy-posframe-display-at-frame-center
+3.  ivy-posframe-display-at-window-center
+4.  ivy-posframe-display-at-frame-buttom-left
+5.  ivy-posframe-display-at-window-buttom-left
+6.  ivy-posframe-display-at-point
+
+
+
 
 ## How to enable ivy-posframe
 
@@ -30,19 +42,24 @@ NOTE: ivy-posframe requires Emacs 26
 
 (require 'ivy-posframe)
 (setq ivy-display-function #'ivy-posframe-display)
+;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
+;; (setq ivy-display-function #'ivy-posframe-display-at-window-center)
+;; (setq ivy-display-function 
#'ivy-posframe-display-at-frame-buttom-left)
+;; (setq ivy-display-function 
#'ivy-posframe-display-at-window-buttom-left)
+;; (setq ivy-display-function #'ivy-posframe-display-at-point)
 2.  Per-command mode.
 
 (require 'ivy-posframe)
-(push '(counsel-M-x . ivy-posframe-display) 
ivy-display-functions-alist)
+;; Different command can use different display function.
+(push '(counsel-M-x . ivy-posframe-display-at-window-buttom-left) 
ivy-display-functions-alist)
+(push '(complete-symbol . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
 3.  Fallback mode
 
 (require 'ivy-posframe)
 (push '(t . ivy-posframe-display) ivy-display-functions-alist)
 
-
-
-
-## How to set the style of ivy-posframe
+If you use \`ivy-posframe-display', you can use \`ivy-posframe-style'
+to set show style.
 
 1.  window-buttom-left style
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 0724122..10b6b18 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -34,16 +34,32 @@
 
 ;; NOTE: ivy-posframe requires Emacs 26
 
+;; ** Display functions
+
+;; 1. ivy-posframe-display
+;; 2. ivy-posframe-display-at-frame-center
+;; 3. ivy-posframe-display-at-window-center
+;; 4. ivy-posframe-display-at-frame-buttom-left
+;; 5. ivy-posframe-display-at-window-buttom-left
+;; 6. ivy-posframe-display-at-point
+
 ;; ** How to enable ivy-posframe
 ;; 1. Global mode
 ;;#+BEGIN_EXAMPLE
 ;;(require 'ivy-posframe)
 ;;(setq ivy-display-function #'ivy-posframe-display)
+;;;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
+;;;; (setq ivy-display-function #'ivy-posframe-display-at-window-center)
+;;;; (setq ivy-display-function 
#'ivy-posframe-display-at-frame-buttom-left)
+;;;; (setq ivy-display-function 
#'ivy-posframe-display-at-window-buttom-left)
+;;;; (setq ivy-display-function #'ivy-posframe-display-at-point)
 ;;#+END_EXAMPLE
 ;; 2. Per-command mode.
 ;;#+BEGIN_EXAMPLE
 ;;(require 'ivy-posframe)
-;;(push '(counsel-M-x . ivy-posframe-display) ivy-display-functions-alist)
+;;;; Different command can use different display function.
+;;(push '(counsel-M-x . ivy-posframe-display-at-window-buttom-left) 
ivy-display-functions-alist)
+;;(push '(complete-symbol . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
 ;;#+END_EXAMPLE
 ;; 3. Fallback mode
 ;;#+BEGIN_EXAMPLE
@@ -51,7 +67,9 @@
 ;;(push '(t . ivy-posframe-display) ivy-display-functions-alist)
 ;;#+END_EXAMPLE
 
-;; ** How to set the style of ivy-posframe
+;; If you use `ivy-posframe-display', you can use `ivy-posframe-style'
+;; to set show style.
+
 ;; 1. window-buttom-left style
 ;;#+BEGIN_EXAMPLE
 ;;(setq ivy-posframe-style 'window-buttom-left)
@@ -75,9 +93,14 @@
 (require 'posframe)
 (require 'ivy)
 
-(push '(ivy-posframe-display
-:cleanup ivy-posframe-cleanup)
-  ivy-display-functions-props)
+(dolist (f '(ivy-posframe-display
+ ivy-posframe-display-at-frame-center
+ ivy-posframe-display-at-window-center
+ ivy-posframe-display-at-frame-buttom-left
+ ivy-posframe-display-at-window-buttom-left
+ ivy-posframe-display-at-point))
+  (push `(,f :cleanup ivy-posfr

[elpa] externals/ivy-posframe b92aaa1 046/195: Merge pull request #13 from samrayleung/feature-add-variable

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit b92aaa1c4695e2c6012cdbc1469b89e8c0dac4c2
Merge: ff2578a 60e1f99
Author: tumashu 
Commit: GitHub 

Merge pull request #13 from samrayleung/feature-add-variable

add variable to customize ivy-posframe style
---
 ivy-posframe.el | 27 ---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 6b2ec86..7f49589 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -1,5 +1,6 @@
 ;;; ivy-posframe.el --- Using posframe to show Ivy  -*- lexical-binding: t -*-
 
+
 ;; Copyright (C) 2017-2018 Free Software Foundation, Inc.
 
 ;; Author: Feng Shu
@@ -116,6 +117,25 @@
 When nil, Using current frame's font as fallback."
   :group 'ivy-posframe
   :type 'string)
+(defcustom ivy-posframe-width nil
+  "The width of ivy-posframe."
+  :group 'ivy-posframe
+  :type 'number)
+
+(defcustom ivy-posframe-height nil
+  "The height of ivy-posframe."
+  :group 'ivy-posframe
+  :type 'number)
+
+(defcustom ivy-posframe-min-width nil
+  "The width of ivy-min-posframe."
+  :group 'ivy-posframe
+  :type 'number)
+
+(defcustom ivy-posframe-min-height nil
+  "The height of ivy-min-posframe."
+  :group 'ivy-posframe
+  :type 'number)
 
 (defcustom ivy-posframe-border-width 0
   "The border width used by ivy-posframe.
@@ -168,9 +188,10 @@ This variable is useful for `ivy-posframe-read-action' .")
:poshandler poshandler
:background-color (face-attribute 'ivy-posframe :background)
:foreground-color (face-attribute 'ivy-posframe :foreground)
-   :height ivy-height
-   :min-height 10
-   :min-width 50
+   :height (or ivy-posframe-height ivy-height)
+   :width (or ivy-posframe-width (/ (window-width) 2))
+   :min-height (or ivy-posframe-min-height 10)
+   :min-width (or ivy-posframe-min-width 50)
:internal-border-width ivy-posframe-border-width
:override-parameters ivy-posframe-parameters
 



[elpa] externals/ivy-posframe 1f3dbf4 026/195: Add ivy-posframe-setup and use it.

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 1f3dbf41cda9745c4f67f333d9d305bce717f4c8
Author: Feng Shu 
Commit: Feng Shu 

Add ivy-posframe-setup and use it.
---
 ivy-posframe.el | 23 +--
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index cb748af..bc47716 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -94,16 +94,6 @@
 (require 'posframe)
 (require 'ivy)
 
-(dolist (f '(ivy-posframe-display
- ivy-posframe-display-at-frame-center
- ivy-posframe-display-at-window-center
- ivy-posframe-display-at-frame-bottom-left
- ivy-posframe-display-at-window-bottom-left
- ivy-posframe-display-at-frame-bottom-window-center
- ivy-posframe-display-at-point))
-  (push `(,f :cleanup ivy-posframe-cleanup)
-ivy-display-functions-props))
-
 (defgroup ivy-posframe nil
   "Using posframe to show ivy"
   :group 'ivy
@@ -192,6 +182,19 @@ When nil, Using current frame's font as fallback."
 emacs-basic-display
 (not (display-graphic-p))
 
+(defun ivy-posframe-setup ()
+  "Regedit all display functions of ivy-posframe to 
`ivy-display-functions-props'."
+  (interactive)
+  (mapatoms
+   #'(lambda (func)
+   (when (and (functionp func)
+  (string-match-p "^ivy-posframe-display" (symbol-name func))
+  (not (assq func ivy-display-functions-props)))
+ (push `(,func :cleanup ivy-posframe-cleanup)
+   ivy-display-functions-props)
+
+(ivy-posframe-setup)
+
 (provide 'ivy-posframe)
 
 ;; Local Variables:



[elpa] externals/ivy-posframe 704feb2 062/195: Let ivy-posframe only inhert default

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 704feb26e1920f3bdd8ef073f24e46a16e3872aa
Author: Feng Shu 
Commit: Feng Shu 

Let ivy-posframe only inhert default
---
 ivy-posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 35dd872..f183172 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -169,7 +169,7 @@ When 0, no border is showed."
   :type 'string)
 
 (defface ivy-posframe
-  '((t (:inherit default :background "#33" :foreground "#dcdccc")))
+  '((t (:inherit default)))
   "Face used by the ivy-posframe."
   :group 'ivy-posframe)
 



[elpa] externals/ivy-posframe 3c00455 050/195: Add ivy-posframe-swiper-avy

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 3c00455a233cff7a09274b975c77dfa602ea413b
Author: Fox Kiester 
Commit: Fox Kiester 

Add ivy-posframe-swiper-avy
---
 ivy-posframe.el | 95 +++--
 1 file changed, 92 insertions(+), 3 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 816a497..692600f 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -294,6 +294,12 @@ selection, non-nil otherwise."
  (substring-no-properties
   (nth (- (line-number-at-pos pt) 2) ivy--old-cands)
 
+(defun ivy-posframe--window ()
+  "Return the posframe window displaying `ivy-posframe-buffer'."
+  (frame-selected-window
+   (buffer-local-value 'posframe--frame
+   (get-buffer ivy-posframe-buffer
+
 (defvar avy-all-windows)
 (defvar avy-keys)
 (defvar avy-keys-alist)
@@ -315,13 +321,11 @@ selection, non-nil otherwise."
  (avy-style (or (cdr (assq 'ivy-avy
avy-styles-alist))
 avy-style))
- (window (frame-selected-window
-  (buffer-local-value 'posframe--frame
-  (get-buffer ivy-posframe-buffer
  ;; prevent default pre action, which calls
  ;; `select-frame-set-input-focus', deselecting the minibuffer and
  ;; causing `ivy-posframe-cleanup' to run prematurely
  (avy-pre-action #'ignore)
+ (window (ivy-posframe--window))
  candidates)
 (with-current-buffer ivy-posframe-buffer
   (save-excursion
@@ -339,6 +343,90 @@ selection, non-nil otherwise."
  (nreverse candidates)
  (avy--style-fn avy-style
 
+(declare-function avy--make-backgrounds "avy")
+(declare-function avy-window-list "avy")
+(declare-function avy-read-de-bruijn "avy")
+(declare-function avy-read "avy")
+(declare-function avy-tree "avy")
+(declare-function avy--overlay-post "avy")
+(declare-function avy--remove-leading-chars "avy")
+(declare-function avy-push-mark "avy")
+(declare-function avy--done "avy")
+(defun ivy-posframe--swiper-avy-candidate ()
+  (let* ((avy-all-windows nil)
+ ;; We'll have overlapping overlays, so we sort all the
+ ;; overlays in the visible region by their start, and then
+ ;; throw out non-Swiper overlays or overlapping Swiper
+ ;; overlays.
+ (visible-overlays (cl-sort (with-ivy-window
+  (overlays-in (window-start)
+   (window-end)))
+#'< :key #'overlay-start))
+ (min-overlay-start 0)
+ (overlays-for-avy (cl-remove-if-not
+(lambda (ov)
+  (when (and (>= (overlay-start ov)
+ min-overlay-start)
+ (memq (overlay-get ov 'face)
+   swiper-faces))
+(setq min-overlay-start (overlay-start ov
+visible-overlays))
+ (offset (if (eq (ivy-state-caller ivy-last) 'swiper) 1 0))
+ (window (ivy-posframe--window))
+ (candidates (nconc
+  (mapcar (lambda (ov)
+(cons (overlay-start ov)
+  (overlay-get ov 'window)))
+  overlays-for-avy)
+  (with-current-buffer ivy-posframe-buffer
+(save-excursion
+  (save-restriction
+(narrow-to-region (window-start window)
+  (window-end window))
+(goto-char (point-min))
+(forward-line)
+(let (cands)
+  (while (not (eobp))
+(push (cons (+ (point) offset) window)
+  cands)
+(forward-line))
+  cands)))
+(unwind-protect
+(prog2
+(avy--make-backgrounds
+ (append (avy-window-list)
+ (list (ivy-state-window ivy-last
+(if (eq avy-style 'de-bruijn)
+(avy-read-de-bruijn candidates avy-keys)
+  (avy-read (avy-tree candidates avy-keys)
+#'avy--overlay-post
+#'avy--remove-leading-chars))
+  (avy-push-mark))
+  (avy--done
+
+(declare-function avy-action-goto "avy")
+(declare-function avy-candidate-beg "avy")
+(defun ivy-posframe-swiper-avy ()
+  "Jump to one of the current swiper candidates."
+  (interactive)
+  (unless (require 'avy nil 'noerror)
+(error "Package avy isn't installed"))
+  (unless (string= ivy-text "")
+(let ((candidate (ivy-posfram

[elpa] externals/ivy-posframe bda3116 093/195: Merge pull request #40 from CeleritasCelery/prompt

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit bda3116e57382c1a084088969e1b6135ecb94c9a
Merge: bf6cf5d ba1bc4f
Author: tumashu 
Commit: GitHub 

Merge pull request #40 from CeleritasCelery/prompt

Update prompt in dynamic collections
---
 ivy-posframe.el | 26 +-
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index be8444a..27bb838 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -205,14 +205,7 @@ This variable is useful for `ivy-posframe-read-action' .")
   (posframe-show
ivy-posframe-buffer
:font ivy-posframe-font
-   :string
-   (with-current-buffer (window-buffer (active-minibuffer-window))
- (let ((point (point))
-   (string (if ivy-posframe--ignore-prompt
-   str
- (concat (buffer-string) "  " str
-   (add-text-properties (- point 1) point '(face ivy-posframe-cursor) 
string)
-   string))
+   :string str
:position (point)
:poshandler poshandler
:background-color (face-attribute 'ivy-posframe :background nil t)
@@ -223,7 +216,8 @@ This variable is useful for `ivy-posframe-read-action' .")
:min-width (or ivy-posframe-min-width (round (* (frame-width) 0.62)))
:internal-border-width ivy-posframe-border-width
:internal-border-color (face-attribute 'ivy-posframe-border :background 
nil t)
-   :override-parameters ivy-posframe-parameters
+   :override-parameters ivy-posframe-parameters))
+(ivy-posframe--add-prompt)))
 
 (defun ivy-posframe-display (str)
   (let ((func (intern (format "ivy-posframe-display-at-%s"
@@ -265,6 +259,19 @@ This variable is useful for `ivy-posframe-read-action' .")
   (when (ivy-posframe-read-action)
 (ivy-done)))
 
+(defun ivy-posframe--add-prompt ()
+  "Add the ivy prompt to the posframe."
+  (unless ivy-posframe--ignore-prompt
+(with-current-buffer (window-buffer (active-minibuffer-window))
+  (let ((point (point))
+(prompt (buffer-string)))
+(remove-text-properties 0 (length prompt) '(read-only nil) prompt)
+(with-current-buffer ivy-posframe-buffer
+  (goto-char (point-min))
+  (kill-line 1)
+  (insert prompt "  \n")
+  (add-text-properties point (1+ point) '(face 
ivy-posframe-cursor)))
+
 (defun ivy-posframe-read-action ()
   "Change the action to one of the available ones.
 
@@ -441,6 +448,7 @@ selection, non-nil otherwise."
   (define-key ivy-minibuffer-map [remap ivy-avy] 'ivy-posframe-avy)
   (define-key ivy-minibuffer-map [remap swiper-avy] 'ivy-posframe-swiper-avy)
   (advice-add 'ivy--minibuffer-setup :around #'ivy-posframe--minibuffer-setup)
+  (advice-add 'ivy--queue-exhibit :after #'ivy-posframe--add-prompt)
   (message "ivy-posframe is enabled, disabling it need to reboot emacs."))
 
 ;;;###autoload



[elpa] externals/ivy-posframe 6de9801 097/195: remove unneeded ivy require code

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 6de9801ae6d745bf9256713a8737bbc79d51c5e0
Author: conao3 
Commit: conao3 

remove unneeded ivy require code
---
 ivy-posframe.el | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 7628e24..ff9f6fd 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -431,7 +431,6 @@ selection, non-nil otherwise."
 (defun ivy-posframe-enable ()
   "Enable ivy-posframe."
   (interactive)
-  (require 'ivy)
   ;; Add all display functions of ivy-posframe to
   ;; `ivy-display-functions-props'.
   (mapatoms



[elpa] externals/ivy-posframe 0032ed4 130/195: define define-display-function macro instead of eval form

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 0032ed4625ea0df79b4b4f7e2122250f7f7a1c0a
Author: conao3 
Commit: conao3 

define define-display-function macro instead of eval form
---
 ivy-posframe.el | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index ba98b24..c8ebcee 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -278,14 +278,14 @@ This variable is useful for `ivy-posframe-read-action' .")
 (frame-bottom-left  . frame-bottom-left-corner)
 (point  . point-bottom-left-corner)))
 
-(eval
- `(progn
-,@(mapcar
-   (lambda (elm)
- `(defun ,(intern (format "ivy-posframe-display-at-%s" (car elm))) 
(str)
-,(format "Display STR via `posframe' at %s." (car elm))
-(ivy-posframe--display str #',(intern (format 
"posframe-poshandler-%s" (cdr elm))
-   ivy-posframe-display-function-alist)))
+(defmacro ivy-posframe-define-display-function (pair)
+  "Define display-function for ivy-posframe."
+  `(defun ,(intern (format "ivy-posframe-display-at-%s" (car pair))) (str)
+ ,(format "Display STR via `posframe' at %s." (car pair))
+ (ivy-posframe--display str #',(intern (format "posframe-poshandler-%s" 
(cdr pair))
+
+(mapc (lambda (elm) (ivy-posframe-define-display-function elm))
+  ivy-posframe-display-function-alist)
 
 (defun ivy-posframe-display-at-frame-bottom-window-center (str)
   "Display STR via `posframe' at frame-bottom-window-center."



[elpa] externals/ivy-posframe aae7322 119/195: use ivy-posframe-mode-map instead of define-key

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit aae7322334aafe67f409da3e5034556b50ddeaa8
Author: conao3 
Commit: conao3 

use ivy-posframe-mode-map instead of define-key
---
 ivy-posframe.el | 17 ++---
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index e766914..0aa6f70 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -475,12 +475,6 @@ selection, non-nil otherwise."
   '((ivy--minibuffer-setup . ivy-posframe--minibuffer-setup)
 (ivy--queue-exhibit. ivy-posframe--add-prompt)))
 
-(defvar ivy-posframe-keybind-list
-  '((ivy-minibuffer-map [remap ivy-read-action] ivy-posframe-read-action)
-(ivy-minibuffer-map [remap ivy-dispatching-done] 
ivy-posframe-dispatching-done)
-(ivy-minibuffer-map [remap ivy-avy] ivy-posframe-avy)
-(ivy-minibuffer-map [remap swiper-avy] ivy-posframe-swiper-avy)))
-
 ;;;###autoload
 (define-minor-mode ivy-posframe-mode
   "Display ivy via posframe."
@@ -488,9 +482,12 @@ selection, non-nil otherwise."
   :global t
   :lighter " ivy-pf"
   :group 'ivy-posframe
+  :keymap '(([remap ivy-read-action] ivy-posframe-read-action)
+([remap ivy-dispatching-done] ivy-posframe-dispatching-done)
+([remap ivy-avy] ivy-posframe-avy)
+([remap swiper-avy] ivy-posframe-swiper-avy))
   (let ((fncs ivy-posframe-display-function-list)
 (advs ivy-posframe-advice-alist)
-(keys ivy-posframe-keybind-list)
 (configures ivy-posframe-configure-alist))
 (if ivy-posframe-mode
 (eval
@@ -498,16 +495,14 @@ selection, non-nil otherwise."
 ,@(mapcan
(lambda (conf) (mapcar (lambda (elm) `(push ',elm ,(car conf))) 
(cdr conf))) configures)
 ,@(mapcar (lambda (elm) `(push '(,elm :cleanup 
ivy-posframe-cleanup) ivy-display-functions-props)) fncs)
-,@(mapcar (lambda (elm) `(advice-add ',(car elm) :around #',(cdr 
elm))) advs)
-,@(mapcar (lambda (elm) `(define-key ,(nth 0 elm) ,(nth 1 elm) 
',(nth 2 elm))) keys)))
+,@(mapcar (lambda (elm) `(advice-add ',(car elm) :around #',(cdr 
elm))) advs)))
   (eval
`(progn
   ,@(mapcan
  (lambda (conf) (mapcar (lambda (elm) `(setq ,(car conf) (remove 
',elm ,(car conf (cdr conf))) configures)
   ,@(mapcar (lambda (elm) `(setq ivy-display-functions-alist (delete 
',elm ivy-display-functions-alist))) configures)
   ,@(mapcar (lambda (elm) `(push '(,elm :cleanup ignore) 
ivy-display-functions-props)) fncs)
-  ,@(mapcar (lambda (elm) `(advice-remove ',(car elm) #',(cdr elm))) 
advs)
-  ,@(mapcar (lambda (elm) `(define-key ,(nth 0 elm) ,(nth 1 elm) nil)) 
keys))
+  ,@(mapcar (lambda (elm) `(advice-remove ',(car elm) #',(cdr elm))) 
advs))
 
 ;;;###autoload
 (defun ivy-posframe-demo ()



[elpa] externals/ivy-posframe 4242977 079/195: Remove #' (function quote) of `lambda`

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 4242977d45e153246e36f9078768fb4c8955a860
Author: conao3 
Commit: conao3 

Remove #' (function quote) of `lambda`

* ivy-posframe.el (ivy-posframe-display-at-frame-bottom-window-center):
refactoring

* ivy-posframe.el (ivy-posframe-setup): refactoring

We should use `lambda` without any quotes. Remove #' (function quote).
also see https://github.com/bbatsov/emacs-lisp-style-guide#functions .
---
 ivy-posframe.el | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index aa677d0..f22f3ae 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -246,9 +246,9 @@ This variable is useful for `ivy-posframe-read-action' .")
 
 (defun ivy-posframe-display-at-frame-bottom-window-center (str)
   (ivy-posframe--display
-   str #'(lambda (info)
-   (cons (car (posframe-poshandler-window-center info))
- (cdr (posframe-poshandler-frame-bottom-left-corner info))
+   str (lambda (info)
+ (cons (car (posframe-poshandler-window-center info))
+   (cdr (posframe-poshandler-frame-bottom-left-corner info))
 
 (defun ivy-posframe-display-at-point (str)
   (ivy-posframe--display str #'posframe-poshandler-point-bottom-left-corner))
@@ -438,12 +438,12 @@ selection, non-nil otherwise."
   "Add all display functions of ivy-posframe to
 `ivy-display-functions-props'."
   (mapatoms
-   #'(lambda (func)
-   (when (and (functionp func)
-  (string-match-p "^ivy-posframe-display" (symbol-name func))
-  (not (assq func ivy-display-functions-props)))
- (push `(,func :cleanup ivy-posframe-cleanup)
-   ivy-display-functions-props)
+   (lambda (func)
+ (when (and (functionp func)
+(string-match-p "^ivy-posframe-display" (symbol-name func))
+(not (assq func ivy-display-functions-props)))
+   (push `(,func :cleanup ivy-posframe-cleanup)
+ ivy-display-functions-props)
 
 (ivy-posframe-setup)
 



[elpa] externals/ivy-posframe d15c352 165/195: remove ivy-posframe--poframe-p-advice

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit d15c35295815ca5b17df5213f13a5c6896830274
Author: conao3 
Commit: conao3 

remove ivy-posframe--poframe-p-advice
---
 ivy-posframe.el | 14 --
 1 file changed, 14 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 07e8f4f..53ca92e 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -467,20 +467,6 @@ selection, non-nil otherwise."
 
 ;;; Advice
 
-(defun ivy-posframe--posframe-p-advice (advice-fn &rest args)
-  "Advice function of ADVICE-FN, used to bypass the advice from
-`ivy-posframe-advice-alist' if the posframe cannot be displayed.
-
-ADVICE-FN should be a value from `ivy-posframe-advice-alist', but
-the function only errors if ARGS is empty. There should at least be
-the advised function there (a key from `ivy-posframe-advice-alist')."
-  (unless (< 0 (length args))
-(error "This function should advise an advice, so args should be at least 
a key from ivy-posframe-advice-alist"))
-  (if (display-graphic-p)
-  (apply advice-fn args)
-(apply (car args) (cdr args)))
-  )
-
 (defmacro ivy-posframe--defun-advice (name arglist &optional docstring &rest 
body)
   "Define NAME as a `ivy-posframe' advice function.  see `defun'.
 The definition is (lambda ARGLIST [DOCSTRING] BODY...).



[elpa] externals/ivy-posframe 8902638 100/195: define ivy-posframe-adbice-alist

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 8902638788ca42fcf517e64899b57a9aa35532dc
Author: conao3 
Commit: conao3 

define ivy-posframe-adbice-alist
---
 ivy-posframe.el | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index bd5126e..f5cc474 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -409,6 +409,8 @@ selection, non-nil otherwise."
 (ivy-quit-and-run
   (avy-action-goto (avy-candidate-beg candidate)))
 
+;;; Advice
+
 (defun ivy-posframe--minibuffer-setup (orig-func)
   "Advice function of `ivy--minibuffer-setup'."
   (let ((ivy-fixed-height-minibuffer nil))
@@ -436,6 +438,10 @@ selection, non-nil otherwise."
   (insert prompt "  \n")
   (add-text-properties point (1+ point) '(face 
ivy-posframe-cursor)))
 
+(defvar ivy-posframe-advice-alist
+  '((ivy--minibuffer-setup . ivy-posframe--minibuffer-setup)
+(ivy--queue-exhibit. ivy-posframe--add-prompt)))
+
 ;;;###autoload
 (defun ivy-posframe-enable ()
   "Enable ivy-posframe."



[elpa] externals/ivy-posframe 31363f3 076/195: Get correct prompt for recursive minibuffers

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 31363f31ac9803fe6e783f4cf5b5909195e34d23
Author: Troy Hinckley 
Commit: Troy Hinckley 

Get correct prompt for recursive minibuffers
---
 ivy-posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index c275d71..8858e10 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -206,7 +206,7 @@ This variable is useful for `ivy-posframe-read-action' .")
ivy-posframe-buffer
:font ivy-posframe-font
:string
-   (with-current-buffer (get-buffer-create " *Minibuf-1*")
+   (with-current-buffer (window-buffer (active-minibuffer-window))
  (let ((point (point))
(string (if ivy-posframe--ignore-prompt
str



[elpa] externals/ivy-posframe d5dd254 075/195: Update README

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit d5dd254bac81ff7687b97d69eaab3b02001594a6
Author: Feng Shu 
Commit: Feng Shu 

Update README
---
 README.md | 52 ++--
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/README.md b/README.md
index dfffd00..f14f57c 100644
--- a/README.md
+++ b/README.md
@@ -3,24 +3,24 @@ Note: this file is auto converted from ivy-posframe.el by 
[el2org](https://githu
 
 # 目录
 
-1.  [ivy-posframe README](#orged4b722)
-1.  [What is ivy-posframe](#orgf4b983c)
-2.  [Display functions](#org34c2159)
-3.  [How to enable ivy-posframe](#orgda86c52)
-1.  [Global mode](#org4f1a9ad)
-2.  [Per-command mode.](#org9a33c1f)
-3.  [Fallback mode](#org9aa3677)
-4.  [Tips](#orgb46c3e5)
-1.  [How to show fringe to ivy-posframe](#orgce86797)
-2.  [How to custom your ivy-posframe style](#org7e42dcb)
+1.  [ivy-posframe README](#orgf13cc66)
+1.  [What is ivy-posframe](#orgbd4ba62)
+2.  [Display functions](#orge8456a3)
+3.  [How to enable ivy-posframe](#orge72596b)
+1.  [Global mode](#org359004f)
+2.  [Per-command mode.](#orgdfd4dbf)
+3.  [Fallback mode](#org589575f)
+4.  [Tips](#orgd8d788b)
+1.  [How to show fringe to ivy-posframe](#org44b1a57)
+2.  [How to custom your ivy-posframe style](#org2e4b09d)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -31,7 +31,7 @@ NOTE: ivy-posframe requires Emacs 26 and do not support mouse
 click.
 
 
-
+
 
 ## Display functions
 
@@ -47,31 +47,31 @@ click.
 ![img](./snapshots/ivy-posframe-display-at-point.png)
 
 
-
+
 
 ## How to enable ivy-posframe
 
 
-
+
 
 ### Global mode
 
 (require 'ivy-posframe)
 (setq ivy-display-function #'ivy-posframe-display)
-(setq ivy-display-function #'ivy-posframe-display-at-frame-center)
-(setq ivy-display-function #'ivy-posframe-display-at-window-center)
-(setq ivy-display-function #'ivy-posframe-display-at-frame-bottom-left)
-(setq ivy-display-function #'ivy-posframe-display-at-window-bottom-left)
-(setq ivy-display-function #'ivy-posframe-display-at-point)
+;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
+;; (setq ivy-display-function #'ivy-posframe-display-at-window-center)
+;; (setq ivy-display-function #'ivy-posframe-display-at-frame-bottom-left)
+;; (setq ivy-display-function #'ivy-posframe-display-at-window-bottom-left)
+;; (setq ivy-display-function #'ivy-posframe-display-at-point)
 (ivy-posframe-enable)
 
 
-
+
 
 ### Per-command mode.
 
 (require 'ivy-posframe)
-Different command can use different display function.
+;; Different command can use different display function.
 (push '(counsel-M-x . ivy-posframe-display-at-window-bottom-left) 
ivy-display-functions-alist)
 (push '(complete-symbol . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
 (push '(swiper . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
@@ -88,7 +88,7 @@ by ivy to find display function in 
\`ivy-display-functions-alist',
 "C-h v this-command" is a good idea.
 
 
-
+
 
 ### Fallback mode
 
@@ -97,12 +97,12 @@ by ivy to find display function in 
\`ivy-display-functions-alist',
 (ivy-posframe-enable)
 
 
-
+
 
 ## Tips
 
 
-
+
 
 ### How to show fringe to ivy-posframe
 
@@ -114,7 +114,7 @@ By the way, User can set **any** parameters of ivy-posframe 
with
 the help of \`ivy-posframe-parameters'.
 
 
-
+
 
 ### How to custom your ivy-posframe style
 



[elpa] externals/ivy-posframe 26612b2 071/195: Add ivy-posframe-border face and use it

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 26612b2d03f9761060ffbb50b75d7c358fac5deb
Author: Feng Shu 
Commit: Feng Shu 

Add ivy-posframe-border face and use it

Note: this feature need posframe update too.
---
 ivy-posframe.el | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 6fd303e..18a31e4 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -158,7 +158,7 @@ When nil, Using current frame's font as fallback."
   :group 'ivy-posframe
   :type 'number)
 
-(defcustom ivy-posframe-border-width 0
+(defcustom ivy-posframe-border-width 1
   "The border width used by ivy-posframe.
 When 0, no border is showed."
   :group 'ivy-posframe
@@ -179,6 +179,11 @@ When 0, no border is showed."
   "Face used by the ivy-posframe."
   :group 'ivy-posframe)
 
+(defface ivy-posframe-border
+  '((t (:inherit default :background "gray50")))
+  "Face used by the ivy-posframe's border."
+  :group 'ivy-posframe)
+
 (defface ivy-posframe-cursor
   '((t (:inherit cursor)))
   "Face used by the ivy-posframe's fake cursor."
@@ -223,6 +228,7 @@ This variable is useful for `ivy-posframe-read-action' .")
:min-height (or ivy-posframe-min-height 10)
:min-width (or ivy-posframe-min-width 50)
:internal-border-width ivy-posframe-border-width
+   :internal-border-color (face-attribute 'ivy-posframe-border :background)
:override-parameters ivy-posframe-parameters
 
 (defun ivy-posframe-display (str)



[elpa] externals/ivy-posframe bf6cf5d 091/195: Merge pull request #39 from conao3/require-ivy-0.11.0

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit bf6cf5d6229383492c87fe4eda40fa38e311b413
Merge: d29f788 fd9c072
Author: tumashu 
Commit: GitHub 

Merge pull request #39 from conao3/require-ivy-0.11.0

requires ivy v0.11.0
---
 ivy-posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 7db1620..be8444a 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -8,7 +8,7 @@
 ;; URL: https://github.com/tumashu/ivy-posframe
 ;; Version: 0.1.0
 ;; Keywords: abbrev, convenience, matching, ivy
-;; Package-Requires: ((emacs "26.0")(posframe "0.1.0")(ivy "0.10.0"))
+;; Package-Requires: ((emacs "26.0")(posframe "0.1.0")(ivy "0.11.0"))
 
 ;; This file is part of GNU Emacs.
 



[elpa] externals/ivy-posframe 112655b 179/195: Add a window/frame top center position option #61

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 112655b9919792790f7548ed0e7c167d0f72dec9
Author: Feng Shu 
Commit: Feng Shu 

Add a window/frame top center position option #61
---
 ivy-posframe.el | 4 
 1 file changed, 4 insertions(+)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 7e8236c..7d99b41 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -61,6 +61,7 @@
 ;; ;; (setq ivy-posframe-display-functions-alist '((t . 
ivy-posframe-display-at-window-center)))
 ;; ;; (setq ivy-posframe-display-functions-alist '((t . 
ivy-posframe-display-at-frame-bottom-left)))
 ;; ;; (setq ivy-posframe-display-functions-alist '((t . 
ivy-posframe-display-at-window-bottom-left)))
+;; ;; (setq ivy-posframe-display-functions-alist '((t . 
ivy-posframe-display-at-frame-top-center)))
 ;; (ivy-posframe-mode 1)
 ;; #+END_EXAMPLE
 ;; *** Per-command mode.
@@ -308,6 +309,9 @@ This variable is useful for `ivy-posframe-read-action' .")
 (defun ivy-posframe-display-at-point (str)
   (ivy-posframe--display str #'posframe-poshandler-point-bottom-left-corner))
 
+(defun ivy-posframe-display-at-frame-top-center (str)
+  (ivy-posframe--display str #'posframe-poshandler-frame-top-center))
+
 (defun ivy-posframe-cleanup ()
   "Cleanup ivy's posframe."
   (when (posframe-workable-p)



[elpa] externals/ivy-posframe dddbd8b 139/195: Remove ivy-posframe-display-function-list

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit dddbd8b89bd1e17d65d28f2cc30ea1b21a5a379b
Author: Feng Shu 
Commit: Feng Shu 

Remove ivy-posframe-display-function-list
---
 ivy-posframe.el | 26 --
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 96ef2e0..bedd226 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -136,7 +136,7 @@
 ;; #+BEGIN_EXAMPLE
 ;; (defun ivy-posframe-display-at-XXX (str)
 ;;   (ivy-posframe--display str #'your-own-poshandler-function))
-;; (push 'ivy-posframe-display-at-XXX ivy-posframe-display-function-list) ; 
This line is needed.
+;; (push 'ivy-posframe-display-at-XXX 
ivy-posframe-additional-display-functions) ; This line is needed.
 ;; (ivy-posframe-mode t) ; This line is needed.
 ;; #+END_EXAMPLE
 
@@ -292,14 +292,6 @@ This variable is useful for `ivy-posframe-read-action' .")
 (defun ivy-posframe-display-at-point (str)
   (ivy-posframe--display str #'posframe-poshandler-point-bottom-left-corner))
 
-(defvar ivy-posframe-display-function-list '(ivy-posframe-display
- 
ivy-posframe-display-at-window-center
- 
ivy-posframe-display-at-frame-center
- 
ivy-posframe-display-at-window-bottom-left
- 
ivy-posframe-display-at-frame-bottom-left
- 
ivy-posframe-display-at-frame-bottom-window-center
- ivy-posframe-display-at-point))
-
 (defun ivy-posframe-cleanup ()
   "Cleanup ivy's posframe."
   (when (posframe-workable-p)
@@ -455,9 +447,6 @@ selection, non-nil otherwise."
 
 ;;; Variables
 
-(defvar ivy-posframe-display-function-list
-  (append ivy-posframe-additional-display-functions 
ivy-posframe-display-function-list))
-
 (defvar ivy-posframe-advice-alist
   '((ivy--minibuffer-setup  . ivy-posframe--minibuffer-setup)
 (ivy--queue-exhibit . ivy-posframe--add-prompt)
@@ -499,8 +488,17 @@ selection, non-nil otherwise."
   "Around advice of FN with ARGS."
   (let ((ivy-display-functions-props
  (append ivy-display-functions-props
- (mapcar (lambda (elm) `(,elm :cleanup ivy-posframe-cleanup))
- ivy-posframe-display-function-list
+ (mapcar
+  (lambda (elm)
+`(,elm :cleanup ivy-posframe-cleanup))
+  `(,@ivy-posframe-additional-display-functions
+ivy-posframe-display
+ivy-posframe-display-at-window-center
+ivy-posframe-display-at-frame-center
+ivy-posframe-display-at-window-bottom-left
+ivy-posframe-display-at-frame-bottom-left
+ivy-posframe-display-at-frame-bottom-window-center
+ivy-posframe-display-at-point)
 (apply fn args)))
 
 (defun ivy-posframe--height (fn &rest args)



[elpa] externals/ivy-posframe 52c8209 057/195: Merge pull request #20 from tumashu/revert-19-master

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 52c8209c2927d020ddf3cee2851e45bc1250cfc8
Merge: 7ea96ce f6f07cf
Author: tumashu 
Commit: GitHub 

Merge pull request #20 from tumashu/revert-19-master

Revert "Simplify ivy-postframe-avy"
---
 ivy-posframe.el | 49 -
 1 file changed, 44 insertions(+), 5 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 8304c6a..0a323d1 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -178,7 +178,7 @@ This variable is useful for `ivy-posframe-read-action' .")
   "Show STR in ivy's posframe."
   (if (not (ivy-posframe-workable-p))
   (ivy-display-function-fallback str)
-(with-ivy-window
+(with-selected-window (ivy--get-window ivy-last)
   (posframe-show
ivy-posframe-buffer
:font ivy-posframe-font
@@ -287,6 +287,13 @@ selection, non-nil otherwise."
(setcar actions (1+ action-idx))
(ivy-set-action actions)))
 
+(defun ivy-posframe--avy-action (pt)
+  "Finish ivy session with the candidate at PT."
+  (with-current-buffer ivy-posframe-buffer
+(ivy--done
+ (substring-no-properties
+  (nth (- (line-number-at-pos pt) 2) ivy--old-cands)
+
 (defun ivy-posframe--window ()
   "Return the posframe window displaying `ivy-posframe-buffer'."
   (frame-selected-window
@@ -295,14 +302,46 @@ selection, non-nil otherwise."
 
 (defvar avy-all-windows)
 (defvar avy-keys)
+(defvar avy-keys-alist)
 (defvar avy-style)
-
+(defvar avy-styles-alist)
+(defvar avy-action)
+(declare-function avy--process "avy")
+(declare-function avy--style-fn "avy")
 (defun ivy-posframe-avy ()
   "Jump to one of the current ivy candidates."
   (interactive)
-  (let ((avy-pre-action #'ignore))
-(with-selected-window (ivy-posframe--window)
-  (ivy-avy
+  (unless (require 'avy nil 'noerror)
+(error "Package avy isn't installed"))
+  (unless (boundp 'avy-pre-action)
+(error "A newer version of avy is required for this command"))
+  (let* ((avy-all-windows nil)
+ (avy-keys (or (cdr (assq 'ivy-avy avy-keys-alist))
+   avy-keys))
+ (avy-style (or (cdr (assq 'ivy-avy
+   avy-styles-alist))
+avy-style))
+ ;; prevent default pre action, which calls
+ ;; `select-frame-set-input-focus', deselecting the minibuffer and
+ ;; causing `ivy-posframe-cleanup' to run prematurely
+ (avy-pre-action #'ignore)
+ (window (ivy-posframe--window))
+ candidates)
+(with-current-buffer ivy-posframe-buffer
+  (save-excursion
+(save-restriction
+  (narrow-to-region
+   (window-start window)
+   (window-end window))
+  (goto-char (point-min))
+  (forward-line)
+  (while (< (point) (point-max))
+(push (cons (point) window) candidates)
+(forward-line)
+(setq avy-action #'ivy-posframe--avy-action)
+(avy--process
+ (nreverse candidates)
+ (avy--style-fn avy-style
 
 (declare-function avy--make-backgrounds "avy")
 (declare-function avy-window-list "avy")



[elpa] externals/ivy-posframe a7fe06e 098/195: fix addition ivy-display-function-props

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit a7fe06e71b77e3ff5987f309df884dd19f49bff8
Author: conao3 
Commit: conao3 

fix addition ivy-display-function-props

by add ivy-posframe-display-functions
---
 ivy-posframe.el | 23 ++-
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index ff9f6fd..9030821 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -247,6 +247,15 @@ This variable is useful for `ivy-posframe-read-action' .")
 (defun ivy-posframe-display-at-point (str)
   (ivy-posframe--display str #'posframe-poshandler-point-bottom-left-corner))
 
+(defvar ivy-posframe-display-functions
+  '(ivy-posframe-display
+ivy-posframe-display-at-window-center
+ivy-posframe-display-at-frame-center
+ivy-posframe-display-at-window-bottom-left
+ivy-posframe-display-at-frame-bottom-left
+ivy-posframe-display-at-frame-bottom-window-center
+ivy-posframe-display-at-point))
+
 (defun ivy-posframe-cleanup ()
   "Cleanup ivy's posframe."
   (when (posframe-workable-p)
@@ -431,15 +440,11 @@ selection, non-nil otherwise."
 (defun ivy-posframe-enable ()
   "Enable ivy-posframe."
   (interactive)
-  ;; Add all display functions of ivy-posframe to
-  ;; `ivy-display-functions-props'.
-  (mapatoms
-   (lambda (func)
- (when (and (functionp func)
-(string-match-p "^ivy-posframe-display" (symbol-name func))
-(not (assq func ivy-display-functions-props)))
-   (push `(,func :cleanup ivy-posframe-cleanup)
- ivy-display-functions-props
+  (eval
+   `(progn
+  (mapcar (lambda (fn)
+`(push `(,fn :cleanup ivy-posframe-cleanup) 
ivy-display-functions-props))
+  ivy-posframe-display-functions)))
   (define-key ivy-minibuffer-map
 [remap ivy-read-action] 'ivy-posframe-read-action)
   (define-key ivy-minibuffer-map



[elpa] externals/ivy-posframe 8799af1 069/195: Revert "Add ivy-posframe-border face and use it"

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 8799af191addb03d7917dbc88633c21874503e6e
Author: Feng Shu 
Commit: Feng Shu 

Revert "Add ivy-posframe-border face and use it"

This reverts commit 7bfd14f8b9a5209dde484619dd565104cc59d546.
---
 README.md   | 49 +
 ivy-posframe.el | 16 
 2 files changed, 37 insertions(+), 28 deletions(-)

diff --git a/README.md b/README.md
index eb39709..775a01b 100644
--- a/README.md
+++ b/README.md
@@ -3,24 +3,25 @@ Note: this file is auto converted from ivy-posframe.el by 
[el2org](https://githu
 
 # 目录
 
-1.  [ivy-posframe README](#org3d85bc4)
-1.  [What is ivy-posframe](#org5b2bac3)
-2.  [Display functions](#org76e7f43)
-3.  [How to enable ivy-posframe](#org45fc4c8)
-1.  [Global mode](#orge1a8047)
-2.  [Per-command mode.](#org13272c5)
-3.  [Fallback mode](#org2f40fde)
-4.  [Tips](#org0d52e7c)
-1.  [How to show fringe to ivy-posframe](#orgcf3e519)
-2.  [How to custom your ivy-posframe style](#org841efef)
+1.  [ivy-posframe README](#org68c65a1)
+1.  [What is ivy-posframe](#org03624ec)
+2.  [Display functions](#org99df55a)
+3.  [How to enable ivy-posframe](#org2040f8e)
+1.  [Global mode](#org6cc7219)
+2.  [Per-command mode.](#orgcd58b06)
+3.  [Fallback mode](#org7941a0a)
+4.  [Tips](#org5cfed99)
+1.  [How to let ivy-posframe show border](#orgb370bbe)
+2.  [How to show fringe to ivy-posframe](#orgb28f068)
+3.  [How to custom your ivy-posframe style](#org96e6893)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -31,7 +32,7 @@ NOTE: ivy-posframe requires Emacs 26 and do not support mouse
 click.
 
 
-
+
 
 ## Display functions
 
@@ -47,12 +48,12 @@ click.
 ![img](./snapshots/ivy-posframe-display-at-point.png)
 
 
-
+
 
 ## How to enable ivy-posframe
 
 
-
+
 
 ### Global mode
 
@@ -66,7 +67,7 @@ click.
 (ivy-posframe-enable)
 
 
-
+
 
 ### Per-command mode.
 
@@ -88,7 +89,7 @@ by ivy to find display function in 
\`ivy-display-functions-alist',
 "C-h v this-command" is a good idea.
 
 
-
+
 
 ### Fallback mode
 
@@ -97,12 +98,20 @@ by ivy to find display function in 
\`ivy-display-functions-alist',
 (ivy-posframe-enable)
 
 
-
+
 
 ## Tips
 
 
-
+
+
+### How to let ivy-posframe show border
+
+(set-face-attribute 'internal-border nil :background "gray50")
+(setq ivy-posframe-border-width 1)
+
+
+
 
 ### How to show fringe to ivy-posframe
 
@@ -114,7 +123,7 @@ By the way, User can set **any** parameters of ivy-posframe 
with
 the help of \`ivy-posframe-parameters'.
 
 
-
+
 
 ### How to custom your ivy-posframe style
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 662ea5d..4b35100 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -91,6 +91,12 @@
 
 ;; ** Tips
 
+;; *** How to let ivy-posframe show border
+;; #+BEGIN_EXAMPLE
+;; (set-face-attribute 'internal-border nil :background "gray50")
+;; (setq ivy-posframe-border-width 1)
+;; #+END_EXAMPLE
+
 ;; *** How to show fringe to ivy-posframe
 ;; #+BEGIN_EXAMPLE
 ;; (setq ivy-posframe-parameters
@@ -152,7 +158,7 @@ When nil, Using current frame's font as fallback."
   :group 'ivy-posframe
   :type 'number)
 
-(defcustom ivy-posframe-border-width 1
+(defcustom ivy-posframe-border-width 0
   "The border width used by ivy-posframe.
 When 0, no border is showed."
   :group 'ivy-posframe
@@ -173,11 +179,6 @@ When 0, no border is showed."
   "Face used by the ivy-posframe."
   :group 'ivy-posframe)
 
-(defface ivy-posframe-border
-  '((t (:inherit default :background "gray50")))
-  "Face used by the ivy-posframe."
-  :group 'ivy-posframe)
-
 (defface ivy-posframe-cursor
   '((t (:inherit cursor)))
   "Face used by the ivy-posframe's fake cursor."
@@ -218,8 +219,7 @@ This variable is useful for `ivy-posframe-read-action' .")
:min-height (or ivy-posframe-min-height 10)
:min-width (or ivy-posframe-min-width 50)
:internal-border-width ivy-posframe-border-width
-   :override-parameters ivy-posframe-parameters
-   :face-remap '((internal-border . ivy-posframe-border))
+   :override-parameters ivy-posframe-parameters
 
 (defun ivy-posframe-display (str)
   (let ((func (intern (format "ivy-posframe-display-at-%s"



[elpa] externals/ivy-posframe 83657be 114/195: add display-functions-alist to restore ivy variable

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 83657beade8974ea89838d38d0e2fd725e4539ba
Author: conao3 
Commit: conao3 

add display-functions-alist to restore ivy variable
---
 ivy-posframe.el | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 367c74a..409a1e0 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -121,6 +121,11 @@
   :group 'ivy
   :prefix "ivy-posframe")
 
+(defcustom ivy-posframe-display-functions-alist '((t . ivy-posframe-display))
+  "The ivy function, display function alist."
+  :group 'ivy-posframe
+  :type 'sexp)
+
 (defcustom ivy-posframe-style 'window-bottom-left
   "The style of ivy-posframe."
   :group 'ivy-posframe
@@ -460,15 +465,18 @@ selection, non-nil otherwise."
   :group 'ivy-posframe
   (let ((fncs ivy-posframe-display-function-list)
 (advs ivy-posframe-advice-alist)
-(keys ivy-posframe-keybind-list))
+(keys ivy-posframe-keybind-list)
+(dfns ivy-posframe-display-functions-alist))
 (if ivy-posframe-mode
 (eval
  `(progn
+,@(mapcar (lambda (elm) `(push ',elm ivy-display-functions-alist)) 
dfns)
 ,@(mapcar (lambda (elm) `(push '(,elm :cleanup 
ivy-posframe-cleanup) ivy-display-functions-props)) fncs)
 ,@(mapcar (lambda (elm) `(advice-add ',(car elm) :around #',(cdr 
elm))) advs)
 ,@(mapcar (lambda (elm) `(define-key ,(nth 0 elm) ,(nth 1 elm) 
',(nth 2 elm))) keys)))
   (eval
`(progn
+  ,@(mapcar (lambda (elm) `(setq ivy-display-functions-alist (delete 
',elm ivy-display-functions-alist))) dfns)
   ,@(mapcar (lambda (elm) `(push '(,elm :cleanup ignore) 
ivy-display-functions-props)) fncs)
   ,@(mapcar (lambda (elm) `(advice-remove ',(car elm) #',(cdr elm))) 
advs)
   ,@(mapcar (lambda (elm) `(define-key ,(nth 0 elm) ,(nth 1 elm) nil)) 
keys))



[elpa] externals/ivy-posframe 0a8cb5a 101/195: fix advice function style

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 0a8cb5a6b22f2204d162facdb14401b4dbfa5b3c
Author: conao3 
Commit: conao3 

fix advice function style
---
 ivy-posframe.el | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index f5cc474..465c66d 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -411,10 +411,10 @@ selection, non-nil otherwise."
 
 ;;; Advice
 
-(defun ivy-posframe--minibuffer-setup (orig-func)
+(defun ivy-posframe--minibuffer-setup (fn &rest args)
   "Advice function of `ivy--minibuffer-setup'."
   (let ((ivy-fixed-height-minibuffer nil))
-(funcall orig-func))
+(apply fn args))
   (when (and ivy-posframe-hide-minibuffer
  ;; only hide minibuffer's info when posframe is showed.
  ivy-posframe--display-p)
@@ -425,8 +425,9 @@ selection, non-nil otherwise."
  `(:background ,bg-color :foreground ,bg-color)))
   (setq-local cursor-type nil
 
-(defun ivy-posframe--add-prompt ()
+(defun ivy-posframe--add-prompt (fn &rest args)
   "Add the ivy prompt to the posframe."
+  (apply fn args)
   (unless ivy-posframe--ignore-prompt
 (with-current-buffer (window-buffer (active-minibuffer-window))
   (let ((point (point))
@@ -458,7 +459,7 @@ selection, non-nil otherwise."
   (define-key ivy-minibuffer-map [remap ivy-avy] 'ivy-posframe-avy)
   (define-key ivy-minibuffer-map [remap swiper-avy] 'ivy-posframe-swiper-avy)
   (advice-add 'ivy--minibuffer-setup :around #'ivy-posframe--minibuffer-setup)
-  (advice-add 'ivy--queue-exhibit :after #'ivy-posframe--add-prompt)
+  (advice-add 'ivy--queue-exhibit :around #'ivy-posframe--add-prompt)
   (message "ivy-posframe is enabled, disabling it need to reboot emacs."))
 
 ;;;###autoload



[elpa] externals/ivy-posframe b934152 125/195: move variables section above advice section

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit b934152e288c4d41852e1a09bbf8596b0572a483
Author: conao3 
Commit: conao3 

move variables section above advice section
---
 ivy-posframe.el | 34 +-
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 4a631cb..5bdc909 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -441,6 +441,23 @@ selection, non-nil otherwise."
 (ivy-quit-and-run
   (avy-action-goto (avy-candidate-beg candidate)))
 
+;;; Variables
+
+(defvar ivy-posframe-display-function-list
+  (append
+   ivy-posframe-additional-display-functions
+   (mapcar (lambda (elm) (intern (format "ivy-posframe-display-at-%s" (car 
elm
+   ivy-posframe-display-function-alist)
+   '(ivy-posframe-display
+ ivy-posframe-display-at-frame-bottom-window-center)))
+
+(defvar ivy-posframe-advice-alist
+  '((ivy--minibuffer-setup . ivy-posframe--minibuffer-setup)
+(ivy--queue-exhibit. ivy-posframe--add-prompt)
+(ivy--display-function-prop . ivy-posframe--display-function-prop)
+(ivy--height   . ivy-posframe--height)
+(ivy-read  . ivy-posframe--read)))
+
 ;;; Advice
 
 (defun ivy-posframe--minibuffer-setup (fn &rest args)
@@ -491,23 +508,6 @@ selection, non-nil otherwise."
  (append ivy-posframe-display-functions-alist 
ivy-display-functions-alist)))
 (apply fn args)))
 
-;;; variables
-
-(defvar ivy-posframe-display-function-list
-  (append
-   ivy-posframe-additional-display-functions
-   (mapcar (lambda (elm) (intern (format "ivy-posframe-display-at-%s" (car 
elm
-   ivy-posframe-display-function-alist)
-   '(ivy-posframe-display
- ivy-posframe-display-at-frame-bottom-window-center)))
-
-(defvar ivy-posframe-advice-alist
-  '((ivy--minibuffer-setup . ivy-posframe--minibuffer-setup)
-(ivy--queue-exhibit. ivy-posframe--add-prompt)
-(ivy--display-function-prop . ivy-posframe--display-function-prop)
-(ivy--height   . ivy-posframe--height)
-(ivy-read  . ivy-posframe--read)))
-
 ;;;###autoload
 (define-minor-mode ivy-posframe-mode
   "Display ivy via posframe."



[elpa] externals/ivy-posframe 78ec80f 074/195: ivy-posframe-workable-p -> posframe-workable-p

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 78ec80fce6663f9358d8c9210e2de995f0392155
Author: Feng Shu 
Commit: Feng Shu 

ivy-posframe-workable-p -> posframe-workable-p
---
 ivy-posframe.el | 11 ++-
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index caa8511..c275d71 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -198,7 +198,7 @@ This variable is useful for `ivy-posframe-read-action' .")
 
 (defun ivy-posframe--display (str &optional poshandler)
   "Show STR in ivy's posframe."
-  (if (not (ivy-posframe-workable-p))
+  (if (not (posframe-workable-p))
   (ivy-display-function-fallback str)
 (setq ivy-posframe--display-p t)
 (with-ivy-window
@@ -255,17 +255,10 @@ This variable is useful for `ivy-posframe-read-action' .")
 
 (defun ivy-posframe-cleanup ()
   "Cleanup ivy's posframe."
-  (when (ivy-posframe-workable-p)
+  (when (posframe-workable-p)
 (posframe-hide ivy-posframe-buffer)
 (setq ivy-posframe--display-p nil)))
 
-(defun ivy-posframe-workable-p ()
-  "Test ivy-posframe workable status."
-  (and (>= emacs-major-version 26)
-   (not (or noninteractive
-emacs-basic-display
-(not (display-graphic-p))
-
 (defun ivy-posframe-dispatching-done ()
   "Select one of the available actions and call `ivy-done'."
   (interactive)



[elpa] externals/ivy-posframe 0a870c1 080/195: Remove top-level ivy-posframe setup function executing

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 0a870c129186e57d8844bf14ac8bf540c1f1eb4d
Author: conao3 
Commit: conao3 

Remove top-level ivy-posframe setup function executing

Many users want that the behavior of Emacs does not change just by
`require`. (Unless package have different files for configuration.)

Currently, if you require a package, ivy-posframe-setup will be executed
unconditionally, which may violate the user's intention.

Users need to call ivy-posframe-enable separately if they want to use
ivy-posframe (because it changes the behavior of ivy), and it is already
designed to execute ivy-posframe-setup from this function.
---
 ivy-posframe.el | 2 --
 1 file changed, 2 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index aa677d0..906d878 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -445,8 +445,6 @@ selection, non-nil otherwise."
  (push `(,func :cleanup ivy-posframe-cleanup)
ivy-display-functions-props)
 
-(ivy-posframe-setup)
-
 (provide 'ivy-posframe)
 
 ;; Local Variables:



[elpa] externals/ivy-posframe 23c1619 073/195: Update README

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 23c1619d925bc5fad8f65bbbae97f6261ffaa907
Author: Feng Shu 
Commit: Feng Shu 

Update README
---
 README.md   | 49 -
 ivy-posframe.el |  6 --
 2 files changed, 20 insertions(+), 35 deletions(-)

diff --git a/README.md b/README.md
index 775a01b..dfffd00 100644
--- a/README.md
+++ b/README.md
@@ -3,25 +3,24 @@ Note: this file is auto converted from ivy-posframe.el by 
[el2org](https://githu
 
 # 目录
 
-1.  [ivy-posframe README](#org68c65a1)
-1.  [What is ivy-posframe](#org03624ec)
-2.  [Display functions](#org99df55a)
-3.  [How to enable ivy-posframe](#org2040f8e)
-1.  [Global mode](#org6cc7219)
-2.  [Per-command mode.](#orgcd58b06)
-3.  [Fallback mode](#org7941a0a)
-4.  [Tips](#org5cfed99)
-1.  [How to let ivy-posframe show border](#orgb370bbe)
-2.  [How to show fringe to ivy-posframe](#orgb28f068)
-3.  [How to custom your ivy-posframe style](#org96e6893)
+1.  [ivy-posframe README](#orged4b722)
+1.  [What is ivy-posframe](#orgf4b983c)
+2.  [Display functions](#org34c2159)
+3.  [How to enable ivy-posframe](#orgda86c52)
+1.  [Global mode](#org4f1a9ad)
+2.  [Per-command mode.](#org9a33c1f)
+3.  [Fallback mode](#org9aa3677)
+4.  [Tips](#orgb46c3e5)
+1.  [How to show fringe to ivy-posframe](#orgce86797)
+2.  [How to custom your ivy-posframe style](#org7e42dcb)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -32,7 +31,7 @@ NOTE: ivy-posframe requires Emacs 26 and do not support mouse
 click.
 
 
-
+
 
 ## Display functions
 
@@ -48,12 +47,12 @@ click.
 ![img](./snapshots/ivy-posframe-display-at-point.png)
 
 
-
+
 
 ## How to enable ivy-posframe
 
 
-
+
 
 ### Global mode
 
@@ -67,7 +66,7 @@ click.
 (ivy-posframe-enable)
 
 
-
+
 
 ### Per-command mode.
 
@@ -89,7 +88,7 @@ by ivy to find display function in 
\`ivy-display-functions-alist',
 "C-h v this-command" is a good idea.
 
 
-
+
 
 ### Fallback mode
 
@@ -98,20 +97,12 @@ by ivy to find display function in 
\`ivy-display-functions-alist',
 (ivy-posframe-enable)
 
 
-
+
 
 ## Tips
 
 
-
-
-### How to let ivy-posframe show border
-
-(set-face-attribute 'internal-border nil :background "gray50")
-(setq ivy-posframe-border-width 1)
-
-
-
+
 
 ### How to show fringe to ivy-posframe
 
@@ -123,7 +114,7 @@ By the way, User can set **any** parameters of ivy-posframe 
with
 the help of \`ivy-posframe-parameters'.
 
 
-
+
 
 ### How to custom your ivy-posframe style
 
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 3736df4..caa8511 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -91,12 +91,6 @@
 
 ;; ** Tips
 
-;; *** How to let ivy-posframe show border
-;; #+BEGIN_EXAMPLE
-;; (set-face-attribute 'internal-border nil :background "gray50")
-;; (setq ivy-posframe-border-width 1)
-;; #+END_EXAMPLE
-
 ;; *** How to show fringe to ivy-posframe
 ;; #+BEGIN_EXAMPLE
 ;; (setq ivy-posframe-parameters



[elpa] externals/ivy-posframe 1297ebc 078/195: Fix focus can go out of frame with multi line collections #31

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 1297ebc13fea6a3cb2696c01c34fb6d18e85356b
Author: Feng Shu 
Commit: Feng Shu 

Fix focus can go out of frame with multi line collections #31
---
 ivy-posframe.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 8858e10..aa677d0 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -217,10 +217,10 @@ This variable is useful for `ivy-posframe-read-action' .")
:poshandler poshandler
:background-color (face-attribute 'ivy-posframe :background)
:foreground-color (face-attribute 'ivy-posframe :foreground)
-   :height (or ivy-posframe-height ivy-height)
-   :width (or ivy-posframe-width (round (* (frame-width) 0.62)))
-   :min-height (or ivy-posframe-min-height 10)
-   :min-width (or ivy-posframe-min-width 50)
+   :height ivy-posframe-height
+   :width ivy-posframe-width
+   :min-height (or ivy-posframe-min-height (+ ivy-height 1))
+   :min-width (or ivy-posframe-min-width (round (* (frame-width) 0.62)))
:internal-border-width ivy-posframe-border-width
:internal-border-color (face-attribute 'ivy-posframe-border :background)
:override-parameters ivy-posframe-parameters



[elpa] externals/ivy-posframe 9872f35 135/195: Merge pull request #43 from conao3/ivy-posframe-mode

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 9872f35bad0d6b6f8e30b9c72b95b827cae5a2ed
Merge: b1ecab7 7e33255
Author: tumashu 
Commit: GitHub 

Merge pull request #43 from conao3/ivy-posframe-mode

Ivy-posframe now minor-mode
---
 README.md   | 107 ++---
 ivy-posframe.el | 209 +++-
 2 files changed, 212 insertions(+), 104 deletions(-)

diff --git a/README.md b/README.md
index f14f57c..55d9787 100644
--- a/README.md
+++ b/README.md
@@ -1,26 +1,25 @@
 Note: this file is auto converted from ivy-posframe.el by 
[el2org](https://github.com/tumashu/el2org), please do not edit it by hand!!!
 
 
-# 目录
+# Table of Contents
 
-1.  [ivy-posframe README](#orgf13cc66)
-1.  [What is ivy-posframe](#orgbd4ba62)
-2.  [Display functions](#orge8456a3)
-3.  [How to enable ivy-posframe](#orge72596b)
-1.  [Global mode](#org359004f)
-2.  [Per-command mode.](#orgdfd4dbf)
-3.  [Fallback mode](#org589575f)
-4.  [Tips](#orgd8d788b)
-1.  [How to show fringe to ivy-posframe](#org44b1a57)
-2.  [How to custom your ivy-posframe style](#org2e4b09d)
+1.  [ivy-posframe README](#orgb29527d)
+1.  [What is ivy-posframe](#org73ec970)
+2.  [Display functions](#org7dc9307)
+3.  [How to enable ivy-posframe](#org491e830)
+1.  [Global mode](#org38e37cf)
+2.  [Per-command mode.](#org89e4db4)
+4.  [Tips](#org2af7073)
+1.  [How to show fringe to ivy-posframe](#orgc0851d4)
+2.  [How to custom your ivy-posframe style](#orgdab58bc)
 
 
-
+
 
 # ivy-posframe README
 
 
-
+
 
 ## What is ivy-posframe
 
@@ -31,7 +30,7 @@ NOTE: ivy-posframe requires Emacs 26 and do not support mouse
 click.
 
 
-
+
 
 ## Display functions
 
@@ -47,35 +46,69 @@ click.
 ![img](./snapshots/ivy-posframe-display-at-point.png)
 
 
-
+
 
 ## How to enable ivy-posframe
 
 
-
+
 
 ### Global mode
 
 (require 'ivy-posframe)
-(setq ivy-display-function #'ivy-posframe-display)
-;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
-;; (setq ivy-display-function #'ivy-posframe-display-at-window-center)
-;; (setq ivy-display-function #'ivy-posframe-display-at-frame-bottom-left)
-;; (setq ivy-display-function #'ivy-posframe-display-at-window-bottom-left)
-;; (setq ivy-display-function #'ivy-posframe-display-at-point)
-(ivy-posframe-enable)
+;; display at `ivy-posframe-style'
+(setq ivy-posframe-display-functions-alist '((t . ivy-posframe-display)))
+;; (setq ivy-posframe-display-functions-alist '((t . 
ivy-posframe-display-at-frame-center)))
+;; (setq ivy-posframe-display-functions-alist '((t . 
ivy-posframe-display-at-window-center)))
+;; (setq ivy-posframe-display-functions-alist '((t . 
ivy-posframe-display-at-frame-bottom-left)))
+;; (setq ivy-posframe-display-functions-alist '((t . 
ivy-posframe-display-at-window-bottom-left)))
+(ivy-posframe-mode t)
 
 
-
+
 
 ### Per-command mode.
 
 (require 'ivy-posframe)
 ;; Different command can use different display function.
-(push '(counsel-M-x . ivy-posframe-display-at-window-bottom-left) 
ivy-display-functions-alist)
-(push '(complete-symbol . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
-(push '(swiper . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
-(ivy-posframe-enable)
+(setq ivy-posframe-display-functions-alist
+  '((swiper  . ivy-posframe-display-at-point)
+(complete-symbol . ivy-posframe-display-at-point)
+(counsel-M-x . ivy-posframe-display-at-window-bottom-left)
+(t   . ivy-posframe-display)))
+(ivy-posframe-mode t)
+
+You can use ivy original display function on specify function.
+You may want to use the original display function because display
+of Swiper at point hides the contents of the buffer.
+
+(require 'ivy-posframe)
+;; Different command can use different display function.
+(setq ivy-posframe-display-functions-alist
+  '((swiper  . nil)
+(complete-symbol . ivy-posframe-display-at-point)
+(counsel-M-x . ivy-posframe-display-at-window-bottom-left)
+(t   . ivy-posframe-display)))
+(ivy-posframe-mode t)
+
+You may want to change the height of ivy by a function only while
+using posframe. This is possible with the code below.
+
+The following example displays swiper on 20 lines by default for ivy,
+and displays other functions in posframe at the location specified on
+40 lines.
+
+(require 'ivy-posframe)
+;; Different command can use different display function.
+(setq ivy-posframe-height-alist '((swiper . 20)
+  (t  . 40)))
+
+(setq ivy-posframe-display-functions-alist
+  '((swiper  . nil)
+(complete-symbol . ivy-posframe-display-at-point)
+(counsel-M-x   

[elpa] externals/ivy-posframe d57087e 116/195: add additional-display-functions custom variable

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit d57087eb6f5e021c77542eb4015a7d65e0fe6bb9
Author: conao3 
Commit: conao3 

add additional-display-functions custom variable
---
 ivy-posframe.el | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index c18444f..113f994 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -176,6 +176,11 @@ When 0, no border is showed."
   :group 'ivy-posframe
   :type 'sexp)
 
+(defcustom ivy-posframe-additional-display-functions nil
+  "The additional display functions"
+  :group 'ivy-posframe
+  :type 'sexp)
+
 (defface ivy-posframe
   '((t (:inherit default)))
   "Face used by the ivy-posframe."
@@ -444,10 +449,11 @@ selection, non-nil otherwise."
 
 (defvar ivy-posframe-display-function-list
   (append
+   ivy-posframe-additional-display-functions
(mapcar (lambda (elm) (intern (format "ivy-posframe-display-at-%s" (car 
elm
-   ivy-posframe-display-function-alist))
-  '(ivy-posframe-display
-ivy-posframe-display-at-frame-bottom-window-center))
+   ivy-posframe-display-function-alist)
+   '(ivy-posframe-display
+ ivy-posframe-display-at-frame-bottom-window-center)))
 
 (defvar ivy-posframe-advice-alist
   '((ivy--minibuffer-setup . ivy-posframe--minibuffer-setup)



[elpa] externals/ivy-posframe d29f788 089/195: Again fix ivy-posframe-font seems take no effect. #36

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit d29f788ee23e3a79717b73d483c03ff9f1069751
Author: Feng Shu 
Commit: Feng Shu 

Again fix ivy-posframe-font seems take no effect. #36
---
 ivy-posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 6bac621..7db1620 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -222,7 +222,7 @@ This variable is useful for `ivy-posframe-read-action' .")
:min-height (or ivy-posframe-min-height (+ ivy-height 1))
:min-width (or ivy-posframe-min-width (round (* (frame-width) 0.62)))
:internal-border-width ivy-posframe-border-width
-   :internal-border-color (face-attribute 'ivy-posframe-border :background)
+   :internal-border-color (face-attribute 'ivy-posframe-border :background 
nil t)
:override-parameters ivy-posframe-parameters
 
 (defun ivy-posframe-display (str)



[elpa] externals/ivy-posframe 35d47bd 117/195: refine document

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit 35d47bd31a2a0a6b8db3ad9554dd1c3a54afca38
Author: conao3 
Commit: conao3 

refine document
---
 ivy-posframe.el | 48 
 1 file changed, 32 insertions(+), 16 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 113f994..e766914 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -54,21 +54,43 @@
 ;; *** Global mode
 ;; #+BEGIN_EXAMPLE
 ;; (require 'ivy-posframe)
-;; (setq ivy-display-function #'ivy-posframe-display)
-;; ;; (setq ivy-display-function #'ivy-posframe-display-at-frame-center)
-;; ;; (setq ivy-display-function #'ivy-posframe-display-at-window-center)
-;; ;; (setq ivy-display-function #'ivy-posframe-display-at-frame-bottom-left)
-;; ;; (setq ivy-display-function #'ivy-posframe-display-at-window-bottom-left)
-;; ;; (setq ivy-display-function #'ivy-posframe-display-at-point)
+;; (setq ivy-posframe-configure-alist
+;;   '((ivy-display-functions-alist . ((t . ivy-posframe-display)
+;; ;; (setq ivy-posframe-configure-alist
+;; ;;   '((ivy-display-functions-alist . ((t . 
ivy-posframe-display-at-frame-center)
+;; ;; (setq ivy-posframe-configure-alist
+;; ;;   '((ivy-display-functions-alist . ((t . 
ivy-posframe-display-at-window-center)
+;; ;; (setq ivy-posframe-configure-alist
+;; ;;   '((ivy-display-functions-alist . ((t . 
ivy-posframe-display-at-frame-bottom-left)
+;; ;; (setq ivy-posframe-configure-alist
+;; ;;   '((ivy-display-functions-alist . ((t . 
ivy-posframe-display-at-window-bottom-left)
+;; ;; (setq ivy-posframe-configure-alist
+;; ;;   '((ivy-display-functions-alist . ((t . 
ivy-posframe-display-at-point)
 ;; (ivy-posframe-mode t)
 ;; #+END_EXAMPLE
 ;; *** Per-command mode.
 ;; #+BEGIN_EXAMPLE
 ;; (require 'ivy-posframe)
 ;; ;; Different command can use different display function.
-;; (push '(counsel-M-x . ivy-posframe-display-at-window-bottom-left) 
ivy-display-functions-alist)
-;; (push '(complete-symbol . ivy-posframe-display-at-point) 
ivy-display-functions-alist)
-;; (push '(swiper . ivy-posframe-display-at-point) ivy-display-functions-alist)
+;; (setq ivy-posframe-configure-alist
+;;   '((ivy-display-functions-alist . ((swiper  . 
ivy-posframe-display-at-point)
+;; (complete-symbol . 
ivy-posframe-display-at-point)
+;; (counsel-M-x . 
ivy-posframe-display-at-window-bottom-left)
+;; (t   . 
ivy-posframe-display)
+;; (ivy-posframe-mode t)
+;; #+END_EXAMPLE
+;;
+;; You can use ivy original display function on specify function.
+;; You may want to use the original display function because display
+;; of Swiper at point hides the contents of the buffer.
+;; #+BEGIN_EXAMPLE
+;; (require 'ivy-posframe)
+;; ;; Different command can use different display function.
+;; (setq ivy-posframe-configure-alist
+;;   '((ivy-display-functions-alist . ((swiper  . nil)
+;; (complete-symbol . 
ivy-posframe-display-at-point)
+;; (counsel-M-x . 
ivy-posframe-display-at-window-bottom-left)
+;; (t   . 
ivy-posframe-display)
 ;; (ivy-posframe-mode t)
 ;; #+END_EXAMPLE
 ;;
@@ -82,13 +104,6 @@
 ;; by ivy to find display function in `ivy-display-functions-alist',
 ;; "C-h v this-command" is a good idea.
 
-;; *** Fallback mode
-;; #+BEGIN_EXAMPLE
-;; (require 'ivy-posframe)
-;; (push '(t . ivy-posframe-display) ivy-display-functions-alist)
-;; (ivy-posframe-mode t)
-;; #+END_EXAMPLE
-
 ;; ** Tips
 
 ;; *** How to show fringe to ivy-posframe
@@ -107,6 +122,7 @@
 ;; #+BEGIN_EXAMPLE
 ;; (defun ivy-posframe-display-at-XXX (str)
 ;;   (ivy-posframe--display str #'your-own-poshandler-function))
+;; (push 'ivy-posframe-display-at-XXX ivy-posframe-display-function-list) ; 
This line is needed.
 ;; (ivy-posframe-mode t) ; This line is needed.
 ;; #+END_EXAMPLE
 



[elpa] externals/ivy-posframe ba1bc4f 092/195: Update prompt in dynamic collections

2020-10-03 Thread Feng Shu
branch: externals/ivy-posframe
commit ba1bc4f97448ecee178267184772c0ff3e4c511a
Author: Troy Hinckley 
Commit: Troy Hinckley 

Update prompt in dynamic collections
---
 ivy-posframe.el | 26 +-
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index be8444a..27bb838 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -205,14 +205,7 @@ This variable is useful for `ivy-posframe-read-action' .")
   (posframe-show
ivy-posframe-buffer
:font ivy-posframe-font
-   :string
-   (with-current-buffer (window-buffer (active-minibuffer-window))
- (let ((point (point))
-   (string (if ivy-posframe--ignore-prompt
-   str
- (concat (buffer-string) "  " str
-   (add-text-properties (- point 1) point '(face ivy-posframe-cursor) 
string)
-   string))
+   :string str
:position (point)
:poshandler poshandler
:background-color (face-attribute 'ivy-posframe :background nil t)
@@ -223,7 +216,8 @@ This variable is useful for `ivy-posframe-read-action' .")
:min-width (or ivy-posframe-min-width (round (* (frame-width) 0.62)))
:internal-border-width ivy-posframe-border-width
:internal-border-color (face-attribute 'ivy-posframe-border :background 
nil t)
-   :override-parameters ivy-posframe-parameters
+   :override-parameters ivy-posframe-parameters))
+(ivy-posframe--add-prompt)))
 
 (defun ivy-posframe-display (str)
   (let ((func (intern (format "ivy-posframe-display-at-%s"
@@ -265,6 +259,19 @@ This variable is useful for `ivy-posframe-read-action' .")
   (when (ivy-posframe-read-action)
 (ivy-done)))
 
+(defun ivy-posframe--add-prompt ()
+  "Add the ivy prompt to the posframe."
+  (unless ivy-posframe--ignore-prompt
+(with-current-buffer (window-buffer (active-minibuffer-window))
+  (let ((point (point))
+(prompt (buffer-string)))
+(remove-text-properties 0 (length prompt) '(read-only nil) prompt)
+(with-current-buffer ivy-posframe-buffer
+  (goto-char (point-min))
+  (kill-line 1)
+  (insert prompt "  \n")
+  (add-text-properties point (1+ point) '(face 
ivy-posframe-cursor)))
+
 (defun ivy-posframe-read-action ()
   "Change the action to one of the available ones.
 
@@ -441,6 +448,7 @@ selection, non-nil otherwise."
   (define-key ivy-minibuffer-map [remap ivy-avy] 'ivy-posframe-avy)
   (define-key ivy-minibuffer-map [remap swiper-avy] 'ivy-posframe-swiper-avy)
   (advice-add 'ivy--minibuffer-setup :around #'ivy-posframe--minibuffer-setup)
+  (advice-add 'ivy--queue-exhibit :after #'ivy-posframe--add-prompt)
   (message "ivy-posframe is enabled, disabling it need to reboot emacs."))
 
 ;;;###autoload



  1   2   3   >