[comp.emacs] Does MicroEmacs-style programmability exist in GNU Emacs?

matthews@batcomputer.tn.cornell.edu (Dave Matthews) (07/14/88)

I've been happily using MicroEmacs 3.8M (the Mac version) to manipulate some
files, but I'm looking for a bit more horsepower.  From what little I've
seen about GNU Emacs programming, it looks like its purpose is entirely
different from what I've been doing in MicroEmacs -- customizing and
extending the editor itself rather than writing programs to do specific
things to files (more complicated things than keyboard macros can do).  I
don't know exactly how to describe what I want, but here's an example:
------- 
;Execute this file to insert page headers, including page number.
;Header should be two lines long, page number to be appended to first line.
;Put one copy of the header (unnumbered) at the top of the file, copy it into
;the kill buffer, put cursor in the first line, and execute this file.
set $debug "FALSE"
set %Page 1
*NextPage
end-of-line
insert-string %Page
update-screen
beginning-of-line
60 next-line
set %CurrLine $curline            ;Done yet?
end-of-file
!if &equal %CurrLine $curline
	!goto Done
!else                             ;Nope.
	set $curline %CurrLine
	yank
	2 previous-line
	set %Page &add %Page 1
	!goto NextPage
*Done
!return
---------
Sort of like a BASIC made out of Emacs functions and variables.  I see the
function execute-file doesn't even exist in GNU Emacs, so if it will do this
kind of thing at all it must do it in a different way.  Where can I look for
info about programming in GNU?

Related questions:
  Is a MicroEmacs 3.9 for the Mac available, or coming?
  Where can I find out about programming features of version 3.9?

Thanks for any help,
- Dave Matthews
  ARPA:matthews@tcgould.tn.cornell.edu             BITNET:matthews@crnlthry
  USENET:...{cmcl2,shasta,uw-beaver,rochester}!cornell!batcomputer!matthews

nwd@j.cc.purdue.edu (Daniel Lawrence) (07/14/88)

In article <5501@batcomputer.tn.cornell.edu> matthews@tcgould.tn.cornell.edu (Dave Matthews) writes:
>Related questions:
>  Is a MicroEmacs 3.9 for the Mac available, or coming?
>  Where can I find out about programming features of version 3.9?
>
	Yes, I am commited to getting a mac port of the current
uEMACS... Its just my lack of time and understanding of MAC programming
that has held me back.  I hope to have such a beast ready soon.  Version
3.9 does have a lot more horsepower in the macro language... the manual
does give an explaination of all the programming features.

>Thanks for any help, >- Dave Matthews > 

			Daniel Lawrence		(317) 742-5153
			UUCP:	{ihnp4!pur-ee!}j.cc.purdue.edu!nwd
			ARPA:	nwd@j.cc.purdue.edu
			FIDO:	1:201/2 The Programmer's Room (317) 742-5533

km@cadre.dsl.PITTSBURGH.EDU (Ken Mitchum) (07/15/88)

>>  Is a MicroEmacs 3.9 for the Mac available, or coming?
>>  Where can I find out about programming features of version 3.9?

JOVE (Jonathan's Own Version of Emacs) is already available for the Mac.
Traditional keybound commands are integrated with the Mac menus, mouse,
and window tools, and the Mac sources are the same as the unix/pc sources.
The binary is available from sumex, and the sources were posted to
comp.sources.unix several weeks ago. The sources and binary are also
available from our system and several others.

As I have never used MicroEmacs, I cannot comment on the capability of
one editor vs. the other. I have been quite happy with Jove for some time
on the Mac, and will be adding additional features later this Summer.

 Ken Mitchum
 Decision Systems Laboratories
 University of Pittsburgh

earleh@eleazar.dartmouth.edu (Earle R. Horton) (07/16/88)

In article <7389@j.cc.purdue.edu> nwd@j.cc.purdue.edu.UUCP (Daniel Lawrence) writes:
>	Yes, I am committed to getting a mac port of the current
>uEMACS... Its just my lack of time and understanding of MAC programming
>that has held me back.  I hope to have such a beast ready soon.  Version
>3.9 does have a lot more horsepower in the macro language... the manual
>does give an explanation of all the programming features.

I posted a port of uEMACS 3.9e to comp.binaries.mac a few days ago.
If all goes well, it should appear there real soon now.  This is the
last port I plan to do, because of lack of time and all the other
reasons.  It works.  It is compatible with the latest Macintosh system
software and machines with the possible exception of A/UX.  It runs
all the 3.9e macro files.

It seems to me that uEMACS needs a Macintosh programmer/volunteer to
work closely with Dan Lawrence and keep the Macintosh version of the
program up to date, incorporate Dan's latest changes, and maybe even
work towards A/UX compatibility.  Anybody want the job?  If you do,
get in touch with Dan to establish some sort of working arrangement,
then with me to get my latest sources.  Judging from the number of
requests for source disks I get, there should be somebody...

Earle Horton
Earle R. Horton.  H.B. 8000, Dartmouth College, Hanover, NH 03755

matthews@batcomputer.tn.cornell.edu (Dave Matthews) (07/21/88)

My, the folks in this newsgroup certainly are an outgoing and helpful sort!
I got many responses to my inquiry, all attesting to the power of EMACS
Lisp, and many with illustrative samples of .el code.  I was much
enlightened about how GNU EMACS is programmed and much impressed with the
kinds of things it can do.  Thank you all!

I must say though that I'm still impressed with the utility of MicroEMACS as
well.  It doesn't do as much, but it does what it does quite simply.  It got
a job done for me that I couldn't otherwise have accomplished without
learning Lisp or some lower-level language.  And the chapter on MicroEMACS
programming is all of 11 pages, whereas the GNU EMACS equivalent isn't even
finished yet (despite the best software tools imaginable ;-))).

Again this is not to disparage GNU at all, just to commend Dan Lawrence on
his fine program.

- Dave Matthews
  ARPA:matthews@tcgould.tn.cornell.edu             BITNET:matthews@crnlthry
  USENET:...{cmcl2,shasta,uw-beaver,rochester}!cornell!batcomputer!matthews