This section describes how a user profile should be incorporated into MicroEmacs '99. A user profile defines a set of extensions to MicroEmacs which encapsulates settings which are used by an individual user.
The user profile allows:-
In order to identify a user MicroEmacs '99 uses information in the system to determine the name of the user, and in turn the configuration to use. On all systems the value of the environment variable $MENAME(5) takes priority over any other means of user identification. If this variable is not defined then the host system typically provides a mechanism to determine the current user. DOS and Windows systems present problems where a login prompt is not supplied.
Each of the supported platforms are now described.
UNIX
DOS
SET MENAME=fred
Remember to re-boot the system before the new command takes effect. (see the next step, there is another change to autoexec.bat).
Microsoft Windows
If login is not enabled then the me32.ini(8) file may be modified to provide a default login name. To add the user fred then add the following lines to the ini file:-
[guest] MENAME=fred
If login is subsequently enabled on the system then these lines should be removed. These lines force the user identification to be fred.
The above technique may be used within the windows environment to modify your login name. Assuming that the system administrator has assigned fred a user login name of fwhite, and fred requires all of his configuration files to be the same name as his UNIX login which is fred. Then fred may force his user name to fred from the me32.ini file as follows:-
[fwhite] MENAME=fred
Once fred has entered MicroEmacs he will adopt his new login name which will be used to identify his own files etc. The action of this statement is to force the environment variable $MENAME to a new value. Any other environment variables may be forced in this way i.e. $HOSTNAME is a good candidate here as the me32.ini is local to the machine.
Shared Platforms
The private user profile is stored in a separate directory. The directory that MicroEmacs uses must be created by the user, create the directory in your local file system. In addition, the MicroEmacs search path $MEPATH(5) should be modified to include your new MicroEmacs personal directory.
UNIX
Add/modify the $MEPATH(5) environment variable to include your personal directory in your .login, .chsrc or .profile file, the file and exact syntax will depend upon your shell. For a Korn shell the following line would be added to the .profile file:-
export MEPATH=$HOME/.microemacs:/usr/local/microemacs
Where $HOME is assumed to be the users login home directory, or use the directory location of your new directory.
DOS
mkdir c:\me\fred
Change the $MEPATH(5) in the autoexec.bat to include the new directory i.e.
SET MEPATH=c:\me\fred;c:\me
Windows
userPath=C:\Program Files\JASSPA\MicroEmacs
Create your MicroEmacs personal directory in this folder, the name of the folder should be your login name or $MENAME, depending upon how your name is identified.
Once you have created a new directory to store your user profile, create a default profile for yourself from MicroEmacs using the user-setup(3) dialog:-
Help => User Setup
Fill in the entries in the dialog, and ensure that Save is depressed on exit to write the files.
The dictionaries often present difficulties the first time, a prompt to save the dictionary requires the full pathname and the name of the file, the pathname is the path to your personal folder, the filename is typically your username.edf. Once the file is created you will not have a problem in the future.
Files created in the user directory include:-
In addition to the above, if new file hooks are defined then they should be added to this directory (if they are not global to the company).
The following are examples of some individuals start-up files:-
; Jon's special settings ; ; Last Modified <190698.2226> ; ; Macro to delete the whitespace, or if an a word all of the ; word until the next word is reached. define-macro super-delete !while ¬ &sin @wc " \t\n" forward-delete-char !done !repeat forward-delete-char !until &or &seq @wc "" ¬ &sin @wc " \t\n" !return !emacro ; Macro to force buffer to compile buffer for C-x ' define-macro compile-error-buffer !force delete-buffer *compile* change-buffer-name "*compile*" !emacro ; ; Set up the bindings. ; global-bind-key super-delete "C-delete" global-bind-key beginning-of-line "home" global-bind-key end-of-line "end" global-bind-key undo "f4" ; ; Setup for windows and UNIX. ; ; Change the cursor blink rate. set-variable $cursor-blink 750 ; Set scrolling to smooth scroll set-variable $scroll 0x11 !if $use-x ; Small font is better for me. change-font "-misc-fixed-medium-r-normal--13-*-*-*-c-80-iso8859-1" !elif &seq $platform "win32" ; Change the size of the screen 82 change-screen-width 50 change-screen-depth !endif ; Define the home directories. !if &or &seq $platform "dos" &seq $platform "win32" ; Is it an MS system ?? set-variable $home "c:/usr/jon" !endif ; Like a korn shell please. ml-bind-key tab "esc esc" ; Change the default diff command-line for GNU diff utility all platforms set-variable %diff-com "diff --context --minimal --ignore-space-change --report-identical-files --recursive" ; Setup for cygnus !if &seq $platform "win32" set-variable %cygnus-bin-path "C:/Cygnus/B19/h-i386~1/bin" set-variable %cygnus-hilight 1 set-variable %cygnus-prompt "bash-2.01$" !endif ; Finished ml-write "Configured to Jon's requirements"
$MEPATH(5), $MENAME(5), user-setup(3), Company Profiles, File Hooks, File Language Templates, Installation.
(c) Copyright JASSPA 1999
Last Modified: 1999/06/02
Generated On: 1999/12/01