MicroEmacs and other editors (except QD)
Posted: Thu Nov 24, 2016 2:32 am
One drawback of QDOS, QPC2, ... is, that there is no freeware editor. QD-Demo delivered with QPC2 can only read files, but "Saving files" is disabled. I have tried some other editors, Ralfs SEDIT works as does Master_Spy. But they all have one drawback on QPC2 with a high resolution:
They all open at screen position 0,0 (top left). I've tried to patch the CON-channel in an older version of Master_Spy, but it didn''t work. There was an additional window with the new CON position, but the real editor was at 0,0. With the newest version of master from Dilwyns page, master uses the full screen, but unfortunately really the full screen. You can patch it, to show fewer lines on startup, but even then it uses the full screen (the rest is black). A "software" would be needed, which simulates a smaller screen, than it could perhaps work.
So I have tried MicroEmacs, which is a really excellent editor, surely the most powerfull for QDOS (even more powerfull than DME), AND it is a Pointer program. It has menus, can be moved around the screen, ...
But unfortunately it is too complex for beginners. Also MicroEmacs was my favourite editor at Windows 3.1 times (under Windows), I don't know the most key bindings any more. I have now played with the QDOS version (the latest 4.x or so) and its really superb. As it seems to be the only free editor which supports the Extended Environment, I want to start a thread here, for discussing it.
What I have found, and what is most usefull, if you start using uEmacs (short uE) is a reference card, with the most important commands (most commands are the same for the QDOS version):
http://www.jamesie.de/microemacs/
The page itself is in German, but the downloadable reference card is in English.
The most important keys in uE are:
CTRL (abbreviated with ^ e. g. ^-S to start a search)
M (M for "Meta", esc on the reference card, e. in the menus of uE for QDOS) is ESC in QDOS (and most other systems) and must be pressed first, afterwards another character must be typed, e. g. M-x to execute a named (MicroEmacs) command (You must press ESC, than x and then you can enter a command in the bottom most line of uE, e. g.: region-to-scrap).
If you look into the menus, some commands are prefixed with a tilde (~), this means the ALT-key. You can only use those key bindings, if there is no hotkey with this letter defined. If you e. g. have defined "ERT HOTPICK('s','') to pick SuperBASIC you can't use the key binding ~-S from the Search menu in uE (QDOS version). But you can of course use M-x and then enter hunt-forward or you define a key binding as on the reference card (see link above): ^-X h (press first CTRL-x and then the H-key). NOte: Fortunately Thierry has bound the F3 key on the QDOS version to hunt-forward to repeat the last search :-)
It is left as an excercise to the user, how to define a key binding.
If you want to search (^-S) it is important, that you must use ESC to start the search, as with ENTER you can enter newlines and so search for newlines (e. g. to search a string only if it occures at the end of a line).
MicroEmacs on QDOS searches the normal emacs_rc file on start up (as on every implementation) and on qdos also uelocal_rc. It is important that you have both files in your EMACS_HOME directory (you should at least define EMACS_HOME with SETENV 'EMACS_HOME=WIN1_myEmacsHomeDir'), else uE will always acces FLP1_ and FLP2_ (hard coded in uE), which takes a lot of time in QPC2 (it seems the floppies are not cached as on a real QL). If anyone will compile uE new, please remove FLP1_ and FLP2_, it is described in "emacs_hlp" (can be changed in the epath_h file). After all: Another complex programming language for a QDOS program. Look at the emacs_rc file (make a copy before) and change e. g. the variable $sscroll to FALSE - the result will be horrible - it comes from times with slow terminals, 9600 baud or so).
When loading (^-X) or viewing (read only) files (^-V) it is the easiest to click on the file name in the Files menu, so that the filename is in the hotkey stuffer and insert it with ALT-SPACE as the Menu_rext delivered with QPC2 seems to have a horrible bug (the same with QD), if a filename is already given, you can't list the directories, but this I will discuss not today, I'm now tired.
They all open at screen position 0,0 (top left). I've tried to patch the CON-channel in an older version of Master_Spy, but it didn''t work. There was an additional window with the new CON position, but the real editor was at 0,0. With the newest version of master from Dilwyns page, master uses the full screen, but unfortunately really the full screen. You can patch it, to show fewer lines on startup, but even then it uses the full screen (the rest is black). A "software" would be needed, which simulates a smaller screen, than it could perhaps work.
So I have tried MicroEmacs, which is a really excellent editor, surely the most powerfull for QDOS (even more powerfull than DME), AND it is a Pointer program. It has menus, can be moved around the screen, ...
But unfortunately it is too complex for beginners. Also MicroEmacs was my favourite editor at Windows 3.1 times (under Windows), I don't know the most key bindings any more. I have now played with the QDOS version (the latest 4.x or so) and its really superb. As it seems to be the only free editor which supports the Extended Environment, I want to start a thread here, for discussing it.
What I have found, and what is most usefull, if you start using uEmacs (short uE) is a reference card, with the most important commands (most commands are the same for the QDOS version):
http://www.jamesie.de/microemacs/
The page itself is in German, but the downloadable reference card is in English.
The most important keys in uE are:
CTRL (abbreviated with ^ e. g. ^-S to start a search)
M (M for "Meta", esc on the reference card, e. in the menus of uE for QDOS) is ESC in QDOS (and most other systems) and must be pressed first, afterwards another character must be typed, e. g. M-x to execute a named (MicroEmacs) command (You must press ESC, than x and then you can enter a command in the bottom most line of uE, e. g.: region-to-scrap).
If you look into the menus, some commands are prefixed with a tilde (~), this means the ALT-key. You can only use those key bindings, if there is no hotkey with this letter defined. If you e. g. have defined "ERT HOTPICK('s','') to pick SuperBASIC you can't use the key binding ~-S from the Search menu in uE (QDOS version). But you can of course use M-x and then enter hunt-forward or you define a key binding as on the reference card (see link above): ^-X h (press first CTRL-x and then the H-key). NOte: Fortunately Thierry has bound the F3 key on the QDOS version to hunt-forward to repeat the last search :-)
It is left as an excercise to the user, how to define a key binding.
If you want to search (^-S) it is important, that you must use ESC to start the search, as with ENTER you can enter newlines and so search for newlines (e. g. to search a string only if it occures at the end of a line).
MicroEmacs on QDOS searches the normal emacs_rc file on start up (as on every implementation) and on qdos also uelocal_rc. It is important that you have both files in your EMACS_HOME directory (you should at least define EMACS_HOME with SETENV 'EMACS_HOME=WIN1_myEmacsHomeDir'), else uE will always acces FLP1_ and FLP2_ (hard coded in uE), which takes a lot of time in QPC2 (it seems the floppies are not cached as on a real QL). If anyone will compile uE new, please remove FLP1_ and FLP2_, it is described in "emacs_hlp" (can be changed in the epath_h file). After all: Another complex programming language for a QDOS program. Look at the emacs_rc file (make a copy before) and change e. g. the variable $sscroll to FALSE - the result will be horrible - it comes from times with slow terminals, 9600 baud or so).
When loading (^-X) or viewing (read only) files (^-V) it is the easiest to click on the file name in the Files menu, so that the filename is in the hotkey stuffer and insert it with ALT-SPACE as the Menu_rext delivered with QPC2 seems to have a horrible bug (the same with QD), if a filename is already given, you can't list the directories, but this I will discuss not today, I'm now tired.