home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / os2 / e17read.txt < prev    next >
Text File  |  1993-08-09  |  36KB  |  1,022 lines

  1. ===============================================================================
  2. GNU Emacs 19 for emx (OS/2 2.0 and 2.1)                             26-Jul-1993
  3. ===============================================================================
  4.  
  5. Introduction
  6. ============
  7.  
  8. This is GNU Emacs 19.17 for emx on OS/2 2.0 or 2.1.  The port was done
  9. by Eberhard Mattes based on ideas of the port of GNU Emacs for OS/2
  10. done by Joerg Viola.  There is a slight chance that this port of GNU
  11. Emacs also works with emx on MS-DOS, but that hasn't been tested.
  12.  
  13.  
  14. Distribution files
  15. ==================
  16.  
  17. The "GNU Emacs 19.17 for emx" distribution consists of the following
  18. files:
  19.  
  20.   README                this file (/emacs/19.17/emx/README)
  21.   e17el1.zip            Emacs Lisp files (source), part 1
  22.   e17el2.zip            Emacs Lisp files (source), part 2
  23.   e17info.zip           info files (on-line help)
  24.   e17lib1.zip           Emacs Lisp library (base set, compiled)
  25.   e17lib2.zip           Emacs Lisp library (remaining files, compiled)
  26.   e17man.zip            documentation files (mostly for TeX)
  27.   e17min.zip            minimal set of files for running GNU Emacs
  28.   e17more.zip           additional files
  29.   e17rest.zip           remaining files
  30.   e17src.zip            sources
  31.  
  32.  
  33. Other files of interest
  34. =======================
  35.  
  36. GNU Emacs 19.17 for emx requires emx 0.8g -- if you have an older
  37. version of emx.dll, emxbind.exe and termcap.dat, get emxrt.zip from
  38.  
  39.   ftp.uni-stuttgart.de [129.69.1.12]: /soft/os2/emx-0.8g
  40.   ftp-os2.nmsu.edu  [128.123.35.151]: /os2/2_x/unix/gnu/emx08g
  41.   src.doc.ic.ac.uk     [146.169.2.1]: /pub/packages/os2/2_x/unix/gnu/emx08g
  42.   ftp.informatik.tu-muenchen.de [131.159.0.198]:
  43.                                       /pub/comp/os/os2/devtools/emx+gcc
  44.  
  45. You might want to also get the following files:
  46.  
  47.   ftp-os2.nmsu.edu:              os2/all/graphics/smallfnt.zip
  48.   ftp-os2.nmsu.edu:              os2/all/unix/shells/ms_sh21c.zip
  49.   ftp-os2.nmsu.edu:              os2/2_x/unix/unixutils/isp3009b.zip
  50.   ftp.informatik.tu-muenchen.de: pub/comp/os/os2/gnu/systools/gnufutil.zip
  51.   prep.ai.mit.edu:               pub/gnu/elisp-2.01.1.tar.gz
  52.  
  53. smallfnt.zip contains a small fixed-width bitmapped font for the
  54. Presentation Manager.
  55.  
  56. ms_sh21c.zip contains the Data Logic shell, a Unix-like shell.
  57.  
  58. isp3009b.zip contains Ispell, a spelling checker, which can be used
  59. with GNU Emacs.
  60.  
  61. gnufutil.zip contains the GNU file utilities.  ls.exe is required for
  62. dired and for recover-file.
  63.  
  64. elisp-2.01.1.tar.gz contains the Emacs Lisp documentation.
  65.  
  66.  
  67. Installing the emx runtime package
  68. ==================================
  69.  
  70. Install the emx runtime package emxrt.zip (version 0.8g or later) if
  71. not already installed.  First, unpack the files of the emx runtime
  72. package to your hard disk:
  73.  
  74.   cd \
  75.   unzip a:emxrt
  76.  
  77. Installation of the emx runtime package involves changing the LIBPATH
  78. statement of your config.sys file and setting the following
  79. environment variables in config.sys:
  80.  
  81.   TERMCAP  name of termcap file, defaults to /emx/etc/termcap.dat
  82.  
  83.   TERM     name of the terminal, possible values include rmono,
  84.            ansi-color-2 and ansi-color-3
  85.  
  86.   PATH     include \emx\bin in your PATH
  87.  
  88. Example (the emx runtime package is installed on drive C):
  89.  
  90.   LIBPATH=C:\OS2\DLL;[...];c:\emx\dll
  91.   SET PATH=C:\OS2;C:\OS2\SYSTEM;[...];c:\emx\bin
  92.   SET TERMCAP=c:/emx/etc/termcap.dat
  93.   SET TERM=ansi-color-3
  94.  
  95. See \emx\doc\emxrt.doc and \emx\book\emxrt.inf for details on
  96. installing the emx runtime package.
  97.  
  98.  
  99. Installing GNU Emacs
  100. ====================
  101.  
  102. This section describes how to install the compiled version of GNU
  103. Emacs 19.17 for emx on OS/2 2.0 and 2.1.
  104.  
  105. GNU Emacs is installed in the \emacs directory of a HPFS drive.
  106.  
  107. 1.  Get lots of disk space on an HPFS partition.  As this version of
  108.     GNU Emacs doesn't bother about 8.3 file names, you can't install
  109.     it on a FAT partition.  (Well, probably you can, but it has not
  110.     been tested.)  However, you can edit files on FAT partitions.
  111.  
  112. 2.  Set appropriate environment variables (set them in config.sys):
  113.  
  114.       SHELL          name of the command processor, defaults to
  115.                      /bin/sh.  If you have a Unix-like shell (such as
  116.                      the Data Logic shell), you should use the path
  117.                      name of that shell.  Otherwise, use the path name
  118.                      of cmd.exe
  119.  
  120.       EMACSLOADPATH  path to Lisp library, defaults to /emacs/19.17/lisp
  121.  
  122.       EMACSPATH      path to programs, defaults to /emacs/19.17/bin
  123.  
  124.       SYSTEMNAME     initializes system-name, the name of the
  125.                      machine.  The default value is "my-system"
  126.  
  127.       HOME           your home path, replaces ~ in path names.  Emacs
  128.                      tries to load .emacs, for instance, from that
  129.                      directory
  130.  
  131.       TMP            directory for temporary files.  The default is
  132.                      the current working directory
  133.  
  134.     Example (Emacs will be installed on drive C):
  135.  
  136.       SET PATH=C:\OS2;[...];C:\EMACS\19.17\BIN
  137.       SET SHELL=c:/bin/sh.exe
  138.       SET EMACSLOADPATH=c:/emacs/19.17/lisp
  139.       SET EMACSPATH=c:/emacs/19.17/bin
  140.       SET SYSTEMNAME=vergil
  141.       SET HOME=c:/home
  142.       SET TMP=c:/tmp
  143.  
  144. 3.  Reboot your computer to activate the new config.sys settings.
  145.  
  146. 4.  To install a minimal version of GNU Emacs, change to the target
  147.     drive and unpack the file e17min.zip by typing
  148.  
  149.       cd \
  150.       unzip a:e17min
  151.  
  152.     on an HPFS drive.  Note that you cannot use PKUNZIP to unpack
  153.     the ZIP files.
  154.  
  155. 5.  Create a preloaded version of GNU Emacs by typing
  156.  
  157.       cd \emacs\19.17\bin
  158.       dump
  159.  
  160.     In case you're short of disk space, you can delete the file
  161.     \emacs\19.17\bin\temacs now.  If you want to dump Emacs again,
  162.     restore that file from e17min.zip.
  163.  
  164. 6.  Now you can run GNU Emacs by typing
  165.  
  166.       emacs                   (run Emacs in text mode)
  167.       emacs -d                (run Emacs in PM mode)
  168.  
  169. 7.  The minimal version of GNU Emacs installed now is hardly usable.
  170.     For instance, there is no on-line help.  You should install
  171.     additional files:
  172.  
  173.       cd \
  174.       unzip a:e17lib1
  175.       unzip a:e17more
  176.       unzip a:e17info
  177.  
  178. 8.  To unpack all the .el files, type
  179.  
  180.       cd \
  181.       unzip a:e17el1
  182.       unzip a:e17el2
  183.  
  184.     For running GNU Emacs, only the compiled (.elc) files are
  185.     required. You need the .el files if you need documentation about
  186.     the various Emacs Lisp packages or want to change them.
  187.  
  188.     Additional files are packaged in the remaining ZIP files:
  189.  
  190.       cd \
  191.       unzip a:e17lib2
  192.       unzip a:e17rest
  193.       unzip a:e17man
  194.  
  195.     These files are usually not required for running GNU Emacs under
  196.     emx.
  197.  
  198. 9.  You might want to add program objects for the programs
  199.  
  200.       c:\emacs\19.17\bin\emacs.exe
  201.       c:\emacs\19.17\bin\emacsclient.exe
  202.  
  203.     to an appropriate folder.  There is a REXX program called
  204.     instemacs.cmd to do this for you.  Type
  205.  
  206.       instemacs
  207.  
  208.     to get a list of options.  To simply create the program objects,
  209.     type
  210.  
  211.       instemacs install
  212.  
  213.     This creates a folder called "New Things" on your desktop which
  214.     contains the new objects.  If you would like to create a shadow of
  215.     Emacs in your startup folder, you can additionally use the
  216.     "startup" option.  To automatically associate Emacsclient with
  217.     plain text files, use the "associate" option.  instemacs.cmd will
  218.     copy the current associatations of the OS/2 System Editor for
  219.     Emacsclient.  For Emacsclient to work, an instance of Emacs must
  220.     be running and the server must be active.  You will probably want
  221.     to put the line
  222.  
  223.       (server-start)
  224.  
  225.     in your site-start.el file (see below) and use the "startup"
  226.     option.
  227.  
  228.     In a standard OS/2 installation, the OS/2 System Editor is
  229.     automatically associated with text files so that double clicking a
  230.     text file opens the System Editor.  You can specify the
  231.     "makedefault" option when calling instemacs.cmd to make
  232.     Emacsclient the default "view" for text files.
  233.  
  234.     NOTE: The "makedefault" option of instemacs.cmd manipulates the
  235.     Workplace Shell associations in an undocumented way by directly
  236.     accessing certain values in OS2.INI.  This has only been tested
  237.     under OS/2 2.1 GA (US version).  There is no guarantee that this
  238.     will work on any other version of OS/2.  But then there is no
  239.     guarantee that any of the programs in this package will work at
  240.     all, anyway :-).
  241.  
  242.     Note that instemacs.cmd creates the program objects in such a way
  243.     that emacs.exe is started as a Presentation Manager program,
  244.     although it is actually a text mode program.  This is because
  245.     emacs.exe actually calls pmemacs.exe to provide the PM interface.
  246.     If emacs.exe were started as a text mode program, it would have
  247.     its own VIO window, which is usually useless.
  248.  
  249.     Starting emacs.exe as a PM program has two known disadvantages:
  250.  
  251.     (a)  You don't see the standard output of emacs.exe.  If Emacs
  252.          crashes for any reason, you won't see any diagnostics or
  253.          error messages and you can't tell Emacs to auto-save (if it
  254.          happens to ask).
  255.  
  256.     (b)  If you double click on the Emacs object when Emacs is already
  257.          running, you will not bring the Emacs window to the
  258.          foreground but something else, usually the Window List.
  259.          Double clicking on Emacs in the Window List works, of
  260.          course.
  261.  
  262.     If you feel you would like a more conventional program object for
  263.     Emacs, you can use the "keepvio" option of instemacs.cmd.  This
  264.     causes the Emacs object to start emacs.exe in a minimized VIO
  265.     window.  This solves problem (a) and changes problem (b) to the
  266.     problem (b') that double clicking on the Emacs object shows the VIO
  267.     window of emacs.exe, not the PM Window you are really interested
  268.     in.
  269.  
  270.     If all this sounds too complicated to you, simply try
  271.     instemacs.cmd with and without the "keepvio" option and see which
  272.     way you like it better.  Calling instemacs.cmd again does not
  273.     create new objects but updates the existing objects according to
  274.     the options.  You can also use this feature if you accidentally
  275.     change the settings of the Emacs object or lose the icon.
  276.  
  277.  
  278. Customizing GNU Emacs
  279. =====================
  280.  
  281. You should customize \emacs\19.17\lisp\site-start.el, the startup file
  282. of GNU Emacs.  The statements in that file are executed automatically
  283. each time GNU Emacs is started.  Moreover, you can put personal
  284. settings into a file named .emacs file in your home directory (set by
  285. the HOME environment variable).
  286.  
  287. Sample site-start.el file:
  288.  
  289. ---------------------------------------------------------------------
  290. (set-input-mode nil nil 1)                            ; [1]
  291. (setq default-frame-alist                             ; [2]
  292.       (append default-frame-alist
  293.               '((altgr-modifier . meta))))
  294. (standard-display-8bit 128 254)                       ; [3]
  295. (aset standard-display-table 256 16)                  ; [4]
  296. (aset standard-display-table 257 31)
  297. (aset standard-display-table 259 24)
  298. (add-hook 'server-request-hook                        ; [5]
  299.           '(lambda ()
  300.              (make-frame-visible)
  301.              (focus-frame (selected-frame))))
  302. (add-hook 'dired-load-hook 'emx-dired-kur-ls-setup)   ; [6]
  303.  
  304. (autoload 'os2help "os2help" "OS/2 on-line help" t)   ; [7]
  305. (setq os2help "/emx/book/emxdoc.ndx")
  306. (global-set-key [C-f1] 'os2help)
  307.  
  308. (if window-system                                     
  309.     (progn
  310.       (pm-edit-menu)                                  ; [8]
  311.       (set-face-background 'modeline "red")           ; [9]
  312.       (set-face-foreground 'modeline "yellow")))
  313. ---------------------------------------------------------------------
  314.  
  315. Notes:
  316.  
  317. [1]   Enable 8-bit input.  set-input-mode must be called when running
  318.       Emacs -- calling it before dumping doesn't work
  319.  
  320. [2]   Use the right ALT key of non-US keyboards as META key.  This
  321.       does not work for all key combinations.  Note that the right ALT
  322.       key of US keyboards is equivalent to the left ALT key.  Add new
  323.       parameters to the front of the list
  324.  
  325. [3]   Display characters 128 through 254 as-is.  Without this
  326.       statement, octal notation is used for these characters
  327.  
  328. [4]   Use special symbols (which are not displayed as-is when
  329.       occurring in a buffer) for truncated screen lines (256),
  330.       continued lines (257) and for displaying control characters
  331.       notation (259)
  332.  
  333. [5]   Raise frame to the foreground if emacsclient requests a buffer
  334.  
  335. [6]   Use Kai Uwe Rommel's OS/2 port of GNU ls (GNU file utilities)
  336.       for dired.  If you're using a version of ls where the output of
  337.       `ls -l' is Unix-compatible, you should not use that line
  338.  
  339. [7]   Use C-f1 to invoke OS/2 on-line help.  You have to set the
  340.       os2help variable to point to an EPM index file.  See os2help.el
  341.       for details
  342.  
  343. [8]   Modify the Edit menu of the menu bar to use the OS/2 clipboard
  344.       for Cut, Copy and Paste
  345.  
  346. [9]   Make the mode line yellow on red
  347.  
  348.  
  349. About file names
  350. ================
  351.  
  352. All file names are translated to lower case.  This is required as GNU
  353. Emacs thinks that non-equality of file names implies non-identity of
  354. files.  Under OS/2 and DOS, however, letter case does not matter in
  355. file names.  To keep the letter case in file names on HPFS, see
  356. `Choosing the backup type'.
  357.  
  358. Better use forward slashes (/) instead of backslashes (\) in path
  359. names as some places where Emacs checks for / might have slipped my
  360. attention.
  361.  
  362. Emacs doesn't know that trailing dots in file names are ignored by
  363. OS/2.  It believes that "foo" and "foo." are different files.
  364.  
  365.  
  366. Choosing a PM font
  367. ==================
  368.  
  369. A font is specified by size (printer's points), appearance (bold or
  370. italic, optional) and name:
  371.  
  372.   SIZE[.bold][.italic]NAME
  373.  
  374. Note that not all fonts are available in all appearances.  "System
  375. Monospaced", for instance, is available only in bold.
  376.  
  377. Alternatively, you can use the "Host Portable Character
  378. Representation" for font names, for instance
  379.  
  380.   -os2-Courier-medium-r-normal--*-100-*-*-m-*-cp850
  381.  
  382. Examples of fixed-spaced bitmap fonts:
  383.  
  384.   8.Courier
  385.   10.Courier
  386.   10.System Monospaced
  387.   12.bold.Courier
  388.   8.System VIO                    (OS/2 2.1)
  389.   6.Small                         (smallfnt, see below)
  390.  
  391. As the plain, bold and italic variations of the PM fonts have
  392. different character widths, mixing fonts in a frame isn't a good
  393. idea.  The character widths of all fonts are forced to the character
  394. width of the default font.  When defining a face with a font which is
  395. wider than the default font, there will be problems: some characters
  396. will be displayed only partially and some pixels will stay on the
  397. screen until the frame is redisplayed (C-l).  Fonts which are smaller
  398. than the default font, however, can be used.  For instance, you can
  399. use "8.bold.System Monospaced" as bold font when using "10.Courier" as
  400. default font ("10.bold.Courier" is too wide).  Using italic fonts is
  401. not recommended.
  402.  
  403. The smallest fixed-width VGA bitmap font of OS/2 2.0 ("8.Courier") is
  404. rather big.  A small font ("6.Small") is available for anonymous ftp:
  405.  
  406.   ftp-os2.nmsu.edu: os2/all/graphics/smallfnt.zip
  407.  
  408. Using outline fonts (such as "9.Courier") is not recommended because
  409. that's too slow.  Proportional fonts (such as "10.Tms Rmn") cannot be
  410. used.
  411.  
  412. To set the default font of a frame, set the `font' frame parameter.
  413. Example:
  414.  
  415.   (setq default-frame-alist
  416.         (append default-frame-alist '((font . "8.Courier"))))
  417.  
  418. If the font does not exist, "10.Courier" is used instead as default
  419. font.  If you use the "Host Portable Character Representation" for the
  420. name of the default font, Emacs automatically chooses bold and italic
  421. variants of that font.  Example:
  422.  
  423.   (setq default-frame-alist
  424.         (append default-frame-alist
  425.            '((font . "-os2-Courier-medium-r-normal--*-100-*-*-m-*-cp850"))))
  426.  
  427. You can use a popup menu to select the default font: Click mouse
  428. button 3 (that's the middle mouse button, by default) while depressing
  429. the CONTROL key (C-down-mouse-3).
  430.  
  431. To change the font of a face, use set-face-font.  However, you can use
  432. only fonts reported by the pm-list-fonts function.  Examples:
  433.  
  434.   (set-face-font 'bold "10.bold.Courier")
  435.   (set-face-font 'italic "10.italic.Courier")  ; NOT RECOMMENDED!
  436.  
  437.  
  438. The keyboard
  439. ============
  440.  
  441. In text mode, the ALT keys generate the A- modifier (alt).  The rest
  442. of this section applies to PM mode.
  443.  
  444. The modifiers generated by the ALT keys are configurable.  There are
  445. two ALT keys, the left ALT key and the right ALT key.  The right ALT
  446. key is called AltGr or AltCar on most non-US keyboards.  On these
  447. keyboards, the right ALT key is used for entering special symbols.  On
  448. the US keyboard, the right ALT key is equivalent to the left ALT key.
  449.  
  450. We'll use the term `ALT key' for both ALT keys of the US keyboard.
  451. For keyboards which have an AltGr or AltCar key, we'll call the left
  452. ALT key `ALT key' and the right ALT key `ALTGR key'.
  453.  
  454. The modifier for the ALT key (both ALT keys on the US keyboard, that
  455. is) is set with the `alt-modifier' frame parameter.  For instance, use
  456. the following code to use the ALT key for generating the A- (alt) modifier:
  457.  
  458.   (setq default-frame-alist
  459.         (append default-frame-alist '((alt-modifier . alt))))
  460.  
  461. By default, the ALT key is used for generating the M- (meta)
  462. modifier.
  463.  
  464. The modifier for the ALTGR key (which isn't present on the US
  465. keyboard) is set with the `altgr-modifier' frame parameter.  For
  466. instance, use the following code to use the ALTGR key for generating
  467. the A- (alt) modifier:
  468.  
  469.   (setq default-frame-alist
  470.         (append default-frame-alist '((altgr-modifier . alt))))
  471.  
  472. As ALTGR is treated specially by the operating system, you cannot use
  473. it with arbitrary keys.  Usually you can use it together with a subset
  474. of the letter and digit keys to generate the modifier set with
  475. altgr-modifier.  If the CTRL key is down, ALTGR is ignored for most
  476. keys.
  477.  
  478. Suppose that '((alt-modifier . meta) (altgr-modifier . hyper)) is in
  479. effect.  Then, you'll get the following table of keys vs. events:
  480.  
  481.   Left ALT | Right ALT | CTRL | Key || US keyboard | German keyboard
  482.   ---------+-----------+------+-----++-------------+-----------------
  483.      X     |     -     |  -   |  a  ||   M-a       |   M-a
  484.      X     |     -     |  X   |  a  ||   M-C-a     |   M-C-a
  485.      -     |     X     |  -   |  a  ||   M-a       |   H-a
  486.      -     |     X     |  X   |  a  ||   M-C-a     |   C-a
  487.      -     |     X     |  -   |  f2 ||   M-f2      |   f2
  488.      -     |     X     |  -   |  q  ||   M-q       |   @
  489.      -     |     X     |  -   |  q  ||   M-C-q     |   C-@
  490.  
  491. The locations of the keys C-[ C-] C-\ etc. on non-US keyboards depend
  492. on whether you're using the PM version or the text mode version of
  493. Emacs: With the PM version, you can type those keys with
  494. CTRL+ALTGR+<whatever> (example: C-] is on CTRL+ALTGR+<9> of the German
  495. keyboard), where ALTGR is the right ALT key.  With the text mode
  496. version, pretend that you have a US keyboard (example: C-] is on
  497. CTRL+<+> of the German keyboard).
  498.  
  499. If you want to bind keys depending on the keyboard layout, use the
  500. keyboard-type function.
  501.  
  502.  
  503. Changing the window size
  504. ========================
  505.  
  506. To change the window size in text mode, type
  507.  
  508.     mode co80,x
  509.  
  510. where x is the number of lines.  Example: mode co80,40
  511.  
  512. To change the window size in PM mode, simply resize the window using
  513. the mouse or the keyboard (Alt+F8).  You can set the default size with
  514. the `width' and `height' frame parameters in site-init.el or .emacs:
  515.  
  516.   (setq default-frame-alist
  517.         (append default-frame-alist
  518.                 '((width . 80) (height . 40))))
  519.  
  520. You can set the default position with the `top' and `left' frame
  521. parameters.  See the documentation of set-frame-position for details.
  522.  
  523.  
  524. Choosing the backup type
  525. ========================
  526.  
  527. You might want to use
  528.  
  529.   (setq backup-by-copying t)
  530.  
  531. This has three advantages under OS/2:
  532.  
  533. -  the letter case of the name of the file is retained (normally, GNU
  534.    Emacs for OS/2 2.0 uses lower-case file names)
  535.  
  536. -  the extended attributes of the file are retained
  537.  
  538. -  when editing .CMD files, the Workplace Shell does not change
  539.    program objects to point to the backup of the edited file
  540.  
  541. There are two known disadvantages under OS/2:
  542.  
  543. -  the extended attributes of the backup file are lost
  544.  
  545. -  the letter case of the file name is lost for the backup file
  546.  
  547. You can choose: Either keep the extended attributes and the letter
  548. case of the file name of the new file or of the backup file.
  549.  
  550.  
  551. Text mode vs. binary mode
  552. =========================
  553.  
  554. This port of GNU Emacs supports two types of files: binary files and
  555. text files.  As GNU Emacs is a text editor, you'll work with text
  556. files most of the time.  Therefore, you don't have to know the ugly
  557. details unless you want to edit a binary file.
  558.  
  559. When reading a text file, each CR/LF pair is converted to a LF.  If
  560. the last character of the file is a Ctrl-Z, that character is
  561. removed.
  562.  
  563. When writing a text file, each LF is replaced with a CR/LF pair.  A
  564. Ctrl-Z is not appended as that has been obsolete for years.
  565.  
  566. No conversion is done when reading or writing a binary file.
  567.  
  568. The variable emx-binary-mode controls whether to use text mode or
  569. binary mode.  If the variable is nil (that's the default setting),
  570. text mode is used.  If the variable is t, binary mode is used.  A file
  571. name hook is employed to temporarily set the emx-binary-mode variable
  572. depending on the file name while reading or writing a file.  The
  573. emx-add-binary-mode function is used to define an additional regular
  574. expression for files which should be read and written in binary mode.
  575. Example:
  576.  
  577.   (emx-add-binary-mode "\\.exe$")
  578.  
  579. This example will make Emacs use binary mode for file names ending
  580. with .exe.  Initially, binary mode is used for file names matching the
  581. following regular expressions:
  582.  
  583.   \.elc$
  584.   \.tar$
  585.  
  586. Currently, there is no buffer-local variable for controlling text mode
  587. vs. binary mode.  Do not set the emx-binary-mode variable manually --
  588. always use emx-add-binary-mode.
  589.  
  590.  
  591. Code pages
  592. ==========
  593.  
  594. cp850.el, which is loaded by default, defines a syntax table and a
  595. case table for code page 850.
  596.  
  597.  
  598. Using shell mode
  599. ================
  600.  
  601. GNU Emacs uses the shell (command processor) pointed to by the SHELL
  602. environment variable.  I recommend using a Unix-like shell, like the
  603. Data Logic shell, which is available for anonymous ftp:
  604.  
  605.   ftp-os2.nmsu.edu: os2/all/unix/shells/ms_sh21c.zip
  606.  
  607. To run an OS/2 command prompt (using cmd.exe as shell) in an Emacs
  608. window, use the cmd command defined in emx-cmd.el.
  609.  
  610.  
  611. Using the clipboard
  612. ===================
  613.  
  614. To use the OS/2 clipboard, the following functions are provided:
  615.  
  616.   Function | Default key | Description
  617.   ---------+-------------+---------------------------------------
  618.   pm-copy  | C-insert    | Copy the region to the clipboard
  619.   pm-cut   | S-delete    | Copy the region to the clipboard,
  620.            |             | then delete the region
  621.   pm-paste | S-insert    | Paste text from the clipboard at point
  622.  
  623. Note that several OS/2 programs cannot handle more than 64KB of text
  624. in the clipboard.  Therefore you should avoid copying more than 64KB
  625. of text.
  626.  
  627. You can let the Cut, Copy and Paste choices of the Edit menu of the
  628. menu bar use the clipboard.  This is done by calling the pm-edit-menu
  629. function, as done by the default site-init.el file.  If you want the
  630. original Edit menu, remove the invocation of pm-edit-menu from
  631. site-init.el.
  632.  
  633.  
  634. Using emacsclient
  635. =================
  636.  
  637. emacsclient has two new command line options:
  638.  
  639.   -s   Don't switch the focus back to emacsclient when saying "Done"
  640.        for a buffer (C-x #).  This option is ignored if -w is used
  641.  
  642.   -w   Don't wait for saying "Done" (C-x #)
  643.  
  644. When using emacsclient as default OS/2 editor (by associating it with
  645. various file types as explained in the OS/2 documentation), you should
  646. use either the -s or the -w option.  To use drag & drop, create a
  647. program object for emacsclient.exe and insert
  648.  
  649.   -w %*
  650.  
  651. in the `Parameters' field of the `Program' page of the settings
  652. notebook.
  653.  
  654.  
  655. Using Ispell
  656. ============
  657.  
  658. You can get an emx port of the spelling checker Ispell by anonymous
  659. ftp:
  660.  
  661.   ftp-os2.nmsu.edu: os2/2_x/unix/unixutils/isp3009b.zip
  662.  
  663. You should use the ispell.el file that comes with Ispell instead of
  664. the ispell.el file that comes with GNU Emacs.  To use Ispell, add the
  665. following statements to your .emacs or site-start.el file, using
  666. correct path names:
  667.  
  668. ---------------------------------------------------------------------
  669. (setq ispell:program-name "c:/ispell/ispell.exe")
  670. (fmakunbound 'ispell-buffer)
  671. (fmakunbound 'ispell)
  672. (autoload 'ispell-word "c:/ispell/ispell"
  673.   "Check the spelling of word in buffer." t)
  674. (global-set-key "\e$" 'ispell-word)
  675. (autoload 'ispell-region "c:/ispell/ispell"
  676.   "Check the spelling of region." t)
  677. (autoload 'ispell-buffer "c:/ispell/ispell"
  678.   "Check the spelling of buffer." t)
  679. (autoload 'ispell-complete-word "c:/ispell/ispell"
  680.   "Look up current word in dictionary and try to complete it." t)
  681. (autoload 'ispell-change-dictionary "c:/ispell/ispell"
  682.   "Change ispell dictionary." t)
  683. (defalias 'ispell 'ispell-buffer)
  684. ---------------------------------------------------------------------
  685.  
  686. Moreover, you should replace the current definition of
  687. highlight-spelling-error-v19 in ispell.el with
  688.  
  689. ---------------------------------------------------------------------
  690. (defun highlight-spelling-error-v19 (start end &optional highlight)
  691.   (if highlight
  692.       (progn
  693.         (setq ispell-overlay (make-overlay start end))
  694.         (overlay-put ispell-overlay 'face 'highlight))
  695.     (delete-overlay ispell-overlay)))
  696. ---------------------------------------------------------------------
  697.  
  698. Probably later versions of ispell.el have an appropriate definition of
  699. highlight-spelling-error-v19.
  700.  
  701.  
  702. More environment variables
  703. ==========================
  704.  
  705. The user-name variable is initialized from the value of the USER
  706. environment variable.  If USER is not set, the LOGNAME environment
  707. variable is used.  If both USER and LOGNAME are not set, user-name is
  708. set to "unknown".
  709.  
  710. The user-full-name variable is initialized from the value of the
  711. USERFULLNAME environment variable.  If USERFULLNAME is not set,
  712. user-full-name is set to "unkown".
  713.  
  714.  
  715. Miscellaneous hints
  716. ===================
  717.  
  718. -   For best results, run emacs.exe from the drive where it is
  719.     installed -- you can change the drive in GNU Emacs.
  720.  
  721. -   To change the cursor size in text mode, put
  722.  
  723.       cursor -80 -100
  724.  
  725.     into a batch file which runs emacs.exe (unfortunately, cmd.exe
  726.     changes the cursor size when displaying a prompt).  Negative
  727.     cursor command line arguments are percentages -- the above example
  728.     makes the cursor use the bottom 20% of the character cell.
  729.  
  730. -   The colors defined in term/pm-win.el are designed for 256-color
  731.     graphics modes.  You might have to modify the value of
  732.     pm-color-alist for 16-color graphics modes.  For instance,
  733.     "darkseagreen2" is gray in 16-color graphics modes.  Probably you
  734.     should use
  735.  
  736.       [0 255 255]
  737.  
  738.     (cyan) for "darkseagreen2".
  739.  
  740.  
  741. Additional features of GNU Emacs 19.17 for emx
  742. ==============================================
  743.  
  744. Additional functions (see on-line help for details):
  745.  
  746.   emacs-priority
  747.   emx-add-binary-mode
  748.   filesystem-type
  749.   keyboard-type
  750.   file-name-valid-p
  751.   pm-menu-bar-mode
  752.  
  753. Additional variables (see on-line help for details):
  754.  
  755.   emx-binary-mode
  756.   emx-shell-regexp
  757.   min-skip-run
  758.   pm-color-alist
  759.  
  760. Additional command line options for PM:
  761.  
  762.   -d                    Use windowing system (note: no argument!)
  763.   -name NAME            Set name of frame (displayed in the titlebar)
  764.   -font FONT            Select font
  765.   -background COLOR     Select default background color
  766.   -foreground COLOR     Select default foreground color
  767.   -T NAME               See -name
  768.   -fn FONT              See -font
  769.   -fg COLOR             See -foreground
  770.   -bg COLOR             See -background
  771.  
  772. Example:
  773.  
  774.   emacs -d -fg white -bg darkblue -fn 8.Courier myfile.c
  775.  
  776. Fonts:
  777.  
  778.   A font is specified by size (printer's points) and name:
  779.  
  780.    SIZE.NAME
  781.  
  782. Colors:
  783.  
  784.   black         white           blue          red
  785.   pink          green           cyan          yellow
  786.   darkgray      darkblue        darkred       darkpink
  787.   darkgreen     darkcyan        brown         palegray
  788.   ...and others, see pm-color-alist in term/pm-win.el
  789.  
  790. Additional frame parameters for modify-frame-parameters and
  791. default-frame-alist:
  792.  
  793.   name                        String    Window title
  794.   font                        String    Font
  795.   background-color            String    Default background color
  796.   foreground-color            String    Default foreground color
  797.   alt-modifier                Symbol    Modifier generated by left Alt key
  798.   altgr-modifier              Symbol    Modifier generated by AltGr key
  799.   cursor-type                 Symbol    Cursor type
  800.   cursor-blink                Boolean   Blinking cursor
  801.   pm-menu-bar                 Boolean   Display Presentation Manager menu bar
  802.   shortcuts                   Boolean   Enable F1, F10, A-f4, A-space etc.
  803.   mouse-buttons               String    Swap mouse buttons
  804.   height                      Integer   Height of window, in lines
  805.   width                       Integer   Widtht of window, in columns
  806.   left                        Integer   horizontal position, in pixels
  807.   top                         Integer   vertical position, in pixels
  808.  
  809. Alt modifiers:
  810.  
  811.   alt           The ALT key generates the A- modifier
  812.   meta          The ALT key generates the M- modifier
  813.   hyper         The ALT key generates the H- modifier
  814.   super         The ALT key generates the s- modifier
  815.  
  816.   
  817. Cursor types:
  818.  
  819.   bar            A thin vertical bar
  820.   box            A filled box (default)
  821.   frame          The outline of a box
  822.   underline      A horizontal line below the characters
  823.   halftone       A filled box (gray)
  824.  
  825. Mouse buttons:
  826.  
  827.   The argument of the mouse-buttons parameter is a string of 3
  828.   characters.  The first character defines the event generated by the
  829.   left mouse button, the second character defines the event generates
  830.   by the middle mouse button (which doesn't exist on two-button mice),
  831.   the third character defines the event generated by the right mouse
  832.   button.  Each character is either 1 (mouse-1), 2 (mouse-2), 3
  833.   (mouse-3) or a space (no event).  The default is "132", according to
  834.   OS/2 conventions.  With this value, a two-button mouse cannot
  835.   generate a mouse-3 event.
  836.  
  837. Example:
  838.  
  839.   (setq default-frame-alist
  840.         (append default-frame-alist
  841.                 '((background-color . "darkblue")
  842.                   (foreground-color . "white")
  843.                   (alt-modifier . alt)
  844.                   (altgr-modifier . hyper)
  845.                   (font . "8.Courier")
  846.                   (mouse-buttons . "123"))))
  847.  
  848.  
  849. Missing features, misfeatures, bugs
  850. ===================================
  851.  
  852. - The emacs-priority variable is ignored.  Use the emacs-priority
  853.   function instead.  Note that lisp/term/pm-win.el calls
  854.   emacs-priority.
  855.  
  856. - interrupt-process doesn't work unless the process is an immediate
  857.   child of Emacs or is an emx program.  Therefore,
  858.   comint-interrupt-subjob (C-c C-c) doesn't work.
  859.  
  860. - Extended attributes are not preserved in files edited or copied.
  861.  
  862. - The timestamps of all events but mouse button events are always 0.
  863.  
  864. - Scrollbars are not implemented.
  865.  
  866. - Several functions specific to X Windows are missing.
  867.  
  868. - When clicking on the title bar while a popup menu is active which
  869.   has not been opened by a down-mouse-# event, Emacs hangs.
  870.  
  871. - You have to release the mouse button before clicking on a popup menu
  872.   activated by clicking on the the (non-PM) menu bar.
  873.  
  874. - OS/2 does not support all three-button mice.  Therefore, you can use
  875.   only two buttons with certain mice.  RODENT.SYS, a shareware mouse
  876.   driver written by Michael Lee Finney (m.finney@genie.geis.com)
  877.   supports additional three-button mice.  Look for RODENT.ZIP or
  878.   RODNT100.ZIP.  Unfortunately, the registration cost is likely to
  879.   exceed the cost of a new mouse...
  880.  
  881. - Drag & drop is not implemented.  Instead of dropping a file on (a
  882.   running instance of) GNU Emacs, you should drop the file on an
  883.   emacsclient icon.  See above for proper installation of emacsclient.
  884.  
  885. - Emacs doesn't know that trailing dots in file names are ignored by
  886.   OS/2.  It believes that "foo" and "foo." are different files.
  887.  
  888. - The `Choose Pasting Selection' item of the Edit menu doesn't work.
  889.  
  890. - The current implementation of binary mode (using a file name
  891.   handler) collides with ange-ftp.
  892.  
  893. - The client windows aren't repainted while a popup menu is active.
  894.  
  895.  
  896. Compiling GNU Emacs
  897. ===================
  898.  
  899. The following programs are required for compiling GNU Emacs 19 for emx:
  900.  
  901.   - dmake 3.8
  902.  
  903.   - emx 0.8g (or later), GCC 2.4 (or later), etc. for emx
  904.  
  905.   - GNU Bison 1.19 (or later)
  906.  
  907.   - GNU sed 1.16 (or later)
  908.  
  909.   - cp, mv, rm, chmod (GNU file utilities 1.4 or later)
  910.  
  911. You can find all these programs on ftp.informatik.tu-muenchen.de,
  912. somewhere under pub/comp/os/os2.
  913.  
  914. To compile GNU Emacs, you have to install the source code:
  915.  
  916.   cd \
  917.   unzip a:e17src
  918.  
  919. To compile GNU Emacs, type
  920.  
  921.   cd \emacs\19.17
  922.   configure
  923.   cd lib-src
  924.   make
  925.   cd ..\src
  926.   mmake
  927.   make
  928.  
  929. If emx-patch.el and emx-funcs.el have not been byte-compiled
  930. (emx-patch.elc and emx-funcs.elc don't exist), the message
  931.  
  932.   Pure Lisp storage exhausted
  933.  
  934. may be displayed in the make step in the src directory.  Type
  935.  
  936.   temacs -batch -l emx-bc
  937.  
  938. to byte-compile these files.  Ignore the warning messages which start
  939. with **.  Then, restart make.  IMPORTANT: emx-bc.el assumes that the
  940. .el files are in ../lisp.
  941.  
  942. Note: src/Makefile is currently not used.
  943.  
  944. Before running the new emacs.exe in \emacs\19.17\src, you should type
  945.  
  946.   move ..\etc\doc-19.17.* \emacs\19.17\data
  947.  
  948. To install GNU Emacs in \emacs\19.17\bin, run install.cmd.
  949.  
  950.  
  951. If the GNU Emacs version number changes (from 19.83 to 19.84, for
  952. instance), you have to edit the following files, replacing the old
  953. version number with the new one:
  954.  
  955.   emx/README
  956.   emx/emx1.sed
  957.   emx/emx3.sed
  958.   emx/emx4.sed
  959.   src/dist.cmd
  960.   src/dump.cmd
  961.   src/install.cmd
  962.  
  963. To debug GNU Emacs, type
  964.  
  965.   gdb -s temacs -e emacs.exe
  966.   source .gdbinit
  967.   set args -d
  968.  
  969. Note that .gdbinit changes the command line arguments.  Therefore, you
  970. should use "set args" after loading .gdbinit.
  971.  
  972. To do post-mortem debugging, type
  973.  
  974.   gdb -s temacs -e emacs.exe -c core
  975.  
  976. Note that emx.dll versions prior to revision index 14 don't create
  977. usable core dump files for emacs.exe: the stack object is missing in
  978. the core dump.
  979.  
  980. To make new distribution ZIP files, type
  981.  
  982.   cd \emacs\19.17\src
  983.   install
  984.   dist
  985.   cd ..\emx
  986.   make-dist
  987.  
  988.  
  989. Who did the emx port of GNU Emacs 19?
  990. =====================================
  991.  
  992.   Eberhard Mattes
  993.   Teckstrasse 81                                      (TeX: Teckstra{\ss}e)
  994.   D-71696 Moeglingen                                  (TeX: M\"oglingen)
  995.   Germany
  996.  
  997.   Internet: mattes@azu.informatik.uni-stuttgart.de
  998.  
  999. No telephone calls please! Include return postage (international
  1000. postal reply coupons for those outside Germany) and a self-addressed
  1001. envelope if you expect a reply.  GNU Emacs for emx is not available on
  1002. diskettes from the address given above.
  1003.  
  1004. An emx-related mailing list has been created: emx-list.  The address
  1005. for people to request to be added to or removed from the list is:
  1006.  
  1007.   listserv@ludd.luth.se
  1008.  
  1009. To subscribe, send a message containing
  1010.  
  1011.   sub emx-list Joe User
  1012.  
  1013. to listserv@ludd.luth.se.  Of course, you should use your name instead
  1014. of Joe User's name.
  1015.  
  1016. As there is currently no GNU Emacs for OS/2 related mailing list, you
  1017. should use the emx mailing list.
  1018.  
  1019. No warranty, see COPYING for details.
  1020.  
  1021. ---------------------------------- END ---------------------------------------
  1022.