From: spot@CS.CMU.EDU (Scott Draves)
Newsgroups: gnu.emacs.sources
Subject: new zephyr.el available
Date: 25 Jan 93 04:52:27 GMT
Article-I.D.: cs.C1E87H.8Gs.1
Distribution: gnu
Organization: School of Computer Science, Carnegie Mellon University
Originator: spot@HOPELESS.MESS.CS.CMU.EDU


a new version of zephyr.el is available.  i'm calling this version 2.0
because there is a major change: it no longer uses zwrite.  instead it
just writes to the tzc process.  this makes sending messages a lot
faster.  the code was contributed by nick thompson.  the complete
package (including zephyr.el and tzc) is available by ftp from
hopeless.mess.cs.cmu.edu:/usr/spot/pub/zephyr.tar.Z

here's the head of the file:


;;; zephyr.el  an interface to the zephyr message system
;;; Copyright (C) 1992, 1993 Scott Draves (spot@cs.cmu.edu)
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

;;; This is version 2.0 (now polished a bit).  The primary advantage
;;; is that it no longer
;;; forks off a zwrite to do sends - instead, it uses a new version of
;;; tzc which is capable of sending as well as receiving.  This code
;;; was contributed by Nick Thompson (nix@cs.cmu.edu).
;;; You *will* need the new version of tzc (should be included).

;;; If you write C programs which talk to emacs, you should check out
;;; lread.h and lread.c in the tzc program.  These provide a
;;; convenient way to communicate structured data.

;;; send and receive zephyrgrams with a convenient and flexible
;;; interface.  some people say the interface feels like IRC.
;;; here's a quick feature list:
;;;    asynchronously send and receive messages from a single buffer
;;;    handles instances, multiple destinations
;;;    aliases (can translate one name to many)
;;;    "lazy" beep for notification
;;;    sender/receiver history
;;;    filter messages based on sender and/or instance
;;;    multiple buffers, each with different filters
;;;    highly customizeable
;;;
;;; there's some support for encrypted instances, but it no longer
;;; works.  to use, copy the following lines into your .emacs:
;;;
;;;  (load-library "zephyr")
;;;  (zephyr-new-buffer)
;;;
;;; this mode requires the tzc program which should have come with the
;;; distribution.  the distrubution is available by ftp from
;;; hopeless.mess.cs.cmu.edu:/usr/spot/pub/zephyr.tar.Z, and should
;;; show up in the elisp archive at some point.
;;;
;;; thanks to todd kaufmann, mark eichin, nick thompson, and hank wan
;;; for their contributions.
;;;
;;; i am always interested in bug reports and improvements to this
;;; code.  feel free to send mail.


;;; TODO
;;; 1) subscripts:  when an unrecognized instance arrives, ask if you
;;; want to read it.  remember subs in a file (.zephyr.el).  should
;;; tie into encryption.  or just have simple functions for adding and
;;; removing instances to the regexps, esp one that sez "ignore this
;;; instance for the next 30 (by default, ^U changes) minutes"
;;; 2) make send to end-of-line (?)
;;; 3) consider a fn and binding for jump to last window to receive a
;;; zgram.
;;; 4) make the hook list and beep time be locals. (?)
;;; 5) make the exposure be a sexp we send to tzc rather than a
;;; command line option.  eliminate other options same way.
;;; 6) if you send to multiple destinations, the "... done" messages
;;; cover each other up, so you can't really see all of them.

;;; CHANGES
;;; Thu Jan 21 - removed zwgc code to emulate tzc because it can't
;;; send messages (handle the input).  added a save-excursion to
;;; zephyr-do-insert so that point isn't moved in buffers that aren't
;;; visible when they receive a message.  rewrote
;;; zephyr-notify-with-scroll so it doesn't scroll the current window.
;;; Thu Jan  7 - replaced ` with cons due to incompatible versions of
;;; ` floating around.
;;; Fri Jan  1 - ugh, the recipient of "(foo)" is now "".
;;; zephyr-make-text-recipient now handles "foo(bar)".  and handle the
;;; additional information in "to" tag of tzcspew sent messages.
;;; added * to docstring of a bunch of variables.  removed
;;; zephyr-require-tzcspew. when receiving a message, formats as 
;;; "foo(bar)", rather than "foo (bar)"
;;; Sun Dec 13 - parse names a little differently:  "foo" now goes to
;;; the user foo.  "(foo)" goes to everyone reading instance foo, and
;;; "foo(bar)" goes to just user foo as instance bar.  aliases are now
;;; recursive.
;;; Sun Dec 13 - merged in changes to handle new tzc, run tzc with
;;; pipe rather than pty.  call this 2.0 because the new tzc is
;;; slightly incompatible.
;;; Mon Dec  7 - handles class MESSAGE messages that have the wrong
;;; number of fields, as can happen if the sender embeds a NULL.
;;; Mon Nov 16 - removed old code to parse output of vanilla zwgc
;;; Sat Oct 24 - if any function in the hook list returns nil, then do
;;; not call the rest of the hooks.
;;; 22/8/92 - added sentinel so when zephyr receiver dies, we are
;;; notified.  remove sentinel before restarting.
;;; 29/7/92 - added zwgc description file that emulates tzc
;;; 26/7/92 - fixed zephyr-add-timestamp, it wasn't returning the msg
;;; 11/7/92 - fixed: M-p and M-n raise error if no messages sent yet.
;;; split zephyr-notify into zephyr-notify-with-beep,
;;; zephyr-notify-with-message, and zephyr-notify-with-scroll. added
;;; zephyr-touch.  calls zephyr-touch from zephyr-insert (rather than
;;; notify).
;;; 9/7/92 - replaced a bunch of random hooks with zephyr-hook-list,
;;; including reorganizing the code, various small improvements.
;;; commented out dangling encryption stuff.  tzc now stamps with date
;;; string rather than integer so that it is human readable in the
;;; log, and also cuz emacs ints aren't big enuf. added todd's
;;; delete-messages function.  removed that bury crap.


-- 
				orgasm
Scott Draves			nitrous
spot@cs.cmu.edu			death
Newsgroups: gnu.emacs.sources