[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Support "\n" in icomplete-separator
From: |
Jean Louis |
Subject: |
Re: [PATCH] Support "\n" in icomplete-separator |
Date: |
Thu, 12 Nov 2020 01:26:46 +0300 |
User-agent: |
Mutt/2.0 (3d08634) (2020-11-07) |
* Ergus <spacibba@aol.com> [2020-11-12 00:58]:
> On Wed, Nov 11, 2020 at 08:37:36PM +0000, Gregory Heytings wrote:
> >
> > >
> > > If someone wants to claim that display of completion candidates by
> > > icomplete-vertical, ivy, etc. is anywhere near as pretty as what you
> > > get when you click on the address bar of a browser and get the
> > > drop-down list of candidates, then I can only say that I cannot
> > > disagree more.
> > >
> >
> > But why??? I just tried Ivy again, AFAICS it has everything you have in
> > the drop-down list of a browser: the matching substring is colorized,
> > you can use the mouse to click on a candidate to select it, you can use
> > the mouse to scroll the list up and down... What am I missing?
>
> Indeed, I don't see any important visual "disadvantage" in ivy
> appearance compared with what is around. Plus ivy adds some exclusive
> features like the M-o actions, avy integration (avy was created the same
> author) and hydra integration (also from same author). IMO (I already
> said that) we should put more attention to ivy if we want a
> better/pretty completion already working. Ivy solves details like the
> scrolling, long prompt, long like candidates and so on...
Exactly. Ivy is for me so much more useful than icomplete/ido/fido
And by adding this function from Ivy friend, it can be added to
ivy-display-functions-alist
Its value is
((counsel-irony . ivy-display-function-overlay)
(describe-function . ivy-display-function-window)
(ivy-completion-in-region . ivy-display-function-overlay)
(t . ivy-display-function-window))
Original value was
((ivy-completion-in-region . ivy-display-function-overlay)
(t))
Then the mode line stays down where it should be and split window
appears with collection.
I am including this hear as maybe icomplete developers wish to
implement similar.
(defun ivy-display-function-window (text)
(let ((buffer (get-buffer-create "*ivy-candidate-window*"))
(str (with-current-buffer (get-buffer-create " *Minibuf-1*")
(let ((point (point))
(string (concat (buffer-string) " " text)))
(add-face-text-property
(- point 1) point 'ivy-cursor t string)
string))))
(with-current-buffer buffer
(let ((inhibit-read-only t))
(erase-buffer)
(insert str)))
(with-ivy-window
(display-buffer
buffer
`((display-buffer-reuse-window
display-buffer-below-selected)
(window-height . ,(1+ (ivy--height (ivy-state-caller ivy-last)))))))))
- Re: [PATCH] Support "\n" in icomplete-separator, (continued)
- Re: [PATCH] Support "\n" in icomplete-separator, Eli Zaretskii, 2020/11/11
- Re: [PATCH] Support "\n" in icomplete-separator, Gregory Heytings, 2020/11/11
- Re: [PATCH] Support "\n" in icomplete-separator, Eli Zaretskii, 2020/11/11
- Re: [PATCH] Support "\n" in icomplete-separator, Gregory Heytings, 2020/11/11
- Re: [PATCH] Support "\n" in icomplete-separator, Ergus, 2020/11/11
- Re: [PATCH] Support "\n" in icomplete-separator, Stefan Monnier, 2020/11/11
- Re: [PATCH] Support "\n" in icomplete-separator,
Jean Louis <=
- Re: [PATCH] Support "\n" in icomplete-separator, Eli Zaretskii, 2020/11/11
- Re: [PATCH] Support "\n" in icomplete-separator, Gregory Heytings, 2020/11/12
- on helm substantial differences - Re: [PATCH] Support "\n" in icomplete-separator, Jean Louis, 2020/11/12
- Re: on helm substantial differences - Re: [PATCH] Support "\n" in icomplete-separator, Gregory Heytings, 2020/11/12
- Re: on helm substantial differences - Re: [PATCH] Support "\n" in icomplete-separator, Jean Louis, 2020/11/12
- Re: on helm substantial differences - Re: [PATCH] Support "\n" in icomplete-separator, Gregory Heytings, 2020/11/12
- Re: on helm substantial differences - Re: [PATCH] Support "\n" in icomplete-separator, Jean Louis, 2020/11/12
- Re: on helm substantial differences - Re: [PATCH] Support "\n" in icomplete-separator, Gregory Heytings, 2020/11/12
- Re: on helm substantial differences - Re: [PATCH] Support "\n" in icomplete-separator, Jean Louis, 2020/11/12
- Re: on helm substantial differences - Re: [PATCH] Support "\n" in icomplete-separator, Eli Zaretskii, 2020/11/12