home *** CD-ROM | disk | FTP | other *** search
- Updated June 14 1993 (1.2a)
-
- This file attempts to explain what notgnu is, and is not. The second
- part is text taken directly from the MG2a .doc file. I've editted it
- to remove things which are no longer appropriate due to changes I made
- with my port to Windows 3.1 and Intel-based NT. RISC versions of NT should
- work in theory; keep in mind that the DIRED mode formatting is hard-coded
- for FAT (DOS) filesystems under Windows/NT, but other than that should work.
- Windows builds were done with Microsoft C7 and there may be some unknown
- dependencies therein which I wouldn't know about since I have no other compiler.
- I've done limited building/testing/tuning for X11/Unix platforms; see proto.h
- for macros which deal with some compiler problems. The makefiles are named
- for the UN*X system where I was actually able to compile/link the editor.
- Executable file size vs gnu emacs is notable.
-
- PLEASE SEND ME MAIL IF YOU TRY THIS EDITOR. I WOULD APPRECIATE ANY/ALL COMMENTS.
- (jmelbin@hpwala.hp.com).
-
- notgnu was created to be a lite(r)weight emacs editor for Windows 3.x;
- NT; X11 came later since I had some machines w/o disk or memory to support
- real live gnu Emacs.[On a DEC RISC workstation, the executable is 1/3 the size
- of xemacs (18.54)] The emphasis has been on Windows vs X11 since I have a PC
- at home and GNU emacs on my Unix workstation. notgnu is based on MG2a, a PC
- emacs made to feel like GNU, that had a small code base and was nicely
- organized into editor and terminal functions (ideal for a quick port). It is
- quite useable and fast on my 486-33; with lots of large files, I can sometimes
- see Windows 'paging' to disk. My friend's 386 portable also runs notgnu quite
- nicely. A surprising number of people have sent mail; they actually seem to
- like it's small size and low resource usage. Your milage may vary. I have
- built on various Window's (Intel) machines, an Intel NT box, a DEC RISC (MIPS)
- Ultrix workstation, a DEC Alpha OSF box, INTERACTIVE Unix, a SparcStation 10
- running Solaris 2.1, and HP-UX 700 series workstation; It also appears to run on
- LINUX and a few other UN*X machines, built by folks who grabbed an earlier version
- of this .zip file from me.
-
- Basic knowlege of any emacs-like editor and Windows 3.x or X11 is assumed.
- Since there are no variables, or indeed, a programming language, there
- are a number of not-so-gnu like commands which control the state of the
- editor; ie toggle-window-menu. The X11 version supports a few start-up
- params on the command line like fg color, etc, but currently non from the
- X resource files...
-
- Mouse:
- ------
- Left button down-up in window sets dot.
-
- Left button down-drag in modeline resizes the buffer window.
-
- Left button down-drag marks a region (sorry no highlight yet!).
-
- Right button down-up sets dot && pastes the contents of the killbuffer.
-
- Left button down-hold with ctrl scrolls the window. Shift reverses direction.
-
- Left button down in window will insert contents of file supplied
- from a drag&drop client; ie drag a file out of filemanager into some buffer
- in notgnu. It will insert the data AT DOT which is set WHERE YOU DOWN CLICK.
- (Windows 3.x and NT only)
-
- Left button down in modeline will open a file from a drag&drop client
- window; ie drag a file from filemanager to some modeline and open the file
- into it's own buffer/window.
- (Windows 3.x and NT only)
-
- Left button doubleclick on filename in DIRED mode will do a find-file
- on that file name, using the dir path of the buffer.
-
- Left button doubleclick on a buffername in Buffer List will do a use-buffer on
- that buffer.
-
-
- Internal functional changes - too many to mention them all..
- ------------------------------------------------------------
- The current buffer defines the current directory unless the buffer has no
- legal filename. 'cd' and 'pwd' are no longer available; the titlebar contains
- the current directory and time. (DOS version loses out here)
-
- Viewing a file read-only is now supported by the command 'view-file'.
- You can toggle the state of the readonly flag by doing 'toggle-read-only'.
- Likewise, you can change the state of a modified file by using
- 'toggle-modified-state'. File permissions are properly checked on open
- for write permission (not guarenteed on NFS or other network disks if the
- mounting software doesn't support stat to DOS). See notgnu.st (startup file)
- for some other toggles. Other new file functions 'revert-to-incremental'
- (see below), 'reread-file'.
-
- Changes to DIRED mode to provide ONLY e,f,v (for edit, find or view file)
- resulting from cleanup/bug fixes. Mouse double-click invokes f (find-file).
- Un*x versions use 'ls' via system and the output is not always as
- expected; I'm working on that too.
-
- Dir buffer optionally generated from find-file, view-file, etc when entering
- file spec. IE c:\jam\me\file<TAB> will get you a listing of files which
- match "c:\jam\me\file*.*". Doing find-file c:\foo\junk*.*<RETURN> will also
- work. Wildcards work as well/badly as they do in DOS, but the only wildcard
- implemented is "*". The UNIX version needs work because it is not at all
- clever about determing what is a file and what is a directory; as I
- said above...
-
- Buffer list window supports u (use-buffer), k (kill-buffer); mouse doubleclick
- invokes u.
-
- Incremental saves are created during editting; every 20 seconds or so the
- buffers are scanned for files with changes since the last incremental save,
- and incremental saves are created. Continuous typing will delay the save.
- (Not functioning on DOS version at this time)
-
- Timestamp checking can be done during editting; each function which would
- change the content of a buffer (with file name) causes a check on the timestamp.
- 'toggle-check-file-timestamp' will toggle this flag, the default is OFF.
- (Hint - turn it off if editting a file on a slow floppy). Timestamp also checked
- before i/o (ie re-read or save). This can NOT be turned off.
-
-
- Sub-processes:
- -------------
- These are really functional changes, but are important enough to get special
- notice.
-
- You can open any number of DOS windows with 'shell-window' (see below). You
- can have at most (currently) 1 background 'shell' command running with
- 'shell-command' or 'compile'. Both execute DOS commands via command.com. You
- can execute any number of peer Windows programs with 'win-exec'. (Un*x
- version does a fork for all spawned tasks; it still manages at most 1
- background job which is creating a log)
-
- 'compile' runs a make command in the background via command.com. It defaults
- to nmake (make on Un*x (but you can back up and retype any command.
- 'compile' will remember (like GNU does) your last command (sorry, you can't
- change the default yet). 'next-error' attempts to behave like the GNU version
- and will search the buffer em$shl.log; you will get a stupid error if you had
- not previously run a 'compile' and replied Yes to 'Read log file' message box.
- Under some conditions, the log will be empty; ie when the only output was
- interactive. DOS is not perfect, neither is notgnu. NOTE that I had C7 on
- Windows/DOS, DEC Ultrix cc, and Solaris and HP cc as models for the format of
- a compile log. So, don't expect log file parsing to be perfect for other
- compilers. This was certainly a case of 'it works great for me' and hopefully
- ok for you :)
-
-
- 'alarms' is a quick and dirty little calendar-like feature for notgnu.
- See notgnu.alr for minimal information. notalarm.exe should be copied
- to the same place you put the notgnu executable. Type 'alarms' to see what
- you can do. UNIX version is called xnotalr; it is minimally useful.
-
-
- Appearance:
- -----------
- The buffer mode line has a couple extra things; the 2'nd col in is either
- a '-', a '*' (modified) or a '%' (read only). The very next column will
- have a '+' in it or a '!' when there is a '*' in col 2. '!' means the buffer
- has modifications which have NOT been flushed to the incremental save file;
- '+' means that the incremental file on disk looks exactly like the current
- version inside notgnu, which is not the same as your source file.
-
- Touched text (editted lines) change color. The default color is your
- system highlite color for active windows (got a better default?). Under X11,
- window color defaults to white, all text to black. When you write the file out,
- the colored lines reverts to normal (window-text) color.
- 'toggle-show-touched-lines' toggles the flag controlling this display.
-
- Text(fg), window(bg) and touched-text(fg2) colors can be set. See window system
- menu or set-*-color extended commands. Values are retained in notgnu.ini (on
- Windows/NT) when you do 'Save Setting' from window system menu. Remember,
- Windows uses only PURE colors for text, so choose colors carefully else get
- ughly results.
-
- Font is settable via window system menu (or set-font extended command); saved
- when Save Settings done (Window/NT).
-
- Save Settings also saves current window position and size in rows/cols.
- (NOTE no settings are saved on X11 platforms.)
-
- Menu Bar (Windows/NT only):
- ---------------------------
- The menu bar is accessable from the window's system menu. All commands
- in the pulldowns are extended commands available via Meta-x except for
- clipboard access functions (Copy Region/Cut Region/Paste from clipboard) and
- Print. (PRINT is not compiled in at this time, see jam.h) The common dialogs
- are hooked up for file open and write commands in the File pulldown. This can
- be useful for browsing. (toggle-window-menu will also bring up the notgnu
- local menubar)
-
- The possibly stupid-scary looking choice in the system menu (Shoot-Me-Dead)
- was a debugging tool. It will kill the editor and NOT cleanup (any of the
- incremental save files or logs). It is not useful to normal people;
- restarting the editor after doing that should be equal to what happens if you
- rerun after you best friend yanks the AC power. notgnu should report all the
- files you never had a chance to save, and if you mouse doubleclick on the
- name, you'll get the revert-to-incremental prompt. Try it out just to
- prove that there is some working crash-recovery code, but wait till all
- your modified files have the little '+' next to the '*' :) NOTE that on
- Un*x or NT platforms, multiple instances of notgnu running may (will) be
- confused by the existance of a 'crash' log. Modified, unsaved files
- in a running editor will be intepreted as 'lost changes' by subsequent editors
- on startup, and that the crash logs will overwrite one another since
- they user's home directory.
-
- On the window menubar you'll notice some things under Execute. These were
- described under Sub-processes above.
-
- IMPORTANT to note:
-
- meshell.pif is just _default.pif modified to use a certain font
- and to set the execution to run BACKGROUND and EXCLUSIVE with
- some process priorities set (see ADVANCED in the pif editor dialog).
- Copy this to the SAME PLACE you put the notgnu (wnot.exe) file. If this
- file is not found, it defaults to just running COMMAND.COM. There
- is also a file called command.pif which has had the same changes
- made to let background tasks actually RUN in the background. Copy
- this to your WINDOWS directory. See file "files" for more information.
- Failure to install these files means background jobs will run VERY VERY
- SLOWLY on most Windows 3.x systems.
-
-
- Misc (Windows/NT only):
- -----------------------
- The Window's hot keys Alt-tab (to switch between application windows) and
- Alt-space (to access the window's system menu) are the only
- non-bindable keys. It was easier to always catch them rather than see if a
- user had tried to bind them or not.
-
-
- See 'files' for the source file list and a little bit more information. Don't
- ask why the version numbers are what they are; I bump the number often
- during my own hacking. Please remember this is freeware, and you should only
- expect what you pay for; I'm hoping that you are happily surprised anyway.
-
- Julie
-
- ---------------------------------------------------------------------------
- This documentation covers mg 2a.
-
- Possible future changes:
-
- Rearange file contents along more rational lines. Further split the
- monolithic def.h file.
-
- Changing the echo line stuff to use a minibuffer keymap.
-
- Making the kill buffer a linked list of lines.
-
- Variables.
-
- Make long lines wrap like they do in GNU emacs.
-
- Fix known (and unknown :-) bugs.
-
- Have the keymaps and associated tables generated by a program.
-
- Known bugs/limitations:
-
- Binding a key in a named keymap may or may not change the binding of
- other keys pointing to the same keymap. (i.e. if ^H and ^_ are bound
- to help, rebinding ^Hb may not (or may) change ^_b. This can be cured
- by rebinding ^_ to help.)
-
- Overwrite mode does not work in macros. (Characters are inserted
- rather than overwriting.)
-
-
- New implementation oddities:
-
- insert and define-key are new commands corresponding to the mocklisp
- functions in Gnu Emacs. (Mg does not have non-command functions.)
- (Mg's insert will only insert one string.)
-
- The display wrap code does not work at all like that of GNU emacs.
-
- Adding command functions to mg:
-
- Command functions take two integer aguments and return an integer.
- The first argument, f, is a set of flags. (f&FFARG) is non-zero if a
- numeric arguement was passed to the function. (There are bits
- indicating how the agument was specified, but they are not fully
- impleminted.) (f&FFRAND) is non-zero if the function is being called
- by another function and that possibly slightly different action should
- be taken. (No error checking, supress output, etc.) The second
- argument, n, is the numeric agument passed or one if there was no
- numeric arugment. The fuction should return TRUE if it executes
- correctly, FALSE if it could not, and ABORT if the user typed the
- keyboard quit character at a prompt.
-
- The function must be added to the functnames table in keymap.c. This
- table must be kept in assending ascii sequence.
-
-
- Key maps:
-
- Key maps are structures containing information on what action should
- be taken corresponding to an individual keypress. That action could
- be an indication that this is a prefix key and the next kepress should
- be looked up in another keymap.
-
- Example keymap:
-
- static struct KEYMAPE(6+IMAPEXT) cXmap = {
- 6,
- 6+IMAPEXT,
- rescan,
- {
- {CCHR('B'),CCHR('G'), cXcB, (KEYMAP *)NULL},
- {CCHR('L'),CCHR('X'), cXcL, (KEYMAP *)NULL},
- {'(', ')', cXlp, (KEYMAP *)NULL},
- {'0', '4', cX0, (KEYMAP *)&cX4map},
- {'=', '=', cXeq, (KEYMAP *)NULL},
- {'^', 's', cXcar, (KEYMAP *)NULL},
- }
- };
-
- (Note: this example is a simplified example of a real keymap in keymap.c.)
-
- Since C does not directly support structures containing undementioned
- arrays, the macro KEYMAPE is used to create a structure with an array
- of the proper size. 6 is the current size of the array, and IMAPEXT
- is the number of extra elements left for future groth (by rebinding
- keys) before the map must be reallocated. rescan is the function to
- be executed if a specific entry for the key is not found. (rescan is
- a special function that searches for something else to do -- first by
- trying lowercasing the last character in the keymap, then by trying
- the other modes in effect.)
-
- The array elements must be in order by the keys they define. Each
- covers a range of characters. Numeric values should not be used for
- characters, they make porting mg to some other systems harder. The
- CCHR macro may be used to specify control characters, including DEL
- (CCHR('?')). cXcB, cXcL, etc. are arrays of pointers to functions
- returning int. One of these fuction pointers per element may be to
- the pseuto-function prefix. cX4map is the keymap coresponding to the
- prefix function bound to '4' in this keymap. Having several keys in
- an element bound to the default function is better than increasing the
- number of elements.
-
-
-
- Modes:
-
- Modes are named key maps that are scanned for key bindings before the
- global keymap is. There are functions in modes.c to toggle modes on
- or off for individual buffers. Note that the "major"/"minor" mode
- distiction is different than in Gnu Emacs. Dired is currently the
- only major mode available, buffers are put into dired mode on creation
- by the dired code. (The distiction in mg is the major mode replaces
- the default keymap instead of being an overlay.) Some modes (overwrite
- and no-tab) also trigger per-buffer flags that should be convered to
- per-buffer variables when we add variables. Keymaps for the modes are
- kept in keymap.c with the other keymaps.
-
- Names of most compile time options have changed. Whatever is most
- GNU-emacs like is now the default.
-
-