[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

14.2.2 Batch Menus

Batch menus provide a menu that allows the user to mark items. Items are marked by highlighting an item, then pressing a corresponding key. The key pressed depends on the menu being shown, and the desired action. For example, in a menu allowing users to manage windows, windows to be closed/removed could be marked by <d>, and windows to be raised could be marked by <r>. All available actions and their keybindings are shown below. These can be customized with *batch-menu-map*.

n
Space

Highlight the next item.

p

Highlight the previous item.

u

Unmark the selected item, then move the cursor down.

DEL

Unmark the selected item, then move the cursor up if it is not at the top of the menu.

x
RET

Exit the menu and perform the actions associated with each mark.

Variable: *batch-menu-map*

The keymap used by batch-menu menus in addition to *menu-map*

Function: select-from-batch-menu screen table &key prompt allowed-markers initial-selection extra-keymap

Default Values:

  prompt             "Select:"
  allowed-markers    nil
  initial-selection  0
  extra-keymap       nil

Prompt the user with a menu that allows them to mark each item with a character. They can exit the menu by pressing enter, or whatever key is mapped to ’menu-finish’ in *menu-map*. Value returned is an alist, where the cdr of each entry is a list of items that were marked with that character. Note that the lisp printer cannot distinguish between ’(a . (b c d)) and ’(a b c d).

Example when "foo" and "bar" are marked with ’#d’, and "baz" is not marked: ((#d "foo" "bar") (NIL "baz")) ALLOWED-MARKERS is a list of characters. If this parameter is specified, no other markers are allowed. EXTRA-KEYMAP can be a keymap whose bindings will take precedence over the default bindings.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on February 2, 2024 using texi2html 1.82.