AppleLink
APPLE II DEVELOPMENT FORUM CONFERENCE LOG
November 29, 1988 10:00 pm Eastern
Topic: EMACS and other stuff
Forum Leader: James Luther (AFL Jim)
AFL Jim Welcome to the Apple II Development Forum. Tonight, we'll be
following protocol
AFL Jim during the meeting, so listen up!
JSchober (protocol?! ACK! <=== Bill the Cat protocol...)
AFL Jim If you have a question, type a question mark and send it so we'll
know you're
AFL Jim waiting.
AFL Jim If you have a comment, use an exclamation point instead. GaryJ
will be keeping
AFL Jim the queue so we'll know who's up next.
AFL Jim Tonight, our topic is programming environments, so I've asked
Morgan Davis to
AFL Jim stop in and help answer questions about the EMACS editor which he
has uploaded
AFL Jim into the forum library. Want to start us off with a little
overview of EMACS,
AFL Jim Morgan?
MDavis Wow. How much time do we have?
AFL Jim As much as you want ;)
MDavis MicroEMACS is a text editor for the Apple IIGS's APW or ORCA
shell
MDavis environments. It is the epitome of a programmer's source code
MDavis and text editor.
MDavis Some of its features:
MDavis Macros.
MDavis Multiple windows.
MDavis Split window.
MDavis Ability to shell out (that is, do shell commands while editing)
MDavis Ability to pipe shell output into a text buffer.
MDavis Commands are completely mappable (more on this) to keystrokes
that
MDavis the user wants, that includes all control keys, function
(open-apple
MDavis type) keys, or a mixtures of both.
MDavis Ability to execute a file that contains editor commands for
really
MDavis hairy kinds of text processing where a macro just won't do.
MDavis Word wrap.
MDavis Overstrike.
MDavis Pascal and C modes with auto indention, matching bracket and
parenthesis
AFL Jim (getting the idea that this does lots :)
MDavis blinking (indispensable, those two).
MDavis This is just the stuff off the top of my head. I would say that
MDavis I've only listed about 15% of its abilities.
Dave Lyons !
AFA Gary J Q = Dave
AFL Jim ?
MDavis ga Dave
AFA Gary J Q = (Dave), Jim
Dave Lyons I downloaded the source the other day; do I _really_ need 2.25
megs to compile
Dave Lyons it? -- And where do I download the execuatble version (haven't
looked)? ga
MDavis I have 1.75 mb in my machine, 768K as a ram disk and I can compile
and
AFA Kathy !
MDavis link it just fine.
AFL Jim The executable version is in the Applications and Utilities
category of the
AFL Jim Library.
MDavis The object code is "MicroEMACS Text Editor" in the library.
MDavis Make sure to get the manual, too.
Matt DTS (It locked up on me and I had to reboot!)
MDavis ga
AFA Gary J Q = Dave (Kathy), Jim
AFL Jim Kathy, GA
Dave Lyons (I'm done)
AFA Kathy Just wanted to say sounds like a very impressive program,
AFA Kathy how much memory then does it need when it's running?
AFA Kathy (Does more than our mainframe editor does and IT requires 5 MEG to
run!!!)
AFA Kathy (Well, 4 meg anyway... :) )
MDavis The program is 250 blocks in size. So I'd guess about 200K would
work
AFA Kathy GA
MDavis for most editing jobs.
MDavis BTW -- MicroEMACS is the PC version of the UNIX EMACS program with
some
AFA Kathy And the max text size? (Sorry I guess that's a question.) DONE
AFL Jim Is that a compacted file Morgan?
MDavis extra enhancements.
JSchober !
MDavis No limit on file sizes ('cept for the amount of RAM you have).
MDavis 250 blocks, compacted. It's a C program.
AFA Gary J Q = (Joe), Jim
MDavis I will recompile it under ORCA/C when I get it.
AFL Jim Joe, GA with your comment.
AFL Jim -?
JSchober Is it Freeware, Shareware, .... ?
AFA Gary J Q = (Joe)
MDavis It is a public domain project which spans multiple computers, not
just
MDavis the IIGS.
JSchober Hmmm... PD. Alright, sounds good. Thanks... :)
JSchober (GA)
MDavis Except for the Apple world, EMACS is pretty big everywhere else.
AFL Jim My only complaint with it is the load time involved.
MDavis Another feature:
MDavis It handles multiple width tabs and can use spaces for tabs, or
real tabs.
JSchober <Jim... does it stay resident after it's loaded once?>
AFL Jim (real tab = control-I)
AFL Jim It'll detab files, too.
MDavis Joe, not this version. We are testing it, but it keeps blowing up
under
MDavis APW 1.0.
JSchober Alrighty... for a 250 block file, staying in memory is practically
a must...
JSchober <sigh>
MDavis Yes, it can detab and entab lines. Pretty keen.
MDavis Yup.
MDavis We think it's a bug in APW since the program is 250 blocks in
size.
Dave Lyons !
AFA Gary J Q = Dave
JSchober Will it work with ORCA shell?
JSchober <sorry, Dave...>
MDavis I haven't tested it, but I think it does.
AFA Parik !
Dave Lyons I was playing with a short utility written in C...tried to mark it
Restartable
Dave Lyons and it promptly blew up in my face, so I gave it up (temporarily,
at least).
AFA Gary J Q = (Dave, Parik)
Dave Lyons [That's ok, Joe] Is there anything about the C library that
should cause
MDavis Yeah. I think it is just something to do with the APW shell or C
compiler.
Dave Lyons problems with restartability? ga
MDavis Could be, Dave. I'm not worrying about it much as I think ORCA/C
will
MDavis just blow APW C away.
MDavis I'll bet the editor can get down to 200 blocks (maybe less) and
run faster --.
Gy813 ?
AFL Jim Parik, GA with your comment
MDavis which isn't a big deal because it run rings around the APW text
editor as it
AFA Parik Works fine under the Orca shell, got it up right now. The only
thing that I
AFA Gary J Q = (Parik), Gy813
MDavis is (all the screen I/O is direct assembly, no tool calls).
AFA Parik need to get used to is the scrolling, it scrolls "uniquely". :)
AFA Parik ga
MDavis Learning to use EMACS is like pushing a sewing needle through your
ear drum.
MDavis But once you discover all of its power and abilities you won't use
anything
AFA Parik :)
Dave Lyons :)
MDavis else. The learning curve is steep though. Well worth it,
however.
AFA Gary J Q = Gy813
AFL Jim Go ahead with your question, Gy813
Gy813 since we mentioned the subject of APW..is assemble the only
language
MDavis I liken it to learning to fly the space shuttle as opposed to a
paper airplane.
Gy813 avalable for partial compiles?
JSchober hehehehe...
AFL Jim !
Dave Lyons !
AFA Gary J Q = Gy813 (Jim, Dave)
MDavis Gy813. That is not relevant to this discussion. Please log off
now.
AFA Gary J GA Jim
MDavis NO! Just kidding! :-)
AFL Jim Nope, you can do partial compiles with ORCA/Pascal too.
Gy813 and partials in orca/c ??
AFL Jim Compile just a specific function or procedure although I think
they have to be
AFL Jim a function or procedure at the 1st level (not nested).
AFL Jim ORCA/C isn't available yet, so I can't comment on it.
AFL Jim GA Dave
AFA Gary J Q = Gy813 (Dave)
Dave Lyons (I didn't know ORCA/Pascal supported that...hmmm.) APW C doesn't,
but you can
Dave Lyons always split your program into separate modules with separte
object files, so
Dave Lyons it isn't really critical. ga
MDavis As you probably should do with most large applications.
AFL Jim You use a command line something like:
AFL Jim compile myprogram names=(myprocedure)
AFL Jim where you only want to recompile myprocedure in myprogram.
Gy813 in C with the APW ??
AFL Jim I don't think TML Pascal supports the "names" option...
AFL Jim in ORCA/Pascal, Gy813
Gy813 ok thanks :)
AFA Kathy afk
AFL Jim Morgan, back to EMACS... How do I change the keystrokes needed to
cause things
AFL Jim to happen.
AFL Jim ?
AFA Gary J Q = Jim
AFL Jim (the key bindings)
MDavis Use the "bind-to-key" function.
MDavis This can be done on the fly in the program, or in your
"emacs.rc"
MDavis file which contains your default settings, keys, macros,
variables, etc.
AFL Jim ahhh... I wondered what emacs.rc was for. Thanks.
Dave Lyons !
AFL Jim GA Dave
AFA Gary J Q = (Dave)
Dave Lyons I've always wondered this: what does "rc" stand for? ga
Dave Lyons (And don't say Royal Crown :)
AFA Gary J :)
MDavis Me, too. I think it is short for "ResourCe"?
AFL Jim radio controlled
AFA Kathy Return Code of course! LOL!
MDavis It's used everywhere: .cshrc, .muchrc, .mailrc, .newsrc, etc.
AFA Gary J (I thought it was Random Code)
Dave Lyons M, yup, those are the places that make me wonder about it (never
seen 'much'
AFL Jack Rotten Code..... :)
Dave Lyons tho).
MDavis I'll ask bblue.
Dave Lyons As long as I've got the floor (?), does MicroEMACS use shell
variables at all?
AFA Gary J Q = Dave
MDavis In what capacity, Dave?
MDavis I don't think it does. But why would you need it to?
Dave Lyons Ummm...I guess I mean does it take default settings from shell
variables if
Dave Lyons they are there, or anything else. I don't know how useful it
would be given
Dave Lyons emacs.rc, of course. Related ? is can you use it as a standalone
application
Dave Lyons if you change the filtype to S16?
MDavis I think so. It makes no shell calls unless you use the ^X! (shell
out)
MDavis command.
Dave Lyons Good. ga
AFL Jim !
AFA Gary J Q = (Jim)
MDavis Other feature:
AFL Jim Morgan, couldn't that be disabled by checking the shell ID before
allowing a
AFL Jim shell call?
MDavis It has paragraph fill to make your text fill out to margins
perfectly.
Dave Lyons !
MDavis It might already do that, Jim.
Dave Lyons Jim, would you _want_ it to check the shell ID first? Which
shells would it
MDavis I only use it from the shell. Never tried it from,say, the
Finder.
Dave Lyons support, or would you want it to just check for an error code?
AFL Jim probably have it check for no shell.
Dave Lyons Yeah, I suppose that's simple enough: XY=$00000000 on entry if no
shell.
MDavis THat's what the C library START code does, I think.
AFL Jim How many windows does it let you have open, Morgan?
MDavis Disables all the argv[] ability.
AFA Gary J Q = Jim
MDavis I haven't topped it off to find out. I think it's just based on
RAM.
JSchober !
AFL Jim GA Joe
AFA Gary J Q = Jim (Joe)
JSchober Those MouseText windows or something along those lines?
MDavis By windows I mean "screen areas". It's all in text, but no weird
borders and
MDavis stuff to take away editing space.
JSchober Ah... good! :) Thanks...
MDavis You get a status bar at the bottom of each window. So that is
your
MDavis divider.
MDavis Other features:
MDavis Cut, copy, paste, delete, character transposition, begin/end of:
MDavis lines, paragraphs, screens, words, file, etc.
JSchober <how 'bout a spelling checker with Pascal and C reserved words??
;) >
MDavis Search. Search/replace. Search/replace with Y/N query.
Dave Lyons !
AFA Gary J :)
AFL Jim GA Dave
AFA Gary J Q = (Dave)
MDavis Incremental search (forward and backward)
Dave Lyons Does the cut/copy/paste support the GS scrap manager? ga
MDavis (search while you type in the string)
MDavis Nope. It's the built-in EMACS standard "kill/yank" buffer.
MDavis This isn't a IIGS application, after all.
Dave Lyons Wanna put scrap manager support in? Maybe we could start a trend
of supporting
MDavis It just runs on a IIGS.
MDavis That's why the source is PD!
Dave Lyons stuff that GS stuff is supposed to support. It's an application
running on the
Dave Lyons GS...that makes it a GS application if you ask me :)
MDavis On "another major information service" a group of programmers are
hacking it.
AFA Parik xib? :)
JSchober (heh)
AFL Jim What's the Mac version look like, Morgan?
MDavis Right, kiraP.
AFA Parik :)
MDavis We're fixing it and making it better. The scrap manager idea
hasn't been
AFL Jim ie: how'd they simulate the text screen :)
MDavis brought up until now. It is something to add. (yet more #ifdef
IIGS's)
MDavis I haven't seen it, Jim.
AFL Jim I just wondered - the docs mentioned a Mac version with mouse
control and menus
AFA Gary J !
AFL Jim GA Gary
AFA Gary J I noticed this program evolved from quite a few years ago...what
other computer
AFA Gary J systems has this program run on?
MDavis C-64 had it before the Apple. Sickening.
JSchober <shudder>
AFA Gary J Uugh!
MDavis Amiga, Atari, CP/M machines, PC's
JSchober Gads... and Apple LAST?? What IS this world coming to?!
MDavis (The apple has never had a decent C compiler is the reason)
AFA Gary J (That's what I was wondering!)
AFA Parik Does the nintendo have it? :)
AFA Gary J LOL!
JSchober :) Parik...
JSchober Timex Sinclair?? TI 99/4A?? Err.... VIC-20??
AFA Parik :)
AFA Parik Hi Andy
AFL Jack the Nintendo uses a 'd' compiler ;)
MDavis Just about any machine that has a good C compiler has it.
JSchober Hi, Andy...
ShrinkIt Oh no, I've been ambushed! :)
AFL Jim Morgan, Thanks for coming and answering all the questions
tonight.
AFA Parik ()()()()()
MDavis It would take about three hours to do MicroEMACS any justice.
JSchober <what Parik... errr... said... :) >
MDavis Hopefully you power-programmers are interested enough to check it
out now.
JSchober Yup; in fact, I think I'll d/l it tonight.... :) Really sounds
nice...
AFL Jim I suggest that all of you with IIGSs download the Docs and check
what it can do
Dave Lyons Will it be faster to download the executable or compile the
source? :)
AFA Parik GET THE DOCS! You can't quit the program without it. :)
MDavis Make sure you get the manual! Best PD manual I've ever seen!
AFA Gary J :)
MDavis GMTA, Parik.
Dave Lyons You can if you already use EMACS on a mainframe, Parik :)
AFL Jim I was able to download EMACS and the docs in less than 1/2 hour at
2400 bps.
AFA Parik :P Dave
JSchober Really?? Not bad, Jim...
MDavis Downloading will be faster I think.
MDavis Could be a close race.
MDavis There are about 30-some C source files in it.
AFA Gary J (There is no Open-Apple key on a mainframe, I guess :)
JSchober Then you folks'll excuse me... I'll go take a look at this
bugger!! Thanks for
JSchober the chat, folks.... :)
MDavis OH!
AFA Parik Bye Joe! Have a lotta fun D/Ling it! :)
Dave Lyons Okay, will download it. Gotta read Pride and Prejudice anyway....
:)
JSchober (oh, yeah, joy...) Night!
MDavis uEMACS uses the ESC key as a meta prefix.
AFA Parik How long did you guys spend converting this program anyways? Must
have been
AFA Parik a great time! :)
MDavis The function key ability was created for the PC's and similar
computers with
MDavis FN keys.
MDavis Paul Elseth did most of the conversion. Based on the dates on
the
MDavis files it looks like he spent about three months hacking away on
his
MDavis own before putting the source on BIX for the rest of us to oogle
over.
ShrinkIt I got it, but didn't notice... will it use an extended keyboard's
FN keys?
AFA Parik Wow! Big kudos to Paul...
Dave Lyons I was looking at the keyboard-reading source briefly...doesn't
look like it
MDavis Dunno, Andy.
Dave Lyons treats "keypad" keys specially, so I suspect it _doesn't_
recognize the
MDavis The source is there for all the keyboard and screen stuff. Paul
and
Dave Lyons extended keyboard's function keys as anything other than lowercase
letters.
MDavis I went round-and-round on making it as fast as possible.
MDavis We check for control key (modifiers flag) for certain commands so
that
AFA Parik It's really fast Morgan! Text output is great!
MDavis Control-J is a different key than the down arrow.
Dave Lyons (The Prime I use EMACS on filters out Ctrl-J before EMACS can even
see it...
Dave Lyons brilliant, eh?)
ShrinkIt (maybe "next version?" :) It's very good... I like the cut&paste
between files
MDavis Here's a tip for you guys just getting into EMACS (or about to):
ShrinkIt (since orca's doesn't do that... )
AFA Parik ^X^C quits. :)
MDavis The program is TOO LOGICAL. I mean, it is so logical that it
seems
MDavis to be hard to learn. For example, to move around the screen,
the
AFA Parik Andy, are you sure? I can ^X a block, exit, return, and
repaste.
MDavis standard movement keys are ^F (forward), ^B (backward), ^P
(previous),
MDavis and ^N (next). Fortunately, we mapped the IIGS's arrows to
these
MDavis functions so that it is more logical for *US* to use. But that
is
AFA Gary J (good!)
MDavis just an example of how well thought out the commands are. They
are
MDavis easy to remember if you FORGET about all the BAD editors that
have
MDavis ruined logical thinking.
AFA Parik hehe
MDavis Too true.
Dave Lyons And, for ex, putting an ESC in front of one of those makes it move
1 word
Dave Lyons instead of one character. Things fit together nicely.
ShrinkIt (like OA-L for a forward search maybe? :)
MDavis Yup. And OA-RIGHT-ARROW does the same as ESC-F(forward)
Dave Lyons good
AFA Gary J Ahh..now that's logical.
MDavis You can also count-prefix commands. eg:
MDavis ESC-255 DELETE.... that will do 255 deletes.
MDavis The program does everything.
Dave Lyons Except printing, right?
MDavis Yeah. And it shouldn't concern itself with printing.
MDavis We need to port troff or nroff to the IIGS now.
Dave Lyons (So it does everything it _should_. :)
MDavis Right.
ShrinkIt (yeah, right... hahahahaha)
MDavis You can shell out and print from APW/ORCA, of course.
MDavis While still in the editor.
Dave Lyons Geez, nroff slows down Vaxes....
AFA Gary J (It doesn't do everything Nifty List does... :)
ShrinkIt (and suns)
AFA Parik :) Gary
Dave Lyons Sorry, that should be Vaxen.
MDavis We need a good text-formatting/printing program.
Dave Lyons (Yeah, you can go into Nifty List and print an ASCII dump of your
file.... :)
MDavis Even a "man" would be good for most purposes.
AFL Jim Hey Fuzzzz... you're lurking too much tonight.
Dave Lyons Morgan, that reminds me...Davex has a really _crude_ text
formatter, fp, that
Dave Lyons I use to print ALPE notes that I've Saved As, and I noticed that
there are
Dave Lyons backspaces in those saved notes after brackets (don't remember
which kind); can
Dave Lyons anybody tell me why those are there?
AFA Parik Hi SGQUick!
AFL Jim Only BillP knows for sure, Dave.
MDavis THey have ^W and ^V codes in log files too.
SGQuick Hi everyone.
AFA Gary J I'd like to know too, Dave. I've noticed them too.
MDavis Weird.
Dave Lyons Yeah...noticed those, too.
AFA Parik "Custom software tricks" Yup. ;)
MDavis Gosh -- incompatible with APPLEWORKS! FOR SHAME!!!
Dave Lyons I must admit I've never used the print-file option in Work
Offline...does it do
Dave Lyons anything interesting with those codes?
AFL Jim nope
AFA Gary J hehe
MDavis Gotta go back and code now, guys.
AFA Gary J Thanks, Morgan!
AFL Jim OK, Morgan... thanks again.
AFA Parik bye Morgan! Thanks for enlightening!
MDavis Send me your uEMACS questions in e-mail if you want.
MDavis See ya.
ShrinkIt gnight
AFL Jim or post'm
Dave Lyons Bye, Morgan.
AFL Jim :)
Dave Lyons (Is there already a uEMACS folder?)
AFA Gary J We need an EMACS folder.