This man page describes the four mechanisms used to customize Exmh: , the MH profile, X resources, and custom Tcl code.
Exmh is built with the assumption that you will want to customize it to some degree. The simplest way is by the user interface, which exposes numerous knobs and dials that you can adjust to control a lot of the behavior of exmh. The second way is by defining X resources. You will need to do this if you want to control fonts and colors. It would be great if there was a user interface for this, but this is something that has not been crossed off the TODO list, yet. You also use X resources to define new buttons and menus. The third way is by adding custom Tcl code to the implementation of exmh. A personal library of Tcl routines is supported. You can either add new buttons or menus to invoke your functionality, or take advantage of some hook points inside exmh to slip in your new feature. It is also possible to completely replace any module of the exmh implementation. Finally, there are a few MH profile components introduced by exmh, although these may eventually migrate out of the profile and into the package.
After you have used exmh a little, you should explore all its capabilities by clicking on the button. There is a two-level preferences scheme, mainly because there are too many knobs and dials. At the top-level you see a menu that corresponds to different modules of the implementation. Clicking on one of the items brings up the preferences items for that module. Use the Help... button to display more detailed information about the preference items. If you click on the label of an item, the help text is scrolled to the information for that item.
There are three types of options you can set through the dialog: choices, booleans, and general items. Each of these are tied to a Tcl variable and an X resource name. Changes in the Preference user interface change the value of the Tcl variable, which affects the exmh runtime behavior. Then, when you click Save in the dialog, the values are saved as X resource settings in your ~/.exmh/exmh-defaults file.
Choices are represented by radio-style buttons where only one button in the set can be enabled at once. Changes take effect immediately. Booleans are represented by check-style buttons. If the checkbox is dark, then the option is turned on. Changes take effect immediately. Numeric and filename settings have entry widgets in which you can type in a new value. Press <Return> for the change to take effect immediately (or choose Save).
You can cycle through all the preference dialogs by using the Next button, which takes you to the next preference section. There is also a Prev button to go back. You should take time at least once to go through all the Preference sections to get an idea of what sort of options are available.
If you decide you like your settings, click Save in the main dialog to save them in a exmh-defaults file in your ~/.exmh directory. Click Reset All in the main dialog to restore all the settings to those of your last Save. Within each module's preference dialog there is a Reset button that resets only those module's settings.
Warning! If you click Dismiss in the main dialog, some preferences may have been set for the current session, but they will not have been saved to your ~/.exmh/exmh-defaults file.
Here is a short summary of the preference sections and what features they control. The Tcl module that the section corresponds to is listed so you can dig into the code if you want to.
There are a number of keystroke bindings already defined by exmh that invoke different Tcl commands. You can change the bindings and add bindings for new commands via the Bind dialog. Open the dialog from the menu entry under the Bindings menu. The dialog presents a scrollable column of commands and their bindings, plus an area at the top to define a new binding.
Binding Syntax. The following is a very brief summary of the Tk bind syntax. For the complete story, consult the Tk man page for the bind command. The Tk syntax for the bindings events looks like this:
A modifier is a key that you hold down while pressing another key. The modifiers you are likely to use are listed below. Capitalization is important.<modifier-type-detail>
The type is the event type, and it can left out if the detail part implies the type. The types you will usually use are:Control Shift Meta
The detail specifies the key or button number for the event. Keys are named by their X keysym. For the letters and digits, the keysym is just the letter or digit, e.g., <Key-a>, which can be shortened to <a>. For punctuation, however,Key Button
the keysyms are words. Here are some examples, and again the Key type is left out.
Perhaps the easiest way to figure out the keysym is to use the following Tcl/Tk command. Run the Tcl/Tk shell, wish, and enter this command. Then type with the mouse over the little window it displays.<comma> <period> <dollar> <asciicircum> <question> <exclam>
bind . <Any-Key> {puts stdout "keysym = %K letter = %A"}
Exmh uses a couple of things from your .mh_profile file, including several components that are new.
By default, show all headers. If a header is in the Header-Suppress list, do not show it. If a header is in the Header-Display list, show it. The default values for these profile components are: Header-Suppress: .* Header-Display: Subject To From Date Cc Newsgroups
If you are a mail junky, you may want to use Header-Suppress to explicitly suppress the boring header components you already know about. The new, interesting components inserted by random mailers will be displayed for you to check out. In contrast, the default for Header-Suppress will hide everything, and you explicitly choose what headers you want to see by setting Header-Display.
* matches a sequence of any characters. ? matches any character. The default Folder-Order puts your inbox first. Folder-Order: inbox * My Folder-Order looks like: Folder-Order: personal exmh mxedit * mail* sun m3 mach background
The other effect of Folder-Order is to define a traversal order for visiting folders with unread mail in them. When you do a Next and are at the end of a folder, exmh will automatically change folders to the next one in the Folder-Order that has unseen messages, if any. When there are no more folders with unseen mail, then you will change back to the first folder in your Folder-Order, unless you disable this by turning off the Cycle back to first preference setting under the Unseen Folders section.
The X resource database is used as a repository of Preference settings, window positions, and definitions of fonts, colors, buttons, and menus. The information in the database can come from a variety of sources, which can be confusing. The default values come from the app-defaults file that is kept in the script library directory for exmh. Color-specific resources are contained in the app-defaults-color or app-defaults-mono file. One of these two is used depending on the display.
A site administrator can add local resource specifications in the local-app-defaults file. Put this into the exmh script library directory (the same place as app-defaults). To handle site-specific color-specific resources, exmh will also read the local.app-defaults-color or local.app-defaults-mono if those files exist.
Each user has a ~/.exmh/exmh-defaults file in their home directory. To handle personal color-specific resources, exmh will also read your ~/.exmh/exmh-defaults-color or ~/.exmh/exmh-defaults-mono if those files exist.
I do not recommend putting exmh-related resource settings in your ~/.Xdefaults, although you can do that. If you do, be warned that values from the ~/.Xdefaults file and the RESOURCE_MANAGER property on the root window will be overridden by things in your ~/.exmh/exmh-defaults file.
The ~/.exmh/exmh-defaults file is divided into sections. The first section is for things you add by hand. The remaining sections are automatically managed by exmh. If you manually add settings to your ~/.exmh/exmh-defaults file, add entries to the beginning of this file. Add them before the comment about the rest of the file being automatically generated and you will not lose your changes.
If a resource has a multiword value, you *should not quote* the value in the resource file. The right way to specify these in your ~/.exmh/exmh-defaults file is shown below. The leading "*" gets around quirks in the way Tk names its applications; different instances of the application have different names.
*scrollbarSide: left *c_current: violet red
Finally, if you are really serious about fiddling with resources, you should look through the app-defaults file. For one thing, there is no guarantee that the resource names used in this man page, which correspond to version 1.5, will be exactly the same in later versions of exmh. Furthermore, there might be new goodies that appear in future versions that are not described here. Only by reading the app-defaults file of the current version will you be sure you are setting things correctly in your ~/.exmh/exmh-defaults file. (Hint: read through the main exmh script for the definition of the exmh(library) Tcl variable, which is the script library where app-defaults lives. The script is short, and the definition is near the beginning.)
If you want to dive into the widget tree and fiddle with fonts and colors and such, here are the class descriptions. I also highly recommend the tkinspect program, which you can find in the Tcl archives.
exmh uses X resources to specify its buttons and menus on the main display, the editor window, and the What Now dialog. You can add a button to one of these areas of the user interface by listing it in a ubuttonlist resource and then adding some more resources that describe the button. X resource names are hierarchical, and these are the button list resources used by exmh.
Fops is the set of folder operation buttons. Mops is the set of message operations buttons. Sedit.Menubar is the buttons in the built-in editor. WhatNow is the What Now dialog used with external editors. The ubuttonlist resource is necessary because there is no easy way to enumerate the contents of the resource database.*Main.ubuttonlist *Fops.ubuttonlist *Mops.ubuttonlist *Sedit.Menubar.ubuttonlist *WhatNow.ubuttonlist
There are actually several resources associated with each set of buttons in order to provide maximum flexibility. There are three sources of button definitions: system buttons are defined by the base release ("at the factory"); local buttons are defined by your site administrator; user buttons are defined by each user. In addition, the site and the user can delete buttons with other resources. The resources are:
When exmh creates a set of buttons, (e.g., the *Main buttons), t asks for the definition of all these resources to determine what buttons are being defined (e.g., *Main.buttonlist, *Main.ubuttonlist, and so on.) For each of these buttons, additional resources specify the text label and command for each button. This is best explained by an example. Here are the definitions for the main buttons:buttonlist The list of system defined buttons lbuttonlist The list of local (site) defined buttons ubuttonlist The list of user defined buttons l-buttonlist The list of buttons deleted at the local level. u-buttonlist The list of buttons deleted at the user level.
The *Main.buttonlist resource names the buttons that appear in the top row of buttons. Its value, in turn causes exmh to look around for the other resources that define the text and command attributes for each button. The command is a Tcl command, and most are simple commands of one or two words. If you are really inspired you can set many different attributes of a Tk button via resources, but you'll have to consult the Tk man page on button for the details.*Main.buttonlist: quit pref alias *Main.quit.text: Quit *Main.quit.command: Exmh_Done *Main.pref.text: Preferences *Main.pref.command: Preferences_Dialog *Main.alias.text: Aliases *Main.alias.command: Aliases_Pref
As another example, here is how you would add a Repl button to the message buttons. By default, there are a few variations on Reply under the Reply... menu. You might like a Repl button that does your most common form of reply. The Msg_Reply Tcl command takes regular arguments for the MH repl program.
*Mops.ubuttonlist: myrepl *Mops.myrepl.text: Repl *Mops.myrepl.command: Msg_Reply -filter myrepl.filter -cc all
If you hate the Reply... menu altogether, you can remove it by adding it to the u-buttonlist resource. You'll have to look at the master app-defaults file to find out the internal name of each button.
*Mops.u-buttonlist: reply
The menus in exmh are defined in a similar way. It is a little more complex because there is more to a menu than a button, but the general idea is the same. There are parallel sets of resources for the system-defined and user-defined parts. Each section has a list of menus defined with the following resources:
menulist The list of system defined menus lmenulist The list of local (site) defined menus umenulist The list of user defined menus l-menulist The list of menus deleted at the local level. u-menulist The list of menus deleted at the user level.
Each menu, in turn, has a text resource that defines the label on the menubutton. The entrylist resource lists the entries that are found under the menu. Again, the system-defined entries are listed under entrylist, the administrator defines lentrylist, and users are meant to add new entries to uentrylist. System (or local) defined entries can be removed by adding them to the l-entrylist and u-entrylist resources.
For each menu entry there are resources with the following naming convention (this is not standard Tk): if the entrylist item is foo, then:
For more information, it might be helpful to consult the Tk man page for menu adminmmary of the Tk bind syntax. For the complete story, consult the Tk man page for the bind command. The Tk syntax for the bindings events looks like this:l_foo defines the label (text) for the entry. c_foo defines the command. t_foo defines the type: "command", "check", "radio", "cascade", or "separator". v_foo defines the variable associated with check and radio entries. m_foo defines the menu associated with cascade entries.
A modifier is a key that you hold down while pressing another key. The modifiers you are likely to use are listed below. Capitalization is important.<modifier-type-detail>
The type is the event type, and it can left out if the detail part implies the type. The types you will usually use are:Control Shift Meta
The detail specifies the key or button number for the event. Keys are named by their X keysym. For the letters and digits, the keysym is just the letter or digit, e.g., <Key-a>, which can be shortened to <a>. For punctuation, however,Key Button
the keysyms are words. Here are some examples, and again the Key type is left out.
Perhaps the easiest way to figure out the keysym is to use the following Tcl/Tk command. Run the Tcl/Tk shell, wish, and enter this command. Then type with the mouse over the little window it displays.<comma> <period> <dollar> <asciicircum> <question> <exclam>
bind . <Any-Key> {puts stdout "keysym = %K letter = %A"}
Exmh uses a couple of things from your .mh_profile file, including several components that are new.
By default, show all headers. If a header is in the Header-Suppress list, do not show it. If a header is in the Header-Display list, show it. The default values for these profile components are: Header-Suppress: .* Header-Display: Subject To From Date Cc Newsgroups
If you are a mail junky, you may want to use Header-Suppress to explicitly suppress the boring header components you already know about. The new, interesting components inserted by random mailers will be displayed for you to check out. In contrast, the default for Header-Suppress will hide everything, and you explicitly choose what headers you want to see by setting Header-Display.
* matches a sequence of any characters. ? matches any character. The default Folder-Order puts your inbox first. Folder-Order: inbox * My Folder-Order looks like: Folder-Order: personal exmh mxedit * mail* sun m3 mach background
The other effect of Folder-Order is to define a traversal order for visiting folders with unread mail in them. When you do a Next and are at the end of a folder, exmh will automatically change folders to the next one in the Folder-Order that has unseen messages, if any. When there are no more folders with unseen mail, then you will change back to the first folder in your Folder-Order, unless you disable this by turning off the Cycle back to first preference setting under the Unseen Folders section.
The X resource database is used as a repository of Preference settings, window positions, and definitions of fonts, colors, buttons, and menus. The information in the database can come from a variety of sources, which can be confusing. The default values come from the app-defaults file that is kept in the script library directory for exmh. Color-specific resources are contained in the app-defaults-color or app-defaults-mono file. One of these two is used depending on the display.
A site administrator can add local resource specifications in the local-app-defaults file. Put this into the exmh script library directory (the same place as app-defaults). To handle site-specific color-specific resources, exmh will also read the local.app-defaults-color or local.app-defaults-mono if those files exist.
Each user has a ~/.exmh/exmh-defaults file in their home directory. To handle personal color-specific resources, exmh will also read your ~/.exmh/exmh-defaults-color or ~/.exmh/exmh-defaults-mono if those files exist.
I do not recommend putting exmh-related resource settings in your ~/.Xdefaults, although you can do that. If you do, be warned that values from the ~/.Xdefaults file and the RESOURCE_MANAGER property on the root window will be overridden by things in your ~/.exmh/exmh-defaults file.
The ~/.exmh/exmh-defaults file is divided into sections. The first section is for things you add by hand. The remaining sections are automatically managed by exmh. If you manually add settings to your ~/.exmh/exmh-defaults file, add entries to the beginning of this file. Add them before the comment about the rest of the file being automatically generated and you will not lose your changes.
If a resource has a multiword value, you *should not quote* the value in the resource file. The right way to specify these in your ~/.exmh/exmh-defaults file is shown below. The leading "*" gets around quirks in the way Tk names its applications; different instances of the application have different names.
*scrollbarSide: left *c_current: violet red
Finally, if you are really serious about fiddling with resources, you should look through the app-defaults file. For one thing, there is no guarantee that the resource names used in this man page, which correspond to version 1.5, will be exactly the same in later versions of exmh. Furthermore, there might be new goodies that appear in future versions that are not described here. Only by reading the app-defaults file of the current version will you be sure you are setting things correctly in your ~/.exmh/exmh-defaults file. (Hint: read through the main exmh script for the definition of the exmh(library) Tcl variable, which is the script library where app-defaults lives. The script is short, and the definition is near the beginning.)
If you want to dive into the widget tree and fiddle with fonts and colors and such, here are the class descriptions. I also highly recommend the tkinspect program, which you can find in the Tcl archives.
exmh uses X resources to specify its buttons and menus on the main display, the editor window, and the What Now dialog. You can add a button to one of these areas of the user interface by listing it in a ubuttonlist resource and then adding some more resources that describe the button. X resource names are hierarchical, and these are the button list resources used by exmh.
Fops is the set of folder operation buttons. Mops is the set of message operations buttons. Sedit.Menubar is the buttons in the built-in editor. WhatNow is the What Now dialog used with external editors. The ubuttonlist resource is necessary because there is no easy way to enumerate the contents of the resource database.*Main.ubuttonlist *Fops.ubuttonlist *Mops.ubuttonlist *Sedit.Menubar.ubuttonlist *WhatNow.ubuttonlist
There are actually several resources associated with each set of buttons in order to provide maximum flexibility. There are three sources of button definitions: system buttons are defined by the base release ("at the factory"); local buttons are defined by your site administrator; user buttons are defined by each user. In addition, the site and the user can delete buttons with other resources. The resources are:
When exmh creates a set of buttons, (e.g., the *Main buttons), t asks for the definition of all these resources to determine what buttons are being defined (e.g., *Main.buttonlist, *Main.ubuttonlist, and so on.) For each of these buttons, additional resources specify the text label and command for each button. This is best explained by an example. Here are the definitions for the main buttons:buttonlist The list of system defined buttons lbuttonlist The list of local (site) defined buttons ubuttonlist The list of user defined buttons l-buttonlist The list of buttons deleted at the local level. u-buttonlist The list of buttons deleted at the user level.
The *Main.buttonlist resource names the buttons that appear in the top row of buttons. Its value, in turn causes exmh to look around for the other resources that define the text and command attributes for each button. The command is a Tcl command, and most are simple commands of one or two words. If you are really inspired you can set many different attributes of a Tk button via resources, but you'll have to consult the Tk man page on button for the details.*Main.buttonlist: quit pref alias *Main.quit.text: Quit *Main.quit.command: Exmh_Done *Main.pref.text: Preferences *Main.pref.command: Preferences_Dialog *Main.alias.text: Aliases *Main.alias.command: Aliases_Pref
As another example, here is how you would add a Repl button to the message buttons. By default, there are a few variations on Reply under the Reply... menu. You might like a Repl button that does your most common form of reply. The Msg_Reply Tcl command takes regular arguments for the MH repl program.
*Mops.ubuttonlist: myrepl *Mops.myrepl.text: Repl *Mops.myrepl.command: Msg_Reply -filter myrepl.filter -cc all
If you hate the Reply... menu altogether, you can remove it by adding it to the u-buttonlist resource. You'll have to look at the master app-defaults file to find out the internal name of each button.
*Mops.u-buttonlist: reply
The menus in exmh are defined in a similar way. It is a little more complex because there is more to a menu than a button, but the general idea is the same. There are parallel sets of resources for the system-defined and user-defined parts. Each section has a list of menus defined with the following resources:
menulist The list of system defined menus lmenulist The list of local (site) defined menus umenulist The list of user defined menus l-menulist The list of menus deleted at the local level. u-menulist The list of menus deleted at the user level.
Each menu, in turn, has a text resource that defines the label on the menubutton. The entrylist resource lists the entries that are found under the menu. Again, the system-defined entries are listed under entrylist, the administrator defines lentrylist, and users are meant to add new entries to uentrylist. System (or local) defined entries can be removed by adding them to the l-entrylist and u-entrylist resources.
For each menu entry there are resources with the following naming convention (this is not standard Tk): if the entrylist item is foo, then:
For more information, it might be helpful to consult the Tk man page for menu adminmmary of the Tk bind syntax. For the complete story, consult the Tk man page for the bind command. The Tk syntax for the bindings events looks like this:l_foo defines the label (text) for the entry. c_foo defines the command. t_foo defines the type: "command", "check", "radio", "cascade", or "separator". v_foo defines the variable associated with check and radio entries. m_foo defines the menu associated with cascade entries.
A modifier is a key that you hold down while pressing another key. The modifiers you are likely to use are listed below. Capitalization is important.<modifier-type-detail>
The type is the event type, and it can left out if the detail part implies the type. The types you will usually use are:Control Shift Meta
The detail specifies the key or button number for the event. Keys are named by their X keysym. For the letters and digits, the keysym is just the letter or digit, e.g., <Key-a>, which can be shortened to <a>. For punctuation, however,Key Button
the keysyms are words. Here are some examples, and again the Key type is left out.
Perhaps the easiest way to figure out the keysym is to use the following Tcl/Tk command. Run the Tcl/Tk shell, wish, and enter this command. Then type with the mouse over the little window it displays.<comma> <period> <dollar> <asciicircum> <question> <exclam>
bind . <Any-Key> {puts stdout "keysym = %K letter = %A"}
Exmh uses a couple of things from your .mh_profile file, including several components that are new.
By default, show all headers. If a header is in the Header-Suppress list, do not show it. If a header is in the Header-Display list, show it. The default values for these profile components are: Header-Suppress: .* Header-Display: Subject To From Date Cc Newsgroups
If you are a mail junky, you may want to use Header-Suppress to explicitly suppress the boring header components you already know about. The new, interesting components inserted by random mailers will be displayed for you to check out. In contrast, the default for Header-Suppress will hide everything, and you explicitly choose what headers you want to see by setting Header-Display.
* matches a sequence of any characters. ? matches any character. The default Folder-Order puts your inbox first. Folder-Order: inbox * My Folder-Order looks like: Folder-Order: personal exmh mxedit * mail* sun m3 mach background
The other effect of Folder-Order is to define a traversal order for visiting folders with unread mail in them. When you do a Next and are at the end of a folder, exmh will automatically change folders to the next one in the Folder-Order that has unseen messages, if any. When there are no more folders with unseen mail, then you will change back to the first folder in your Folder-Order, unless you disable this by turning off the Cycle back to first preference setting under the Unseen Folders section.
The X resource database is used as a repository of Preference settings, window positions, and definitions of fonts, colors, buttons, and menus. The information in the database can come from a variety of sources, which can be confusing. The default values come from the app-defaults file that is kept in the script library directory for exmh. Color-specific resources are contained in the app-defaults-color or app-defaults-mono file. One of these two is used depending on the display.
A site administrator can add local resource specifications in the local-app-defaults file. Put this into the exmh script library directory (the same place as app-defaults). To handle site-specific color-specific resources, exmh will also read the local.app-defaults-color or local.app-defaults-mono if those files exist.
Each user has a ~/.exmh/exmh-defaults file in their home directory. To handle personal color-specific resources, exmh will also read your ~/.exmh/exmh-defaults-color or ~/.exmh/exmh-defaults-mono if those files exist.
I do not recommend putting exmh-related resource settings in your ~/.Xdefaults, although you can do that. If you do, be warned that values from the ~/.Xdefaults file and the RESOURCE_MANAGER property on the root window will be overridden by things in your ~/.exmh/exmh-defaults file.
The ~/.exmh/exmh-defaults file is divided into sections. The first section is for things you add by hand. The remaining sections are automatically managed by exmh. If you manually add settings to your ~/.exmh/exmh-defaults file, add entries to the beginning of this file. Add them before the comment about the rest of the file being automatically generated and you will not lose your changes.
If a resource has a multiword value, you *should not quote* the value in the resource file. The right way to specify these in your ~/.exmh/exmh-defaults file is shown below. The leading "*" gets around quirks in the way Tk names its applications; different instances of the application have different names.
*scrollbarSide: left *c_current: violet red
Finally, if you are really serious about fiddling with resources, you should look through the app-defaults file. For one thing, there is no guarantee that the resource names used in this man page, which correspond to version 1.5, will be exactly the same in later versions of exmh. Furthermore, there might be new goodies that appear in future versions that are not described here. Only by reading the app-defaults file of the current version will you be sure you are setting things correctly in your ~/.exmh/exmh-defaults file. (Hint: read through the main exmh script for the definition of the exmh(library) Tcl variable, which is the script library where app-defaults lives. The script is short, and the definition is near the beginning.)
If you want to dive into the widget tree and fiddle with fonts and colors and such, here are the class descriptions. I also highly recommend the tkinspect program, which you can find in the Tcl archives.
exmh uses X resources to specify its buttons and menus on the main display, the editor window, and the What Now dialog. You can add a button to one of these areas of the user interface by listing it in a ubuttonlist resource and then adding some more resources that describe the button. X resource names are hierarchical, and these are the button list resources used by exmh.
Fops is the set of folder operation buttons. Mops is the set of message operations buttons. Sedit.Menubar is the buttons in the built-in editor. WhatNow is the What Now dialog used with external editors. The ubuttonlist resource is necessary because there is no easy way to enumerate the contents of the resource database.*Main.ubuttonlist *Fops.ubuttonlist *Mops.ubuttonlist *Sedit.Menubar.ubuttonlist *WhatNow.ubuttonlist
There are actually several resources associated with each set of buttons in order to provide maximum flexibility. There are three sources of button definitions: system buttons are defined by the base release ("at the factory"); local buttons are defined by your site administrator; user buttons are defined by each user. In addition, the site and the user can delete buttons with other resources. The resources are:
When exmh creates a set of buttons, (e.g., the *Main buttons), t asks for the definition of all these resources to determine what buttons are being defined (e.g., *Main.buttonlist, *Main.ubuttonlist, and so on.) For each of these buttons, additional resources specify the text label and command for each button. This is best explained by an example. Here are the definitions for the main buttons:buttonlist The list of system defined buttons lbuttonlist The list of local (site) defined buttons ubuttonlist The list of user defined buttons l-buttonlist The list of buttons deleted at the local level. u-buttonlist The list of buttons deleted at the user level.
The *Main.buttonlist resource names the buttons that appear in the top row of buttons. Its value, in turn causes exmh to look around for the other resources that define the text and command attributes for each button. The command is a Tcl command, and most are simple commands of one or two words. If you are really inspired you can set many different attributes of a Tk button via resources, but you'll have to consult the Tk man page on button for the details.*Main.buttonlist: quit pref alias *Main.quit.text: Quit *Main.quit.command: Exmh_Done *Main.pref.text: Preferences *Main.pref.command: Preferences_Dialog *Main.alias.text: Aliases *Main.alias.command: Aliases_Pref
As another example, here is how you would add a Repl button to the message buttons. By default, there are a few variations on Reply under the Reply... menu. You might like a Repl button that does your most common form of reply. The Msg_Reply Tcl command takes regular arguments for the MH repl program.
*Mops.ubuttonlist: myrepl *Mops.myrepl.text: Repl *Mops.myrepl.command: Msg_Reply -filter myrepl.filter -cc all
If you hate the Reply... menu altogether, you can remove it by adding it to the u-buttonlist resource. You'll have to look at the master app-defaults file to find out the internal name of each button.
*Mops.u-buttonlist: reply
The menus in exmh are defined in a similar way. It is a little more complex because there is more to a menu than a button, but the general idea is the same. There are parallel sets of resources for the system-defined and user-defined parts. Each section has a list of menus defined with the following resources:
menulist The list of system defined menus lmenulist The list of local (site) defined menus umenulist The list of user defined menus l-menulist The list of menus deleted at the local level. u-menulist The list of menus deleted at the user level.
Each menu, in turn, has a text resource that defines the label on the menubutton. The entrylist resource lists the entries that are found under the menu. Again, the system-defined entries are listed under entrylist, the administrator defines lentrylist, and users are meant to add new entries to uentrylist. System (or local) defined entries can be removed by adding them to the l-entrylist and u-entrylist resources.
For each menu entry there are resources with the following naming convention (this is not standard Tk): if the entrylist item is foo, then:
For more information, it might be helpful to consult the Tk man page for menu adminmmary of the Tk bind syntax. For the complete story, consult the Tk man page for the bind command. The Tk syntax for the bindings events looks like this:l_foo defines the label (text) for the entry. c_foo defines the command. t_foo defines the type: "command", "check", "radio", "cascade", or "separator". v_foo defines the variable associated with check and radio entries. m_foo defines the menu associated with cascade entries.
A modifier is a key that you hold down while pressing another key. The modifiers you are likely to use are listed below. Capitalization is important.<modifier-type-detail>
The type is the event type, and it can left out if the detail part implies the type. The types you will usually use are:Control Shift Meta
The detail specifies the key or button number for the event. Keys are named by their X keysym. For the letters and digits, the keysym is just the letter or digit, e.g., <Key-a>, which can be shortened to <a>. For punctuation, however,Key Button
the keysyms are words. Here are some examples, and again the Key type is left out.
Perhaps the easiest way to figure out the keysym is to use the following Tcl/Tk command. Run the Tcl/Tk shell, wish, and enter this command. Then type with the mouse over the little window it displays.<comma> <period> <dollar> <asciicircum> <question> <exclam>
bind . <Any-Key> {puts stdout "keysym = %K letter = %A"}
Exmh uses a couple of things from your .mh_profile file, including several components that are new.
By default, show all headers. If a header is in the Header-Suppress list, do not show it. If a header is in the Header-Display list, show it. The default values for these profile components are: Header-Suppress: .* Header-Display: Subject To From Date Cc Newsgroups
If you are a mail junky, you may want to use Header-Suppress to explicitly suppress the boring header components you already know about. The new, interesting components inserted by random mailers will be displayed for you to check out. In contrast, the default for Header-Suppress will hide everything, and you explicitly choose what headers you want to see by setting Header-Display.
* matches a sequence of any characters. ? matches any character. The default Folder-Order puts your inbox first. Folder-Order: inbox * My Folder-Order looks like: Folder-Order: personal exmh mxedit * mail* sun m3 mach background
The other effect of Folder-Order is to define a traversal order for visiting folders with unread mail in them. When you do a Next and are at the end of a folder, exmh will automatically change folders to the next one in the Folder-Order that has unseen messages, if any. When there are no more folders with unseen mail, then you will change back to the first folder in your Folder-Order, unless you disable this by turning off the Cycle back to first preference setting under the Unseen Folders section.
The X resource database is used as a repository of Preference settings, window positions, and definitions of fonts, colors, buttons, and menus. The information in the database can come from a variety of sources, which can be confusing. The default values come from the app-defaults file that is kept in the script library directory for exmh. Color-specific resources are contained in the app-defaults-color or app-defaults-mono