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

1. The XEmacs Frame

Frame
In many environments, such as a tty terminal, an XEmacs frame literally takes up the whole screen. If you are running XEmacs in a multi-window system like the X Window System, the XEmacs frame takes up one X window. See section 1.12 Using XEmacs Under the X Window System, for more information.

Window
No matter what environment you are running in, XEmacs allows you to look at several buffers at the same time by having several windows be part of the frame. Often, the whole frame is taken up by just one window, but you can split the frame into two or more subwindows. If you are running XEmacs under the X window system, that means you can have several XEmacs windows inside the X window that contains the XEmacs frame. You can even have multiple frames in different X windows, each with their own set of subwindows.

Each XEmacs frame displays a variety of information:

You can subdivide the XEmacs frame into multiple text windows, and use each window for a different file (see section 16. Multiple Windows). Multiple XEmacs windows are tiled vertically on the XEmacs frame. The upper XEmacs window is separated from the lower window by its mode line.

When there are multiple, tiled XEmacs windows on a single XEmacs frame, the XEmacs window receiving input from the keyboard has the keyboard focus and is called the selected window. The selected window contains the cursor, which indicates the insertion point. If you are working in an environment that permits multiple XEmacs frames, and you move the focus from one XEmacs frame into another, the selected window is the one that was last selected in that frame.

The same text can be displayed simultaneously in several XEmacs windows, which can be in different XEmacs frames. If you alter the text in an XEmacs buffer by editing it in one XEmacs window, the changes are visible in all XEmacs windows containing that buffer.

1.1 Point  The place in the text where editing commands operate.
1.2 The Echo Area  Short messages appear at the bottom of the frame.
1.3 The Mode Line  Interpreting the mode line.
1.4 GUI Components  Menubar, toolbars, gutters.
1.12 Using XEmacs Under the X Window System  Some information on using XEmacs under the X Window System.
1.13 Using XEmacs Under Microsoft Windows  Some information on using XEmacs under Microsoft Windows.


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

1.1 Point

When XEmacs is running, the cursor shows the location at which editing commands will take effect. This location is called point. You can use keystrokes or the mouse cursor to move point through the text and edit the text at different places.

While the cursor appears to point at a character, you should think of point as between two characters: it points before the character on which the cursor appears. The exception is at the end of the line, where the cursor appears after the last character of the line. Where the display is capable, the cursor at the end of the line will appear differently from a cursor over whitespace at the end of the line. (In an X Windows frame, the end-of-line cursor is half the width of a within-line cursor.) Sometimes people speak of "the cursor" when they mean "point," or speak of commands that move point as "cursor motion" commands.

Each XEmacs frame has only one cursor. When output is in progress, the cursor must appear where the typing is being done. This does not mean that point is moving. It is only that XEmacs has no way to show you the location of point except when the terminal is idle.

If you are editing several files in XEmacs, each file has its own point location. A file that is not being displayed remembers where point is. Point becomes visible at the correct location when you look at the file again.

When there are multiple text windows, each window has its own point location. The cursor shows the location of point in the selected window. The visible cursor also shows you which window is selected. If the same buffer appears in more than one window, point can be moved in each window independently.

The term `point' comes from the character `.', which was the command in TECO (the language in which the original Emacs was written) for accessing the value now called `point'.


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

1.2 The Echo Area

The line at the bottom of the frame (below the mode line) is the echo area. XEmacs uses this area to communicate with the user:


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

1.3 The Mode Line

Each text window's last line is a mode line which describes what is going on in that window. When there is only one text window, the mode line appears right above the echo area. The mode line is in inverse video if the terminal supports that, starts and ends with dashes, and contains text like `XEmacs: something'.

