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

4. Message and Input Bar

Command: echo STRING

Display string in the message bar.

Command: colon &OPTIONAL INITIAL-INPUT

NIL


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

4.1 Customizing The Bar

The bar's appearance and behavior can be modified with the following functions and variables.

Function: set-fg-color COLOR

Set the foreground color for the message bar and input bar. color can be any color recognized by X.

Function: set-bg-color COLOR

Set the background color for the message bar and input bar. color can be any color recognized by X.

Function: set-border-color COLOR

Set the border color for the message bar and input bar. color can be any color recognized by X.

Function: set-msg-border-width WIDTH

Set the border width for the message bar and input bar.

Function: set-font FONT

Set the font for the message bar and input bar.

Variable: *message-window-padding*

The number of pixels that pad the text in the message window.

Variable: *message-window-gravity*

This variable controls where the message window appears. The follow are valid values.

:top-left
:top-right
:bottom-left
:bottom-right
:center
Variable: *timeout-wait*

Specifies, in seconds, how long a message will appear for. This must be an integer.

Variable: *input-window-gravity*

This variable controls where the input window appears. The follow are valid values.

:top-left
:top-right
:bottom-left
:bottom-right
:center

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

4.2 Using The Input Bar

The following is a list of keybindings for the input bar.

DEL

delete-backward-char

M-DEL

backward-kill-word

C-d
Delete

delete-forward-char

M-d

forward-kill-word

C-f
Right

forward-char

M-f

forward-word

C-b
Left

backward-char

M-b

backward-word

C-a
Home

move-beginning-of-line

C-e
End

move-end-of-line

C-k

kill-line

C-u

kill-to-beginning

C-p
Up

history-back

C-n
Down

history-forward

RET

submit

C-g

abort

C-y

yank-selection

TAB

Clockwise tab complete the current string, if possible. Press <TAB> again to cycle through completions.

S-TAB

Counter-clockwise tab complete the current string, if possible. Press <S-TAB> again to cycle through completions.


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

4.3 Programming The Message Bar

Function: echo-string SCREEN MSG

Display string in the message bar on screen. You almost always want to use message.

Function: message FMT &REST ARGS

NIL

Variable: *input-history-ignore-duplicates*

Do not add a command to the input history if it's already the first in the list.

Command: copy-last-message

Copy the last message displayed into the X selection


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

4.4 Programming the Input Bar

New input behavior can be added to the input bar by creating editing functions and binding them to keys in the *input-map* using define-key, just like other key bindings.

An input function takes 2 arguments: the input structure and the key pressed.

Function: read-one-line SCREEN PROMPT &OPTIONAL (INITIAL-INPUT )

NIL

Function: read-one-char SCREEN

Read a single character from the user.

Function: completing-read SCREEN PROMPT COMPLETIONS &OPTIONAL (INITIAL-INPUT )

NIL

Function: input-insert-string INPUT STRING

Insert string into the input at the current position. input must be of type input-line. Input functions are passed this structure as their first argument.

Function: input-insert-char INPUT CHAR

Insert char into the input at the current position. input must be of type input-line. Input functions are passed this structure as their first argument.

Variable: *input-map*

This is the keymap containing all input editing key bindings.


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

This document was generated by Shawn Betts on August, 4 2009 using texi2html 1.78.