Skip to content

cpardotortosa/alien-sel

Repository files navigation

alien-sel: A list choice library for emacs.

Call alien-sel with a prompt and a list of choices, and a vertical list is shown for choosing with arrow keys. The minibuffer is activated for filtering.

screenshot.png

Features:

  • Filter options by typing in the minibuffer. Substring, regexp and flex matching available.
  • The selection list can appear in a normal window, or a ‘popup’ window where the cursor is. Popup have a couple of styles.

    screenshot_window.png

    screenshot_popup.png

    screenshot_popup2.png

  • Push filters to narrow selection.
  • Text of the items can be propertized. Properties are preserved in the return value.
  • The property alien-sel-val allows to specify a value to return different from the value to show.
  • The property alien-sel-subtext allows to specify a secondary line of text to display besides the items.

Goals:

  • Emacs’ ido is great, but the minibuffer is too far away from the editing most of the time.
  • Small library, but with categorization, filtering, and extra information for items. Most of this is not yet implemented.

Keys:

Option selection:

returnSelect the highlighted item and exit.
upMove selection up.
downMove selection down.
nextMove selection down a few lines.
priorMove selection up a few lines.
homeMove selection to the first element.
endMove selection to the last element.
M-downFall back to completing-read.

Filtering:

C-+Cycle filter types. Types available are: prefix/substring/flex, prefix/substring, prefix, and regexp.
C-returnPushes the current filter to the filter stack. The filtered list becomes the default list. The filter stack is shown in the modeline.
M-returnPops one element from the filter stack.

List presentation:

M-+Toggle numbering of list elements.
S-downIncrease the number of visible elements.
S-upDecrease the number of visible elements.
C-c 1Deletes all other windows, so the list window takes the whole frame.

Misc:

M-upActivate the window with the list, to resize it, copy text, etc. Once there, use M-down or C-g to get back to the minibuffer.

Next:

  • Documentation.
  • Commands to handle the popup frame: opacity, size, position.
  • When selecting the listing window, allow to make a choice from there too.
  • Item categories, by prefix or explicit. Allow to filter out categories.
  • Tab completion, initial input.

Releases

No releases published

Packages

No packages published