If a mode line has something else in place of `XEmacs: something', the window above it is in a special subsystem such as Dired. The mode line then indicates the status of the subsystem.

Normally, the mode line has the following appearance:

 
--ch-XEmacs: buf      (major minor)----pos------

This gives information about the buffer being displayed in the window: the buffer's name, what major and minor modes are in use, whether the buffer's text has been changed, and how far down the buffer you are currently looking.

ch contains two stars (`**') if the text in the buffer has been edited (the buffer is "modified"), or two dashes (`--') if the buffer has not been edited. Exception: for a read-only buffer, it is `%%'.

buf is the name of the window's chosen buffer. The chosen buffer in the selected window (the window that the cursor is in) is also XEmacs's selected buffer, the buffer in which editing takes place. When we speak of what some command does to "the buffer", we mean the currently selected buffer. See section 15. Using Multiple Buffers.

pos tells you whether there is additional text above the top of the screen or below the bottom. If your file is small and it is completely visible on the screen, pos is `All'. Otherwise, pos is `Top' if you are looking at the beginning of the file, `Bot' if you are looking at the end of the file, or `nn%', where nn is the percentage of the file above the top of the screen.

major is the name of the major mode in effect in the buffer. At any time, each buffer is in one and only one major mode. The available major modes include Fundamental mode (the least specialized), Text mode, Lisp mode, and C mode. See section 18. Major Modes, for details on how the modes differ and how you select one.

minor is a list of some of the minor modes that are turned on in the window's chosen buffer. For example, `Fill' means that Auto Fill mode is on. Abbrev means that Word Abbrev mode is on. Ovwrt means that Overwrite mode is on. See section 27.1 Minor Modes, for more information. `Narrow' means that the buffer being displayed has editing restricted to only a portion of its text. This is not really a minor mode, but is like one. See section 26.8 Narrowing. Def means that a keyboard macro is being defined. See section 27.4 Keyboard Macros.

Some buffers display additional information after the minor modes. For example, Rmail buffers display the current message number and the total number of messages. Compilation buffers and Shell mode display the status of the subprocess.

If XEmacs is currently inside a recursive editing level, square brackets (`[...]') appear around the parentheses that surround the modes. If XEmacs is in one recursive editing level within another, double square brackets appear, and so on. Since information on recursive editing applies to XEmacs in general and not to any one buffer, the square brackets appear in every mode line on the screen or not in any of them. See section 26.10 Recursive Editing Levels.

XEmacs can optionally display the time and system load in all mode lines. To enable this feature, type M-x display-time. The information added to the mode line usually appears after the file name, before the mode names and their parentheses. It looks like this:

 
hh:mmpm l.ll [d]

(Some fields may be missing if your operating system cannot support them.) hh and mm are the hour and minute, followed always by `am' or `pm'. l.ll is the average number of running processes in the whole system recently. d is an approximate index of the ratio of disk activity to CPU activity for all users.

The word `Mail' appears after the load level if there is mail for you that you have not read yet.

Customization note: the variable mode-line-inverse-video controls whether the mode line is displayed in inverse video (assuming the terminal supports it); nil means no inverse video. The default is t. For X frames, simply set the foreground and background colors appropriately.


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

1.4 GUI Components

When executed in a graphical windowing environment such as the X Window System or Microsoft Windows, XEmacs displays several graphical user interface components such as scrollbars, menubars, toolbars, and gutters. By default there is a vertical scrollbar at the right of each frame, and at the top of the frame there is a menubar, a toolbar, and a gutter, in that order. Gutters can contain any of several widgets, but the default configuration puts a set of "notebook tabs" which you can use as a shortcut for selecting any of several related buffers in a given frame. Operating the GUI components is "obvious": click on the menubar to pull down a menu, on a button in the toolbar to invoke a function, and on a tab in the gutter to switch buffers.

1.5 The XEmacs Menubar  How XEmacs uses the menubar.
1.6 XEmacs Scrollbars  How XEmacs uses scrollbars.
1.7 XEmacs Mode Lines  How XEmacs uses modelines.
1.8 XEmacs Toolbars  How XEmacs uses toolbars.
1.9 XEmacs Gutters  How XEmacs uses gutters.
1.10 Inhibiting Display of GUI Components  What if you don't like GUI?
1.11 Changing the Position, Orientation, and Appearance of GUI Components  Position, orientation, and appearance of GUI objects.


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

1.5 The XEmacs Menubar

The XEmacs menubar is intended to be conformant to the usual conventions for menubars, although conformance is not yet perfect. The menu at the extreme right is the `Help' menu, which should always be available. It provides access to all the XEmacs help facilities available through C-h, as well as samples of various configuration files like `~/.Xresources' and `~/.emacs'. At the extreme left is the `Files' menu, which provides the usual file reading, writing, and printing operations, as well as operations like revert buffer from most recent save. The next menu from the left is the `Edit' menu, which provides the `Undo' operation as well as cutting and pasting, searching, and keyboard macro definition and execution.

XEmacs provides a very dynamic environment, and the Lisp language makes for highly flexible applications. The menubar reflects this: many menus (eg, the `Buffers' menu, see section 2.4.5 The Buffers Menu) contain items determined by the current state of XEmacs, and most major modes and many minor modes add items to menus and even whole menus to the menubar. In fact, some applications like w3.el and VM provide so many menus that they define a whole new menubar and add a button that allows convenient switching between the "XEmacs menubar" and the "application menubar". Such applications normally bind themselves to a particular frame, and this switching only takes place on frames where such an application is active (ie, the current window of the frame is displaying a buffer in the appropriate major mode).

