smex icon indicating copy to clipboard operation
smex copied to clipboard

Add ivy as a completion back end option

Open abo-abo opened this issue 10 years ago • 29 comments

  • smex.el (smex-completion-method): New defcustom. Leave ido as the default. (smex-auto-update): (smex-save-file): (smex-history-length): (smex-prompt-string): (smex-flex-matching): No need to specify group. (smex-map): New defvar. Users can cutomize this in a more robust way. (smex-prepare-ido-bindings): Update. (smex-completing-read): Dispatch on smex-completion-method'. (smex-initialize): Update. (smex-do-with-selected-item): Dispatch onsmex-completion-method'.

abo-abo avatar Apr 17 '15 16:04 abo-abo

:+1:

joedicastro avatar May 06 '15 18:05 joedicastro

Looking forward to this being pulled.

kaushalmodi avatar Jun 01 '15 18:06 kaushalmodi

:+1:

goofansu avatar Sep 19 '15 21:09 goofansu

@nonsequitur when this is merged, it's going to be awesome!

PythonNut avatar Sep 21 '15 17:09 PythonNut

Please merge this, it's excellent! :+1:

jasonm23 avatar Dec 24 '15 01:12 jasonm23

:+1:

ryepesg avatar Jan 15 '16 16:01 ryepesg

Out of curiosity, what does smex do that counsel-M-x doesn't?

PythonNut avatar Jan 15 '16 17:01 PythonNut

@PythonNut counsel misses the command ranking that smex does. For example, with smex, when you call counsel-M-x, you will see the last used command top most in the list. Without smex, you will just get an alphabetically sorted list.

kaushalmodi avatar Jan 15 '16 18:01 kaushalmodi

:+1:

zakkak avatar Feb 23 '16 18:02 zakkak

:+1:

iffsid avatar Mar 04 '16 15:03 iffsid

@abo-abo - Is there any particular reason you removed :group from the defcustom function calls?

mrwacky42 avatar Mar 21 '16 20:03 mrwacky42

it's excellent! suggest merge

tumashu avatar Aug 21 '16 23:08 tumashu

I would be very grateful if this got merged.

Trevoke avatar Aug 30 '16 20:08 Trevoke

@nonsequitur Hello?

kaushalmodi avatar Aug 30 '16 20:08 kaushalmodi

I just took a (granted fairly quick) look through the gists, inf-ruby and this repo, and I see no activity from @nonsequitur in quite a long time. I don't know if he or she is alive, frankly. We might need to create a fork for this code so we can continue maintaining it.

Maybe we shouldn't jump the shark, though. I know nothing of this person.

Trevoke avatar Aug 30 '16 20:08 Trevoke

@Trevoke Well, @nonsequitur last had activity last July, and this issue was opened in April last year (16 months ago). Looks like the maintainer is somehow not interested in this.

kaushalmodi avatar Aug 30 '16 21:08 kaushalmodi

Consider counsel-M-x?

You can use flx with ivy as per this config

http://oremacs.com/2016/01/06/ivy-flx/

jasonm23 avatar Aug 30 '16 23:08 jasonm23

Sure, I can try it. Where can I find counsel-M-x ? I tried installing counsel through the package manager, maybe that's not good enough?

On Tue, Aug 30, 2016 at 7:09 PM Jason Milkins [email protected] wrote:

Consider counsel-M-x?

You can use flx with ivy as per this config

http://oremacs.com/2016/01/06/ivy-flx/

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nonsequitur/smex/pull/51#issuecomment-243610209, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEJSZJjaKgJ8n3sKzUBEMf1ley24f9Bks5qlLgwgaJpZM4EC4yS .

Trevoke avatar Aug 31 '16 12:08 Trevoke

@Trevoke Installing the counsel package is all you need. Then M-x counsel-M-x should work.

kaushalmodi avatar Aug 31 '16 12:08 kaushalmodi

I just tried counsel, but I was disappointed that the default completions when I type M-x are ordered alphabetically, instead of by most recently used. Maybe I need to configure something?

asmeurer avatar Aug 31 '16 18:08 asmeurer

If you bind counsel-M-x to M-x then you should be fine:

image

Trevoke avatar Aug 31 '16 20:08 Trevoke

@kaushalmodi Got it. I ran into an error because I didn't have swiper installed.

Trevoke avatar Aug 31 '16 20:08 Trevoke

@asmeurer Install smex , counsel-M-x will use it to sort will recent used

tumashu avatar Aug 31 '16 21:08 tumashu

Ah. I had originally left smex enabled, but got some error about it (I'll have to check what it was on my other computer tomorrow, some undefined variable error I think), so I disabled it.

asmeurer avatar Sep 01 '16 03:09 asmeurer

@Trevoke Yup, installing it using the in-built package manager would have done it automatically for you. From counsel.el:

;; Package-Requires: ((emacs "24.3") (swiper "0.8.0"))

kaushalmodi avatar Sep 01 '16 14:09 kaushalmodi

Ah. I had originally left smex enabled, but got some error about it (I'll have to check what it was on my other computer tomorrow, some undefined variable error I think), so I disabled it.

"Symbol's value as variable is void: smex-initialized-p"

If I manually execute (setq smex-initalized-p t) it works (and things are in the right order).

asmeurer avatar Sep 01 '16 16:09 asmeurer

Oh, I see. I've been using the branch from https://github.com/nonsequitur/smex/pull/12. CC @haxney I guess removing smex-initialize in that PR breaks counsel compatibility (and it looks like I already noticed this two years ago smh).

asmeurer avatar Sep 01 '16 16:09 asmeurer

@nonsequitur please merge this, it's very helpful!

joca-bt avatar Jul 10 '17 17:07 joca-bt

In my opinion, if you are a ivy user, you should use counsel-M-x instead of smex.

tumashu avatar Jul 10 '17 22:07 tumashu