Hi.

Ainother day, another emacs doubt.

I’m using ivy-mode, and when I do M-x and write, the order of candidates for completion seems weird for me. I figure it obeys some logic, but I’d like to change it. For example:

I do M-x and write coun bu

Results are:

counsel-switch-buffer (this one is selected by default)

counsel-ibuffer

counsel-buffer-or-recentf

counsel-minibuffer-history

For me, counsel-buffer-or-recent should be the first candidate, since that’s the one with shortest “distance” between a match for coun and a match for bu. Is there a way to make results be sorted by this? So that those 4 candidate should appear like:

counsel-buffer-or-recentf

counsel-ibuffer

counsel-minibuffer-history

counsel-switch-buffer

Another example. I make M-x package-install then write consu. There are almost 15 results before consult. Being the shortest one matching perfectly the string, IMHO this should be the first candidate.

Another example, M-x dire. Results:

A couple of logical results (because they start with dired-)

tramp-crypt-add-directory

dired-jump-other-window

How is it that dired-jump appears after tramp-crypt-add-directory if the match for dire is further in the tramp-... candidate?

Any hint on this?

Thanks in advance.

  • SlowValue@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Not sure how plain ivy sorts its candidates, but do you have by chance any additional package installed? A package, which re-sorts the candidate list? A Package like prescient, smex, flx, historian, …?