Other menus which are typically available are the `Options', `Tools', `Buffers', `Apps', and `Mule' menus. For detailed descriptions of these menus, 2.4 XEmacs Pull-down Menus. (In 21.2 XEmacsen, the `Mule' menu will be moved under `Options'.)


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

1.6 XEmacs Scrollbars

XEmacs scrollbars provide the usual interface. Arrow buttons at either end allow for line by line scrolling, including autorepeat. Clicking in the scrollbar itself provides scrolling by a windowful, depending on which side of the slider is clicked. The slider itself may be dragged for smooth scrolling.

The position of the slider corresponds to the position of the window in the buffer. In particular, the length of the slider is proportional to the fraction of the buffer which appears in the window.

The presence of the scrollbars is under control of the application or may be customized by the user. By default a vertical scrollbar is present in all windows (except the minibuffer), and there is no horizontal scrollbar.


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

1.7 XEmacs Mode Lines

When used in a windowing system, the XEmacs modelines can be dragged vertically. The effect is to resize the windows above and below the modeline (this includes the minibuffer window).

Additionally, a modeline can be dragged horizontally, in which case it scrolls its own text. This behavior is not enabled by default because it could be considered as disturbing when dragging vertically. When this behavior is enabled, the modeline's text can be dragged either in the same direction as the mouse, or in the opposite sense, making the modeline act as a scrollbar for its own text.

You can select the behavior you want from the `Display' submenu of the `Options' menu.


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

1.8 XEmacs Toolbars

XEmacs has a default toolbar which provides shortcuts for some of the commonly used operations (such as opening files) and applications (such as the Info manual reader). Operations which require arguments will pop up dialogs to get them.

The position of the default toolbar can be customized. Also, several toolbars may be present simultaneously (in different positions). VM, for example, provides an application toolbar which shortcuts for mail-specific operations like sending, saving, and deleting messages.


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

1.9 XEmacs Gutters

Gutters are the most flexible of the GUI components described in this section. In theory, the other GUI components could be implemented by customizing a gutter, but in practice the other components were introduced earlier and have their own special implementations. Gutters tend to be more transient than the other components. Buffer tabs, for example, change every time the selected buffer in the frame changes. And for progress gauges a gutter to contain the gauge is typically created on the fly when needed, then destroyed when the operation whose status is being displayed is completed.

Buffer tabs, having somewhat complex behavior, deserve a closer look. By default, a row of buffer tabs is displayed at the top of every frame. (The tabs could be placed in the bottom gutter, but would be oriented the same way and look rather odd. The horizontal orientation makes putting them in a side gutter utterly impractical.) The buffer displayed in the current window of a frame can be changed to a specific buffer by clicking [mouse-1] on the corresponding tab in the gutter.

Each tab contains the name of its buffer. The tab for the current buffer in each frame is displayed in raised relief. The list of buffers chosen for display in the buffer tab row is derived by filtering the buffer list (like the Buffers menu). The list starts out with all existing buffers, with more recently selected buffers coming earlier in the list.

Then "uninteresting" buffers, like internal XEmacs buffers, the *Message Log* buffer, and so on are deleted from the list. Next, the frame's selected buffer is determined. Buffers with a different major mode from the selected buffer are removed from the list. Finally, if the list is too long, the least recently used buffers are deleted from the list. By default up to 6 most recently used buffers with the same mode are displayed on tabs in the gutter.

