smex
smex copied to clipboard
Add ivy as a completion back end option
- 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'.
:+1:
Looking forward to this being pulled.
:+1:
@nonsequitur when this is merged, it's going to be awesome!
Please merge this, it's excellent! :+1:
:+1:
Out of curiosity, what does smex do that counsel-M-x doesn't?
@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.
:+1:
:+1:
@abo-abo - Is there any particular reason you removed :group from the defcustom function calls?
it's excellent! suggest merge
I would be very grateful if this got merged.
@nonsequitur Hello?
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 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.
Consider counsel-M-x?
You can use flx with ivy as per this config
http://oremacs.com/2016/01/06/ivy-flx/
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 Installing the counsel package is all you need. Then M-x counsel-M-x should work.
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?
If you bind counsel-M-x to M-x then you should be fine:

@kaushalmodi Got it. I ran into an error because I didn't have swiper installed.
@asmeurer Install smex , counsel-M-x will use it to sort will recent used
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.
@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"))
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).
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).
@nonsequitur please merge this, it's very helpful!
In my opinion, if you are a ivy user, you should use counsel-M-x instead of smex.