home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / emacs / emacs.doc next >
Text File  |  1992-05-03  |  19KB  |  585 lines

  1. ===============================================================================
  2. emacs.doc   GNU Emacs 18.58.3 for OS/2 2.0                          03-May-1992
  3. ===============================================================================
  4.  
  5. Introduction
  6. ============
  7.  
  8. This archive contains GNU Emacs 18.58.3 for OS/2 2.0, containing
  9. changes made by Eberhard Mattes based on the great OS/2 2.0 port
  10. (18.58.1) of GNU Emacs by Joerg Viola. We chose to use the third part
  11. of the version number for distinguishing between different versions of
  12. the port, this number is not incremented each time a dumped version of
  13. GNU Emacs is created.
  14.  
  15. GNU Emacs 18.58.3 for OS/2 uses emx 0.8d -- if you have an older
  16. version of emx.dll, emxbind.exe and termcap.dat, replace them with the
  17. files that come with GNU Emacs 18.58.3.
  18.  
  19. This version of GNU Emacs has been tested only with OS/2 2.0 6.307
  20. (also known as GA version).
  21.  
  22.  
  23. Distribution files
  24. ==================
  25.  
  26. The "GNU Emacs 18.58.3 for OS/2 2.0" distribution consists of the
  27. following files:
  28.  
  29.   emacs.doc             this file (\emx\gnu\emacs.doc)
  30.   unzip.exe             utility for unpacking ZIP files
  31.   emacs1.zip            executable version of GNU Emacs, part 1
  32.   emacs2.zip            executable version of GNU Emacs, part 2
  33.   emacsinf.zip          additional info files
  34.   emacsman.zip          documentation files
  35.   emacspat.zip          patches
  36.   emacssrc.zip          sources
  37.  
  38. A compiled version of GNU ls is provided in the \emacs\etc directory
  39. (in elisp1.zip), it has been ported by Thorsten Ohl and Kai Uwe Rommel.
  40.  
  41.  
  42. Installing GNU Emacs
  43. ====================
  44.  
  45. This section describes how to install the compiled version of GNU
  46. Emacs on OS/2 2.0.
  47.  
  48. GNU Emacs is installed in the \emacs and \emx directories of a HPFS
  49. drive.
  50.  
  51. - get lots of disk space on an HPFS partition. As this version of GNU
  52.   Emacs doesn't bother about 8.3 file names, you can't install it on a
  53.   FAT partition. However, you can edit files on FAT partitions.
  54.  
  55. - to install a base version of GNU Emacs, unpack the files
  56.   emacs1.zip and emacs2.zip by running
  57.  
  58.      cd \
  59.      unzip -d emacs1
  60.      unzip -d emacs2
  61.  
  62.   on an HPFS drive. Note that you cannot use PKUNZIP to unpack these
  63.   ZIP files.
  64.  
  65. - additionally, you can install the documentation files by unpacking
  66.   emacsman.zip:
  67.  
  68.      cd \
  69.      unzip -d emacsman
  70.  
  71. - additionally, you can install additional info files by unpacking
  72.   emacsinf.zip:
  73.  
  74.      cd \
  75.      unzip -d emacsinf
  76.  
  77. - set apropriate environment variables (put them in config.sys):
  78.  
  79.    TERMCAP       name of termcap file, defaults to
  80.                  /emx/etc/termcap.dat
  81.  
  82.    TERM          name of terminal, possible values include rmono,
  83.                  ansi-color-2 and ansi-color-3
  84.  
  85.    SHELL     name of the command processor, defaults to /bin/sh
  86.  
  87.    EMACSLOADPATH path to Lisp library, defaults to /emacs/lisp
  88.  
  89.    EMACSEXECPATH path to programs, defaults to /emacs/etc
  90.  
  91.    SYSTEMNAME    initializes system-name, defaults to my-system
  92.  
  93.    HOME          your homepath, replaces ~ in path names (that means,
  94.                  your .emacs-file is searched there)
  95.  
  96.    TMP           directory for temporary files, default is current working
  97.                  directory
  98.  
  99.    PATH          include \emacs\etc in your PATH (for ls)
  100.  
  101.    Example:
  102.  
  103.      set termcap=c:\emx\etc\termcap.dat
  104.      set term=rmono
  105.      set shell=c:\os2\cmd.exe
  106.      set emacsloadpath=c:\emacs\lisp
  107.      set emacsexecpath=c:\emacs\etc
  108.      set systemname=vergil
  109.      set home=c:\home
  110.      set tmp=d:\tmp
  111.  
  112. - compile the lisp files and create a preloaded version of GNU Emacs by
  113.   running
  114.  
  115.     cd \emacs\src
  116.     lib
  117.     dump-emacs
  118.  
  119. - run GNU emacs by typing \emacs\src\xemacs
  120.  
  121. - you might want to add a program object for c:\emacs\src\xemacs to an
  122.   appropriate folder
  123.  
  124. - for best results, run xemacs from the drive where it is installed --
  125.   you can change the drive in GNU Emacs
  126.  
  127. - to change the cursor size, put
  128.  
  129.     c:\emacs\etc\cursor -80 -100
  130.  
  131.   into a batch file which runs xemacs.exe (unfortunately, cmd.exe
  132.   changes the cursor size when displaying a prompt). Negative cursor
  133.   command line arguments are percentages -- the above example makes
  134.   the cursor use the bottom 20% of the character cell
  135.  
  136.  
  137. Text files vs. binary files
  138. ===========================
  139.  
  140. This port of GNU Emacs supports two types of files: binary files and
  141. text files. As GNU Emacs is a text editor, you'll work with text files
  142. most of the time. Therefore, you don't have to know the ugly details
  143. unless you want to edit a binary file.
  144.  
  145. When reading a text file, each CR/LF pair is converted to a LF. If the
  146. last character of the file is a Ctrl-Z, that character is removed.
  147.  
  148. When writing a text file, each LF is replaced with a CR/LF pair. A
  149. Ctrl-Z is *not* appended as it has been obsolete for years.
  150.  
  151. No conversion is done when reading or writing a binary file.
  152.  
  153. Each buffer has a buffer-local variable file-type which has one of three
  154. values:
  155.  
  156.   nil   the file type is unknown
  157.  
  158.   "b"   the file type is binary
  159.  
  160.   "t"   the file type is text
  161.  
  162. When creating a new buffer which does not visit a file, file-type is
  163. assigned the current value of default-file-type. By default,
  164. default-file-type is nil, that is, the file type for buffers which
  165. don't visit a file is unknown.
  166.  
  167. When creating a new buffer which visits a file (by using find-file),
  168. the buffer's file type is chosen by calling the
  169. file-type-from-file-name function, which is defined in os2.el. This
  170. function searches the list stored in the file-type-alist variable for
  171. a regular expression matching the file name and returns the associated
  172. file mode. If no entry of file-type-alist matches, the value of
  173. default-file-type is returned unless it's nil. If default-file-type is
  174. nil, "t" is returned. Summary: Binary mode is used if an entry (which
  175. demands binary mode) of file-type-alist matches the file name or if
  176. default-file-type is "b". Otherwise, text mode is used.
  177.  
  178. When writing a buffer to a file (save-buffer, write-region), the
  179. buffer's file type is used for writing the file. If the file type of
  180. the buffer is nil, file-type-from-file-name is called to choose an
  181. appropriate file type depending on the name of the output file.
  182.  
  183. You can assign a new value to file-type by using the set-variable
  184. command. default-file-type cannot be set with set-variable, you have
  185. to use the setq Lisp function.
  186.  
  187. Reading and writing files in binary mode is usually only required
  188. compiled Emacs Lisp files (.elc) files. Therefore, the initial value
  189. of file-type-alist is
  190.  
  191.     (("\\.elc$" . "b"))
  192.  
  193. If you want to automatically choose binary mode for other files, for
  194. instance .exe and .dll files, put the following code in your .emacs file:
  195.  
  196. (setq file-type-alist (append file-type-alist
  197.       '(("\\.exe$" . "b") ("\\.dll$" . "b"))))
  198.  
  199. Note: if file-type is nil for a buffer and you write the buffer to a
  200. file, file-type of that buffer is *not* changed. That is, when writing
  201. to test.el, for instance, you'll get a text-mode file, when writing to
  202. test.elc, for instance, you'll get a binary-mode file.
  203.  
  204. An additional argument has been added to the insert-file-contents
  205. function to select the file type, see the documentation of that
  206. function.
  207.  
  208.  
  209. 8-bit patches
  210. =============
  211.  
  212. Keymaps now may contain up to 256 entries. Meta keys are prefixed with
  213. Esc (?\e) instead of having bit 7 set. That is, putting a command on
  214. key "\M-n" is no longer equivalent to putting a command on key "\en".
  215. For intance, by using
  216.  
  217.   (define-key global-map "\M-n" 'my-command)
  218.  
  219. you'll put my-command on character code 238, not on M-n. To put
  220. my-command on M-n, use
  221.  
  222.   (define-key global-map "\en" 'my-command)
  223.  
  224. gdb.el has been changed accordingly. Other Emacs lisp code has to be
  225. changed if it refers to \M-anything.
  226.  
  227. Also be aware of conversion to lower case, if a key is undefined. For
  228. instance, code 146 (222 octal) is translated to 145 (221 octal) by
  229. conversion to lower case. For instance, if a keymap defines code 145
  230. but does not define code 146, the command is performed for _both_
  231. codes! That is, when defining C-DOWN, but leaving C-INSERT undefined,
  232. both C-DOWN and C-INSERT will perform the same command.
  233.  
  234.  
  235. TeX mode
  236. ========
  237.  
  238. tex-mode.el has been modified for OS/2 and emTeX. tex-mode.el still
  239. needs improvement.
  240.  
  241. To use TeX mode, assign the name of an existing scratch directory to
  242. the TeX-directory variable and choose a command for printing DVI
  243. files. You can do this by putting
  244.  
  245.   (setq TeX-mode-hook '(lambda ()
  246.                         (setq TeX-directory "c:/textmp/")
  247.                         (setq TeX-dvi-print-command "prtfx")))
  248.  
  249. into your .emacs file (replace "c:/textmp/" with the name of an
  250. existing scratch directory, replace "prtfx" with the name of the
  251. command to print DVI files.)
  252.  
  253. Use "start /c vp ..." to run dvipm and ignore the "Stack overflow"
  254. message. You might want to use "start /c vp" as TeX-dvi-print-command.
  255.  
  256. Using "start /c" is also useful for other print commands.
  257.  
  258.  
  259. Limitations
  260. ===========
  261.  
  262. - When using compiled Emacs Lisp files (.elc) transferred from other
  263.   systems (such as UNIX), be sure to use binary transfer. Better get
  264.   the uncompiled versions (.el) and recompile them with the
  265.   byte-compile-file function.
  266.  
  267. - Sending SIGKILL to subprocesses doesn't work -- it kills env.exe and
  268.   keeps the subprocess. SIGINT works only for emx programs. This is an
  269.   OS/2 limitation.
  270.  
  271. - Tracking of the current directory in shell mode doesn't work
  272.   correctly. This could be fixed by looking at the prompt (if its
  273.   format is acceptable).
  274.  
  275. - Drive names still don't work perfectly.
  276.  
  277. - Emacs doesn't recognize the death of a subprocess if you've run a
  278.   subprocess in Emacs, left Emacs and restarted Emacs in the same
  279.   session (window). This is an OS/2 bug.
  280.  
  281. - etags: Mysteriously you have to use the -e option to get GNU Emacs
  282.   understand the tags file:
  283.  
  284.     etags -e -f test.tags test.c test.h
  285.  
  286.   creates a tags file test.tags which you can use from within Emacs.
  287.   Type M-., and you will be prompted for the needed information.
  288.  
  289.  
  290. Building Emacs from the original FSF distribution
  291. =================================================
  292.  
  293. This section describes how to compile GNU Emacs for OS/2 2.0, using
  294. the original distribution of GNU Emacs and the patches for OS/2 2.0.
  295.  
  296. - get lots of disk space (22 MB required for building GNU Emacs) on an
  297.   HPFS partition
  298.  
  299. - get the original GNU Emacs 18.58 distribution (emacs-18.58.tar.Z) and
  300.   rename the file emacs58.Z
  301.  
  302. - get GNU patch for OS/2, GNU tar for OS/2 and GNU compress for OS/2 (all
  303.   these programs have been ported to OS/2 by Kai Uwe Rommel)
  304.  
  305. - get emx 0.8d, available for anonymous ftp on rusinfo.rus.uni-stuttgart.de,
  306.   in the directory soft/os2/emx
  307.  
  308. - get GNU make for OS/2 (ported by Galen C. Hunt), available for anonymous
  309.   ftp on hobbes.nmsu.edu (gnumk362.zoo)
  310.  
  311. - unpack the archive:
  312.  
  313.     cd \
  314.     unzip -d wherever\emacs-em
  315.  
  316. - change the path name of patch.exe in emacs-emx.cmd (to avoid running
  317.   the OS/2 patch utility)
  318.  
  319. - now you can run emacs-emx.cmd to unpack and patch the sources.
  320.   Change to the \emx\gnu directory. This batch files has multiple
  321.   entry points, which are selected by the first command line argument:
  322.  
  323.   - emacs-emx disk1             copy from diskette, concatenate, uncompress,
  324.                                 unpack, configure and patch
  325.  
  326.   - emacs-emx cat               concatenate files copied from diskette,
  327.                                 uncompress, unpack, configure and patch
  328.  
  329.   - emacs-emx uncompress        uncompress emacs58.Z (yields emacs58.tar),
  330.                                 unpack, configure and patch
  331.  
  332.   - emacs-emx tar               unpack (using GNU tar), configure and patch
  333.  
  334.   - emacs-emx 8bit              apply 8-bit patches, configure and apply
  335.                                 other patches
  336.  
  337.   - emacs-emx config            configure the sources (by copying, renaming
  338.                                 and deleting files) and apply the OS/2 patches
  339.  
  340.   - emacs-emx patch             apply the OS/2 patches
  341.  
  342.   Unless a second command line argument is given, all the sections of
  343.   the batch files are executed, starting with the one named on the
  344.   command line. A second command line argument tells emacs-emx to stop
  345.   after the named section. Also available is the second command line
  346.   argument no-patch, which stops just before the patch step (this is
  347.   used for making a diff file).
  348.  
  349. - that is, if you have emacs58.tar, run "emacs-emx tar"; if you have
  350.   emacs58.Z, run "emacs-emx uncompress", if you have the tar.Z file
  351.   split on diskettes, run "emacs-emx disk1"; and so on. Example:
  352.  
  353.     cd \emx\gnu
  354.     emacs-emx tar
  355.  
  356. - you're allowed to delete all the *.orig files. When using 4OS2, type
  357.  
  358.     cd \emx\gnu
  359.     del emacs-18.58\*.orig /s
  360.  
  361. - if there are any *.rej files, you lose. Type
  362.  
  363.     cd \emx\gnu
  364.     dir emacs-18.58\*.rej /s
  365.  
  366.   to find out
  367.  
  368. - move the directory by typing
  369.  
  370.     cd \emx\gnu
  371.     move emacs-18.58 \emacs
  372.  
  373. - if you're short of disk space, delete emacs58.tar
  374.  
  375. - continue with section "Compiling GNU Emacs"
  376.  
  377.  
  378. Building GNU Emacs from the patched sources
  379. ===========================================
  380.  
  381. This section describes how to build GNU Emacs from the patched sources
  382. that come with GNU Emacs for OS/2 2.0.
  383.  
  384. - get lots of disk space (22 MB required for building GNU Emacs) on an
  385.   HPFS partition
  386.  
  387. - get emx 0.8d, available for anonymous ftp on rusinfo.rus.uni-stuttgart.de,
  388.   in the directory soft/os2/emx
  389.  
  390. - get GNU make for OS/2 (ported by Galen C. Hunt), available for anonymous
  391.   ftp on hobbes.nmsu.edu (gnumk362.zoo)
  392.  
  393. - Continue with the next section
  394.  
  395.  
  396. Compiling GNU Emacs
  397. ===================
  398.  
  399. This section describes how to compile GNU Emacs.
  400.  
  401. - if emx is installed on a different drive, use
  402.  
  403.     set emxopt=-rc
  404.  
  405.   now, where c is the drive letter for the drive on which emx is
  406.   installed
  407.  
  408. - create makefile, if it doesn't exist or if you've changed ymakefile:
  409.  
  410.     cd \emacs\src
  411.     copy ymakefile junk.c
  412.     gcc -E -o makefile junk.c
  413.     del junk.c
  414.  
  415. - compile GNU emacs by typing
  416.  
  417.     cd \emacs\etc
  418.     make
  419.     cd \emacs\src
  420.     make temacs.exe
  421.  
  422. - ignore "Can't create xxxx!!!" messages while running make in
  423.   \emacs\etc
  424.  
  425. - set apropriate environment variables (put them in config.sys):
  426.  
  427.    TERMCAP       name of termcap file, defaults to
  428.                  /emx/etc/termcap.dat
  429.  
  430.    TERM          name of terminal, possible values include rmono,
  431.                  ansi-color-2 and ansi-color-3
  432.  
  433.    SHELL     name of the command processor, defaults to /bin/sh
  434.  
  435.    EMACSLOADPATH path to Lisp library, defaults to /emacs/lisp
  436.  
  437.    EMACSEXECPATH path to programs, defaults to /emacs/etc
  438.  
  439.    SYSTEMNAME    initializes system-name, defaults to my-system
  440.  
  441.    HOME          your homepath, replaces ~ in path names (that means,
  442.                  your .emacs-file is searched there)
  443.  
  444.    TMP           directory for temporary files, default is current working
  445.                  directory
  446.  
  447.    Example:
  448.  
  449.      set termcap=c:\emx\etc\termcap.dat
  450.      set term=mono
  451.      set shell=c:\os2\cmd.exe
  452.      set emacsloadpath=c:\emacs\lisp
  453.      set emacsexecpath=c:\emacs\etc
  454.      set systemname=vergil
  455.      set home=c:\home
  456.      set tmp=d:\tmp
  457.  
  458. - if the EMXOPT environment variable has been set (see above), unset
  459.   it now:
  460.  
  461.     set emxopt=
  462.  
  463. - compile the lisp files, create documentation and create a preloaded
  464.   version of GNU Emacs by running
  465.  
  466.     cd \emacs\src
  467.     lib
  468.     doc
  469.     dump-emacs
  470.  
  471.  
  472. History
  473. =======
  474.  
  475. These are the changes to the 2nd version of Joerg Viola's port:
  476. ---------------------------------------------------------------
  477.  
  478. - better 8-bit support (code page 850 is assumed)
  479.  
  480. - recognize size of window
  481.  
  482. - treat ~user/ like ~/
  483.  
  484. - keyboard problems fixed, more PC keys defined
  485.  
  486. - file name problems fixed
  487.  
  488. - show the real names of the PC keys
  489.  
  490. - new function: valid-file-name-p
  491.  
  492. - random fixed (library function fixed)
  493.  
  494. - when reading a file, Emacs now longer stops at the first Ctrl-Z.
  495.   CR/LF is converted to LF, a CR without a LF is not removed
  496.  
  497. - default system name changed
  498.  
  499. - choose better backup and auto-save file names on FAT partitions
  500.  
  501. These are the changes done in the 03-May-1992 version (18.58.3):
  502. ----------------------------------------------------------------
  503.  
  504. - bug fixed: CR/LF at a 64KB boundary in an input files was replaced
  505.   with CR instead of LF
  506.  
  507. - the final Ctrl-Z of text files is removed
  508.  
  509. - binary-mode files implemented (see above for details)
  510.  
  511. - file-name-absolute-p knows about drive names
  512.  
  513. - insert-file-contents: third argument is file type
  514.  
  515. - find-file-noselect sets file-type
  516.  
  517. - synchronous and asynchronous subprocesses
  518.  
  519. - wakeup.exe now available (display-time)
  520.  
  521. - emacsclient.exe now available
  522.  
  523. - shell.el changed to work better with OS/2
  524.  
  525. - tex-mode.el adapted to emTeX
  526.  
  527. - uncompress.el changed to make it also work with .z (this version of
  528.   Emacs converts file names to lower case) and to use binary mode for
  529.   the .Z file
  530.  
  531. - dired now available (you need an OS/2 port of ls)
  532.  
  533. - attention: A-c is now em-copy-region; em-copy-line-as-kill (formerly
  534.   em-copy-line) has been moved to A-l
  535.  
  536. - attention: set-mark-command has been moved from F10 to F12
  537.  
  538. - a new function for filling paragraphs, em-fill-paragraph, is bound
  539.   to F5
  540.  
  541. - user-real-login-name now returns the same value as user-login-name
  542.  
  543. - make-legal-file-name fixed (return a new string)
  544.  
  545. - make-temp-name truncates the (base name of the) prefix to two
  546.   characters to avoid problems with FAT file system
  547.  
  548. - gdb.el changed to work with 8-bit patches and to use a different
  549.   syntax for passing file name and line number information from GDB to
  550.   Emacs.
  551.  
  552.  
  553. Who?
  554. ====
  555.  
  556. Joerg Viola
  557. Potstiege 7
  558. D-4400 Muenster
  559. Germany
  560. Internet: urz63@dmswwu1a.uni-muenster.de
  561. or:       Joerg_Viola@ms.maus.de (takes long)
  562.  
  563. Eberhard Mattes
  564. Teckstr. 81
  565. D-7141 Moeglingen
  566. Germany
  567. Internet: mattes@azu.informatik.uni-stuttgart.de
  568.  
  569. An emx-related mailing list has been created. The address for people
  570. to request to be added or removed from the list is:
  571.  
  572.     emx-list-request@mail.physics.utah.edu
  573.  
  574. As there is currently no GNU Emacs for OS/2 related mailing list, you
  575. should use the emx mailing list.
  576.  
  577. No telephone calls please! Include return postage (international
  578. postal reply coupons for those outside Germany) and a self-addressed
  579. envelope if you expext a reply. GNU Emacs for OS/2 is not available on
  580. diskettes from the addresses given above.
  581.  
  582. No warranty.
  583.  
  584. ---------------------------------- END ---------------------------------------
  585.