This behavior can be altered by customizing buffers-tab-filter-functions. Setting this variable to nil forces display of all buffers, up to buffers-tab-max-size (also customizable). More complex behavior may be available in 3rd party libraries. These, and some more rarely customized options, are in the buffers-tab Customize group.


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

1.10 Inhibiting Display of GUI Components

Use of GUI facilities is a personal thing. Almost everyone agrees that drawing via keyboard-based "turtle graphics" is acceptable to hardly anyone if a mouse is available, but conversely emulating a keyboard with a screenful of buttons is a painful experience. But between those extremes the complete novice will require a fair amount of time before toolbars and menus become dispensable, but many an "Ancien Haquer" sees them as a complete waste of precious frame space that could be filled with text.

Display of all of the GUI components created by XEmacs can be inhibited through the use of Customize. Customize can be accessed through `Options | Customize' in the menu bar, or via M-x customize. Then navigate through the Customize tree to `Emacs | Environment'. Scrollbar and toolbar visibility is controlled via the `Display' group, options `Scrollbars visible' and `Toolbar visible' respectively. Gutter visibility is controlled by group `Gutter', option `Visible'.

Or they can be controlled directly by M-x customize-variable, by changing the values of the variables menubar-visible-p, scrollbars-visible-p, toolbar-visible-p, or gutter-buffers-tab-visible-p respectively. (The strange form of the last variable is due to the fact that gutters are often used to display transient widgets like progress gauges, which you probably don't want to inhibit. It is more likely that you want to inhibit the default display of the buffers tab widget, which is what that variable controls. This interface is subject to change depending on developer experience and user feedback.)

Control of frame configuration can controlled automatically according to various parameters such as buffer or frame because these are specifiers @xref{Specifiers, , , lispref}. Using these features requires programming in Lisp; Customize is not yet that sophisticated. Also, components that appear in various positions and orientations can have display suppressed according to position. C-h a visible-p gives a list of variables which can be customized. E.g., to control the visibility of specifically the left-side toolbar only, customize left-toolbar-visible-p.


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

1.11 Changing the Position, Orientation, and Appearance of GUI Components

#### Not documented yet.


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

1.12 Using XEmacs Under the X Window System

XEmacs can be used with the X Window System and a window manager like MWM or TWM. In that case, the X window manager opens, closes, and resizes XEmacs frames. You use the window manager's mouse gestures to perform the operations. Consult your window manager guide or reference manual for information on manipulating X windows.

When you are working under X, each X window (that is, each XEmacs frame) has a menu bar for mouse-controlled operations (see section 2.4 XEmacs Pull-down Menus).

XEmacs under X is also a multi-frame XEmacs. You can use the New Frame menu item from the File menu to create a new XEmacs frame in a new X window from the same process. The different frames will share the same buffer list, but you can look at different buffers in the different frames.

The function find-file-other-frame is just like find-file, but creates a new frame to display the buffer in first. This is normally bound to C-x 5 C-f, and is what the Open File, New Frame menu item does.

The function switch-to-buffer-other-frame is just like switch-to-buffer, but creates a new frame to display the buffer in first. This is normally bound to C-x 5 b.

You can specify a different default frame size other than the one provided. Use the variable default-frame-plist, which is a plist of default values for frame creation other than the first one. These may be set in your init file, like this:

 
  (setq default-frame-plist '(width 80 height 55))

This variable has replaced default-frame-alist, which is considered obsolete.

For values specific to the first XEmacs frame, you must use X resources. The variable x-frame-defaults takes an alist of default frame creation parameters for X window frames. These override what is specified in `~/.Xresources' but are overridden by the arguments to the particular call to x-create-frame.

When you create a new frame, the variable create-frame-hook is called with one argument, the frame just created.

If you want to close one or more of the X windows you created using New Frame, use the Delete Frame menu item from the File menu.

If you are working with multiple frames, some special information applies:


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

1.13 Using XEmacs Under Microsoft Windows

Use of XEmacs under MS Windows is not separately documented here, but most operations available under the X Window System are also available with MS Windows.

Where possible, native MS Windows GUI components and capabilities are used in XEmacs.


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

This document was generated by XEmacs Webmaster on August, 3 2012 using texi2html