NAME
xfemacs - Emacs with menubars, scrollbars and more

SYNOPSIS
xfemacs ?options? ?filenames?

OPTIONS

-display display
    Display (and screen) on which to display window.

-geometry geometry
    Initial geometry to use for window.

-function lisp-function
    Runs lisp function in emacs. The function must be a valid emacs function call (enclosed in '()').

-load file
    Loads the lisp code in the file file.

-client
    Starts xfemacs as client. This means that xfemacs tries to use an existing xfemacs for editing.

-xfColorFile filename
    This option specifies a file containing a list of all known colors. This file is automatically created when XF is installed, so please set this variable to the location of the Colors file of the installed XF (usually in the directory ./lib inside the XF distribution).

-xfFontFile filename
    This option specifies a file containing a list of all known fonts. This file is automatically created when XF is installed, so please set this variable to the location of the Fonts file of the installed XF (usually in the directory ./lib inside the XF distribution).

-xfLoadPath pathname
    This option specifies a list of pathnames (separated by ":") where the xfemacs Tcl source files can be found. In order to find the Tcl source files they must be stored in one of these directories.

filenames
    The given filenames are loaded into the emacs at startup.

DESCRIPTION

Xfemacs is a simple program that provides access to emacs (18.58 or later) under a Tcl/Tk environment. It is based upon the TkEmacs widget. You can define pull-down menus and popup menus which directly call emacs lisp functions. This gives you full access to emacs with additional functionality provided by Tcl/Tk. Xfemacs is just a little demo program for the TkEmacs widget, so don't expect too much. Feel free to adapt the program for your local needs. If you make substantial (interesting :-) changes, please let us know, so we can include them into future releases. To add a file to an xfemacs already running, you can call xfemacsc. This calls xfemacs as a client. That means that the files are loaded in the xfemacs already running.

MENU-STRUCTURE

The menu structure of xfemacs can be adapted by you. Select the menu item Menus in the pull-down menu Configure. You will get a dialog box which allows you the manipulation of the menubuttons and menus that are used by xfemacs. For users who are not familiar with the programming of Tcl/Tk we would recommend that you take a short look in the documentation of Tcl/Tk (especially concerning the menubuttons and the menus). If you only want to send lisp code this may not be necessary.

There are 15 menubuttons that can be configured. You see all available menubuttons in the list up right. Select one menubutton from the list to display its current configuration in the left area of the dialog box. If a menubutton has a label, it will be displayed; otherwise it will be hidden. The order of the menubuttons is not changeable. The menubutton has an option (named menu) that links a menu to a menubutton. By changing this option, you can change the order of the menus. Some of the resources can be changed with additional dialog boxes. To call such a dialog (i.e. a color selection box) double click the right mouse button into the text field you want to change. All changes can be applied to the menubutton by pressing the button Modify. If you change the visibility of a button (by adding/deleting a label) this change will affect the menubutton at the next startup of xfemacs.

The menus can be changed by selecting the menu in the list showing the names of all menus that are currently defined. You can change the parameters for the menu, or the items that the menu contains. In the first case the handling is exactly like the handling of menubuttons. The only difference is, that you can add/delete menus. If you select the button Modify Menu the dialog window changes and you see a list of the currently defined menu items that can be modified by you. The handling for modifying the menu items is the same as for menus and menubuttons. To change the type of the menu item to be inserted, you select the menubutton in the upper left corner named Menu entry.

The most important command is the Tcl command SendToEmacs that sends the passed parameter to emacs, where this lisp code is evaluated. If you want to have more direct control over the sending (i.e. to handle the return value) you can send the lisp code by typing: .frame.text send {lisp code}. For a more detailed description of the communication and handling of the Tcl/Tk - Emacs connection, read the manual for the TkEmacs widget.

To make your changes permanent you have to select the Save button in the dialog box for menu and menubutton changing. The new definition for the menu layout is stored to the file named ~/.xfemacs-c.tcl.

MODE SPECIFIC MENUS

You can define popup menus, that are specific for a certain emacs mode. This popup is activated by pressing <Mod1-Button3> (this default can be changed). The menu for a mode must have a certain name to be accessible. It must be child of the root window (.), and must have the same name as the mode where spaces are ignored (deleted). For Lisp Interaction mode, the name of the popup menu is: .LispInteraction. If a mode specific menu is defined, a double click on the left mouse button activates the first menu action of the mode menu.

SCROLLBARS

The linkage between the emacs widget and emacs is not strong enough to guarantee that the scrollbars are always in the correct size and at the correct location. There is a polling mechanism, that updates the scrollbar in a 10 second interval. Some of the most important emacs functions (in our opinion :-) update the scrollbar when they are called as well.

RESOURCES

You can configure the colors and fonts that xfemacs uses. These options are changed via the menu item Resources in the pull-down menu Configure. You have to save your changes by selecting the menu item Save. The options are stored to the file named ~/.xfemacs-o.tcl.

ENVIRONMENT

DISPLAY
    The default display to be used.

XF_COLOR_FILE
    This variable specifies a file containing a list of all known colors. This file is automatically created when XF is installed, so please set this variable to the location of the Colors file of the installed XF (usually in the directory ./lib inside the XF distribution).

XF_FONT_FILE
    This variable specifies a file containing a list of all known fonts. This file is automatically created when XF is installed, so please set this variable to the location of the Fonts file of the installed XF (usually in the directory ./lib inside the XF distribution).

XF_LOAD_PATH
    This variable specifies a list of pathnames (separated by ":") where the xfemacs Tcl source files can be found. In order to find the Tcl source files they must be stored in one of these directories.

WARNING

If you use this widget (program), be aware of the fact that it can lead into trouble. It was tested, but as emacs is a complex system and tk2.3 is a complex system, too, there may still be some problems.

If you encounter any problems, please let us know. If you are able to locate the bug, please send problems, bug fixes and ideas related with the emacs code to:

    nickel@cs.tu-berlin.de

and problems etc. with tk and the emacs C code (the modifications for TkEmacs, not general problems with emacs C code :-), to:

    garfield@cs.tu-berlin.de

If you don't know which one is the right address for your problem, it's no problem... Just send it to one of us (you will not be punished if it was the wrong address ;-).

Feel free to modify/adapt the sources and to write new lisp functions for improved functionality. If you do so, please let us know, so we can improve the widget for us and the other users (if there are any :-).

BUGS

•   The Buffers menu is a little sensitive. It can happen that you only get the correct pull-down menu after you have clicked the Buffers menubutton a few times. Sometimes the contents of the menu are not correct.

•   Surely there are many bugs.

KEYWORDS
emacs, wish, tkemacs, xf