home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!agate!ames!sun-barr!cs.utexas.edu!swrinde!network.ucsd.edu!mvb.saic.com!arizona.edu!penny.telcom.arizona.edu!jew
- Newsgroups: gnu.emacs.sources
- Subject: How do I e-lisp this?
- Message-ID: <JEW.92Nov18104510@venus.venus.sunquest.com>
- From: jew@venus.sunquest.com (Ward... James Ward)
- Date: 18 Nov 92 10:45:10
- Distribution: world,local
- Organization: Sunquest Information Systems
- Nntp-Posting-Host: venus.sunquest.com
- Lines: 44
-
-
- I've never written in e-lisp, but I have a problem I need to solve in
- it. I figure it is probably easy, but would like some suggestions.
- Is this the right place to ask this question?
-
- Here's the problem:
-
- While interacting with a program using emacs' tinymud.el, I'd like to
- be able to take a message containing directions from one place to
- another and convert them into movement commands and issue the to the
- muse.
-
- Input:
-
- Caspian pages: Path from Foyer to Cyberion City University, type Out, Out, s,
- Spin(to Main Transportation Spine <Section 7>), type 1 (to Main Transportation
- Spine <Section 1>), s, uni (to Cyberion City University).
-
- Output: (one word per line followed by an enter at the end of the buffer)
-
- Out
- Out
- s
- Spin
- 1
- s
- uni
-
-
- Details: Caspian is a program, so his output is always of this form.
- The directions begin with "type" or "Type", and are separated by
- commas. All text prior to the first occurence of "[Tt]ype", all
- occurences of "[Tt]ype", and all text between parenthesis need to be
- discarded.
-
- So, what I'd like to be able to do is mark a region, and have some
- e-lisp do the rest, including entering the movement commands for me at
- the bottom of the buffer. Any e-lisp wizards out there want to take a
- stab at this one?
-
- Thanks in advance!
- --
- jew@sunquest.com
-
-