0

I'm trying to get the same functionality as in spacemacs where package-install gives you a list of packages with fuzzy search. Pretty much smex for package-install. That way even if I don't know the exact name, I can still install the package. However, when I search this all I get are issues installing other packages.

Edit: Here's a picture of what I would like: spacemacs package install. I would like fuzzy search combined with a menu instead of just a minibuffer for package-install

3
  • Your question is unclear: you vaguely say what behavior you want, and you say you can get it in Spacemacs, but you don't say in which other context you want it. Also you say you "get issues" but don't say what are those. Finally, note that the default completion in Emacs accepts * for glob-patterns, so you can type *py TAB to see packages whose name includes py.
    – Stefan
    Nov 27, 2017 at 21:24
  • Fair enough. When I search for this exact feature, I get other, unrelated posts about having trouble installing packages. This is not related to my question Nov 27, 2017 at 22:09
  • If I understood you correctly, you are looking for a completion frontend such as ivy or helm, which overrides completing-read-function and related minibuffer/in-buffer completion options to provide "fuzzy" completion almost everywhere in Emacs. Enabling such modes automatically makes the M-x package-install RET completion session use "fuzzy" filtering.
    – Basil
    Nov 27, 2017 at 22:36

2 Answers 2

1

I'm using Ivy and I get the fuzzy search feature you seek. In general ivy is really nice, and offers smex-like completion in a lot of places, including M-x.

install-package

You can install and try it with (if you use use-package) with:

(use-package ivy
:ensure t
:diminish (ivy-mode)
:config
(ivy-mode 1))

and then run M-x package-install. Also worth knowing in ivy completions spaces are considered as any character so "ha de" is valid search for "haskell-mode".

Spacemacs defaults to helm narrowing framework that also offers similar capabilities but personally I prefer ivy.

0

One package that may provide you with the intended behavior is ido-ubiquitous.

Install it with:
package-install RET ido-ubiquitous

Activate it with:
(require 'ido-ubiquitous)
(ido-ubiquitous-mode)

Disclaimer: After I just installed it, the package says the following:

Warning (ido-ubiquitous): The ido-ubiquitous package is now redundant. All functionality, including ido-ubiquitous-mode, has been merged into the ido-completing-read+ package. You should replace ido-ubiquitous with ido-completing-read+ in your Emacs config. For more information, see: https://github.com/DarwinAwardWinner/ido-ubiquitous#version-40-changes

So the functionality may be moved to an other package.

7
  • I'm not a Spacemacs user, so I could very easily be wrong, but its documentation suggests the behaviour OP is looking for is provided by one of Helm or Ivy, not ido-completing-read-plus. You could, of course, still recommend ido-completing-read-plus, but you should the distinction clear in your answer.
    – Basil
    Nov 27, 2017 at 23:22
  • Neither helm nor ivy did a completion after the ’package-install’ command Nov 28, 2017 at 9:41
  • I don't follow. Helm and Ivy don't instigate completion; they change its behaviour and presentation. It is the package-install command which instigates completion by calling completing-read. Try this: 1. emacs -Q 2. M-x package-initialize RET 3. M-x ivy-mode RET OR M-x helm-mode RET 4. M-x package-install RET. You should get a completion session not too unlike the picture in the OP.
    – Basil
    Nov 28, 2017 at 15:55
  • If one installs a package (say ido-ubiquitous) in spacemacs without explicitly pulling it in via a layer, spacemacs will uninstall it at next startup or on SPC f e R. Dec 11, 2017 at 20:57
  • @Basil You are well right. I am not a Spacemacs user but GNU Emacs. If there are some fundamental differences in package handling please feel free to edit my answer so it fits Spacemacs specifications. Dec 12, 2017 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.