                        GNU Emacs for emx FAQ

This is a list of frequently asked questions about GNU Emacs for emx
with answers.

See also the GNU Emacs FAQ, /emacs/19.33/data/FAQ; type C-h F in Emacs
to view that file.

----------------------------------------------------------------------

1:   How do I install Emacs in a directory other than /emacs?

  To install Emacs in, say, /usr/local/emacs, type

    cd \usr\local

  instead of

    cd \

  when following the installation instructions in emx/README.

  Ignore the following (benign) warning message:

    Warning: lisp library (/emacs/19.33/lisp) does not exist.

  If you don't want to install Emacs in a subdirectory named `emacs',
  move the files after unzipping.  Example:

    move emacs\19.33 \public\gnuemacs

  If you change the directory hierarchy of GNU Emacs (bin, data, etc,
  and lisp directories), you may have to set the EMACSPATH, EMACSDATA,
  EMACSDOC, and EMACSLOADPATH environment variables.  This is also
  required if you don't run emacs.exe from the bin directory of the
  GNU Emacs directory hierarchy.

2:   Where's emacs.exe, I can't find it in any ZIP file?

  Read and obey the installation instructions in README to create
  emacs.exe.

3:   Why do I get two windows, one of which is empty, if I start Emacs
     with the -pm option?

  The `empty' window contains Emacs proper (emacs.exe), the PM window
  contains the PM interface (pmemacs.exe).  There may be multiple PM
  windows (use C-x 5 2 to open another PM window, called `frame' in
  GNU jargon).  To avoid the emacs.exe window, start emacs.exe
  minimized.  The Emacs object created by instemacs.cmd automatically
  starts emacs.exe minimized.

4:   I don't get prompts from the Data Logic shell when running it in
     a shell-mode window.

  That's a bug in older versions of the shell.  Get version 2.3
  (ms_sh23b.zip) or later or use bash (ftp-os2.cdrom.com:
  /pub/os2/shellutl/bash_112.zip).

5:   How do I get white on black output in PM mode?

  Specify the foreground and background colors on the command line
  when starting Emacs:

    emacs -pm -fg white -bg black

  Using a "System VIO" font is recommended for white on black.  For
  black on white, the PM fonts look better.

6:   The PM window of Emacs isn't repainted properly, some pixels are
     left when scrolling.

  The font metrics of the first version of SMALL.FON are wrong.  See
  README on how to patch that file.

7:   The PM window of Emacs isn't painted properly when scrolling.
     When the window is partially obscured by other windows, that
     happens quite often.

  That's a bug which is not yet found and fixed.  Type C-l to repaint
  the window.

8:   Emacs doesn't find my info files.

  Set the INFOPATH environment variable.  It may contain multiple
  directories, separated by semicolons.  Alternatively, you can set
  Info-default-directory-list in .emacs or site-start.el.

9:   I cannot define the F1, F10 and Alt+F4 keys.

  F1, F10, Alt+Space, Alt+F4 through Alt+F11 (and Alt and AltGr) are
  used by the Presentation Manager as shortcuts.  Set the `shortcuts'
  frame parameter to nil.  This disables all the shortcuts.  Here's an
  example:

    (setq default-frame-alist (append '(shortcuts . nil) default-frame-alist))

  You can also keep some of the shortcuts.  See README for details. 

10:  I want to try the mode-specific menu of commands on C-mouse-3,
     but my mouse has only two buttons.

  You can temporarily swap mouse buttons 2 and 3 by setting the
  mouse-buttons frame parameter to "123":

    (modify-frame-parameters nil '((mouse-buttons . "123")))

  Alternatively, you can bind the menu to another, unused mouse event
  (it cannot be bound to a keyboard event):

    (global-set-key [C-S-down-mouse-1] 'mouse-major-mode-menu)

11:  How can I avoid the error message

       Cannot open doc string file "/emacs/19.33/data/doc"

     which is displayed if I run Emacs from a drive different from the
     installation drive or if I have installed Emacs in a non-standard
     directory?

  Either set both EMACSDATA and EMACSDOC or do not set both
  environment variables.  Setting EMACSDATA without setting EMACSDOC
  results in that error message.  It is recommended to not set these
  environment variables.

12:  Where can I find a list of colors?

  See `pm-color-alist' in /emacs/19.33/lisp/term/pm-win.el.  If you
  want to actually see all the colors, type

    M-x list-colors-display

  Note that this works only in high-color modes (1024 or more colors).

13:  File name completion and `dired' don't work correctly on CDROM.

  That's an OS/2 bug.  To work around the problem, use the command

    set emxopt=-!64

  before starting Emacs.  If you start Emacs by double-clicking on a
  WPS object, you have to put the command into config.sys.

14:  Why do programs run by Emacs hog the processor?  How can I reduce
     the priority of programs run by Emacs?

  In PM mode, the PM front end (pmemacs.exe) usually has the focus.
  OS/2 boosts the priority of the program having the focus to class
  `foreground'.  In consequence, Emacs proper (emacs.exe) shares the
  same priority with most other programs instead of being in the
  foreground priority class.  This makes Emacs sluggish.  To avoid
  this problem, the priority of emacs.exe is changed to class
  foreground in PM mode.  All this also applies to other programs run
  by Emacs, such as `ls' and RCS.  Usually, these should also run in
  the foreground priority class.

  If you prefer to run programs started by Emacs with regular
  priority, put

    (setq process-priority 'regular)

  into .emacs or site-start.el.  To do this only for certain programs
  such as compilers, write a program name handler for those programs
  which sets `process-priority'.  See lisp/emx-patch.el for examples.

15:  The C-h key deletes a character; how can I invoke help?  

  If you are using NPS WPS Enhancer, deselect `Key Translation' on the
  `Others' page of NPS WPS Enhancer's notebook.


16: `dired' says "unrecognized option `--unix'".  What's wrong?

  The version of ls.exe you are using is not supported by Emacs.  Get
  and install

    ftp.leo.org: /pub/comp/os/os2/gnu/systools/gnufutil.zip

  If you can't use that version of ls.exe, put the following code into
  your .emacs file:

    (defun pnh-ls (operation program args)
      (pnh-primitive operation program args 'pnh-ls))
