[comp.mail.mush] Official 7.2.0 Patch Kit, Part01/04

schaefer@ogicse.cse.ogi.edu (Barton E. Schaefer) (11/05/90)

@OFF

This is the Official Patch Kit for conversion of Mush 7.1.2 to Mush 7.2.0.
The kit is in four parts.  Patches for the following files are included:

Part01:
	version.h    README-7.2   commands.c   makefile.bsd mush.1       

Part02:
	README        hdr_sw.c      makefile.hpux  mush.h      tool.c        
	dates.c       mail.c        msgs.c         panels.c      

Part03:
	addrs.c        doproc.c      loop.c          pick.c    tool_help      
	bind.c         file.c        main.c          print.c        
	compose.icon   folders.c     makefile.sys.v  setopts.c      
	config.h-dist  hdrs.c        makefile.xenix  signals.c      
	curses.c       lock.c        misc.c          sort.c         
 
Part04:
	Mushrc           bindings.h  execute.c  makefile.sun  viewopts.c      
	advanced.mushrc  cmd_help    init.c     sample.mushrc   

As usual, complete sources for Mush (already including the changes in this
patch) can be obtained via anonymous ftp from:

                  cse.ogi.edu:pub/mush/mush-7.2.tar.Z

If you need any earlier patches for 7.1.2, they are available for ftp
from cse.ogi.edu, or you can send E-mail to me:

                         schaefer@cse.ogi.edu
     {decwrl,garp,harvard,rutgers,sdsu,ucsd,unmvax}!ogicse!schaefer

Include in your message a line of the form

@PATCH patch-number path-from-ogicse-to-you

where patch-number is the number of the patch you need (digit, 1 or 2)
and path-from-ogicse-to-you is either your Internet domain address or
a UUCP path from site ogicse to you at your site.  There continue to
be sendmail configuration problems at ogicse so please do not use mixed
UUCP and Internet addresses and do not use domain names (with `.'s) in
UUCP paths.  Ogicse does do UUCP map lookups now, so user@site.UUCP will
often work if your site is registered.  If you don't get your patches
in 2 or 3 days, try again, but use a different path.

You may include one @PATCH line for each patch you need.

You can also recieve a complete set of sources by E-mail by including
a line of the form

@MUSH path-from-ogicse-to-you

where path-from-ogicse-to-you is as above.  You need not request both
source and patches; the source you receive will include all current
patches.  Sources are shipped as a 9-part compressed tar file, encoded
for mailing with the "btoa" utility.  You will receive instructions
explaining how to unpack the tar file in a separate message.

CSNet also operates an E-mail server that accesses anonymous ftp.  It
may or may not be functional at this time.  To find out, and to get
instructions for using the server, send a message to info-server@cs.net
with the following lines in the text:

request: info
topic: help-ftp
request: end

Other information, plus questions and answers, on mush and mush patches
is available from the mush-users mailing list, which is gatewayed in
both directions with newsgroup comp.mail.mush.  The list currently
resides at mush-users@garp.mit.edu, but may in the near future be moving
to mush-users@apple.com.  Requests to be added to or deleted from the
list should be sent to mush-users-request@garp.mit.edu, for now.

Prereq: "7/11/90"
*** /tmp/,RCSt1009415	Sun Nov  4 20:01:12 1990
--- version.h	Wed Oct 31 22:25:22 1990
***************
*** 1,7 ****
  /* @(#)version.h	(c) Copyright 1989 (Dan Heller) */
  
  #define MUSHNAME	"Mail User's Shell"
! #define RELEASE_DATE	"7/11/90"
  #define RELEASE		7
! #define REVISION	"1"
! #define PATCHLEVEL	2
--- 1,7 ----
  /* @(#)version.h	(c) Copyright 1989 (Dan Heller) */
  
  #define MUSHNAME	"Mail User's Shell"
! #define RELEASE_DATE	"10/31/90"
  #define RELEASE		7
! #define REVISION	"2"
! #define PATCHLEVEL	0
*** /tmp/,RCSt1009525	Sun Nov  4 20:02:06 1990
--- README-7.2	Sun Nov  4 16:58:48 1990
***************
*** 0 ****
--- 1,188 ----
+ 
+ This is release 7.2.0 of the SunView implementation of mush.
+ 
+ Version 7.2.0 differs from 7.1.2 in additions to general functionality
+ and in bug fixes.  There are no significant changes to the appearance
+ of any of the interfaces.  The changes to add certain enhancements were
+ significant enough that the revision number was increased from 1 to 2.
+ 
+ New/changed commands:
+ 
+     about
+ 	This command produces an informational message about the program
+ 	and its authors.  It is available as a help menu selection in
+ 	tool mode.
+ 
+     alts user@host
+ 	This new alternates syntax is provided to make the behavior a
+ 	little more intuitive.  It is equivalent to
+ 	    alts !host!user
+ 	and will be displayed in that form in the alternates list or
+ 	in "saveopts" option dumps.
+ 
+     headers -H:m
+ 	The :m modifier (which can be used as a standalone command, as
+ 	with other such modifiers) selects messages having a temporary
+ 	mark.  See below.
+ 
+     mark
+     mark -[priority]
+     unmark
+ 	The "mark" command sets user-defined flag bits on messages.
+ 	With no arguments (or only a message list), it attaches a
+ 	temporary mark, not saved across updates.  With a -priority
+ 	argument, where priority is a letter A through E, a permanent
+ 	priority is assigned.  Priorities are removed by "mark -".
+ 	Temporary marks are removed by "unmark".
+ 
+ 	For the curses interface, the `*' key is now bound by default
+ 	to the new curses-command "mark".  This command toggles the
+ 	temporary mark on the current message.
+ 
+     pick -p priority
+ 	The -p option selects messages with priority specified by an
+ 	integer A through E.  Multiple -p options may be used, e.g.
+ 	    pick -p B -p D
+ 	will select messages having either priority B or priority D.
+ 
+ 	An additional change to the pick command is that some option
+ 	or pattern must be specified.  Using "pick" with no arguments
+ 	to repeat the last pattern search is no longer supported.  It
+ 	was never supported completely (only the pattern was retained,
+ 	not other information about where to look for it) and has been
+ 	eliminated to prevent confusion.
+ 
+     sort -p
+ 	The -p option orders messages by priority, A first, E last.
+ 	Marked messages (having the temporary mark) are treated as
+ 	highest priority for purposes of this ordering.  The ordering
+ 	can be reversed by using "sort -rp".  Also, the default status
+ 	sort now uses priority when status is otherwise the same.
+ 
+ New/changed variables:
+ 
+     $cdpath
+ 	It is no longer necessary to include "." in $cdpath.
+ 
+     $prompt
+ 	The values of variables can now be included in the prompt at
+ 	the time it is displayed.  The format syntax "%$variable",
+ 	where "variable" is some variable name, will insert the value
+ 	into the prompt.  Remember to use single quotes when setting
+ 	prompt strings to protect such variable references.
+ 
+ Details of general changes:
+ 
+     * The "preserve" command is now closer in behavior to UCB Mail and
+       Sun Mailtool, and mush now properly retains preserved status set
+       by either of those mailers.  Preserving a message no longer causes
+       it to be marked "U" (unread) when the folder is reloaded.
+ 
+     * In addition to the usual set of status bits, six user-defined bits
+       have been added.  The first is a `mark' bit, which shows up as a
+       `+' following the message number in the header display.  This bit
+       is not retained across folder update.  The other five bits are
+       `priority' bits A through E, displayed in the same spot if the mark
+       is not present.  These bits are retained across update in a Priority:
+       header placed just above the Status: header.  Priorities can be used
+       to select messages by using the "pick -p" command.  Marked messages
+       can be selected by the ":m" command.  The "sort -p" command orders
+       messages by priority (A highest, E lowest).  Marks and priorities
+       are attached to messages via the "mark" command.
+ 
+     * The "update" command now retains the "N" (new) status of messages
+       across the write-back to the folder.  The "quit" command still
+       changes the status to "U" (unread) on write-back, but new status
+       can be retained even across exit/restart by using "update;quit"
+       to exit from mush.
+ 
+     * Systems in European time zones using the /etc/timezone database
+       report daylight savings time in a two-word format, e.g. "MET DST".
+       The date parser has been fixed to recognize those formats in both
+       RFC822-compatible and ctime(3)-compatible date lines.  If you find
+       that you receive two-word time zones in one of the more exotic
+       date line styles that mush attempts to recognize, you'll have to
+       fix dates.c yourself.
+ 
+     * The cmd_help file now contains an entry with information of general
+       interest about the program and its authors.  This information is
+       accessed via a new command, "about", or via "help about".
+ 
+ Bugs fixed:
+ 
+     * The header display for mixed-format addresses now works as it has
+       been advertised to work since 7.1.2.
+     * Lock files are now properly removed for DOT_LOCK systems.
+     * History keyword searches now work properly for SysV systems.
+     * User-supplied From: lines for outgoing mail (via "my_hdr From:") 
+       are now properly inserted regardless of the value of $edit_hdrs.
+     * When composing mail, the escape character (normally tilde, `~')
+       is not treated as an escape if line wrap ($wrapcolumn) causes it
+       to become the first character on a line.
+     * If the .signature file does not have a terminating newline, mush
+       will provide one.
+     * Sending mail from the tool no longer leaves <defunct> processes
+       to accumulate in the process table.
+     * When changing directories, the current directories is always
+       searched first; "." in $cdpath is ignored.
+     * MIPS and other BSD-SYSV hybrid systems that use the getwd() call
+       instead of the usual SysV getcwd() can define GETWD in config.h
+       to select the correct call.
+ 
+ Tool mode changes:
+ 
+     * The new mail flag in the mush mailbox icon now goes up whenever
+       new mail arrives in the spool mailbox, even if the current folder
+       is not the spool mailbox.  Also, if the current folder is not the
+       spool but the size of the spool shrinks -- that is, the spool is
+       updated from another mush or mail session -- the flag will go up
+       to notify the user that "someone else" has modified his spool.
+ 
+     * When mushtool is started up or changed to a new folder, the first
+       new/unread message in the folder is automatically displayed.  In
+       previous versions, this would cause the message to be marked as
+       read, so that message would be saved to the user's mbox on the
+       next update, even if that message had previously been "preserved"
+       for storage in the spool file.  In 7.2, the message is still
+       displayed, but its preserved status is not changed unless it is
+       explicitly read by the user at a later time.
+ 
+     * There is a new panel button in the header panel to toggle marks
+       and set priorities.
+ 
+ ===========================================================================
+ 
+ Information on the compose frame when the variable "compose_icon"
+ is set..
+ 
+ The compose frame is created as its own base frame, rather than a
+ child frame of the tool frame. The advantage of this is that the
+ compose window can be closed to an icon, rather than closed to
+ invisibleness.
+ 
+ The compose frame is opened by clicking on the "Compose" or "Reply"
+ buttons in the main mushtool panel or by clicking on or opening the
+ compose window icon (if it is visible). The very first the time
+ compose window is opened it must be done with the Compose or Reply
+ buttons in order to create the frame.
+ 
+ The compose frame can be closed by using the SunView frame popup
+ menu or by clicking on the "Close" button in the compose frame
+ panel.
+ 
+ The compose frame icon may be changed via the options menu and
+ mushrc files in the same manner that the tool icons are changable.
+ 
+ Closing the base tool with the "Done" button will also close the
+ compose frame (if it is open). The compose frame may be opened by
+ itself if all the user needs to do is compose/send a message.
+ Quiting mushtool also destroys the compose frame.
+ 
+ The default compose icon is the "textedit" icon with a label of
+ "mush" added to it.  To use your own custom icon, set "compose_icon"
+ to the path of the icon file.
+ 
+ 
+ 	-Bill Randle
+ 	billr@saab.CNA.TEK.COM
+ 	29 October 1990
*** /tmp/,RCSt1009442	Sun Nov  4 20:01:25 1990
--- commands.c	Sun Oct 21 19:24:43 1990
***************
*** 32,37 ****
--- 32,38 ----
      { "write", 	  save_msg    },  { "save", 	save_msg   },
      { "copy", 	  save_msg    },  { "folders",  folders    },
      { "merge",	  merge_folders },
+     { "mark",	  mark_msg    },  { "unmark",	mark_msg   },
  #ifdef CURSES
      { "curses",   curses_init },  { "bind",	bind_it    },
      { "unbind",   bind_it     },  { "bind-macro", bind_it  },
***************
*** 57,63 ****
      { "x",   mush_quit }, { "q", mush_quit }, { "xit", mush_quit },
      { ":a",  do_hdrs   }, { ":d", do_hdrs  }, { ":r", do_hdrs },
      { ":o",  do_hdrs   }, { ":u", do_hdrs  }, { ":n", do_hdrs },
!     { ":s",  do_hdrs   }, { ":p", do_hdrs  },
      { "z",   do_hdrs   }, { "z-", do_hdrs  }, { "z+", do_hdrs },
      { "h",   do_hdrs   }, { "H",  do_hdrs  },
      { "f",   do_from   }, { "m",  do_mail  }, { "alts", alts  },
--- 58,64 ----
      { "x",   mush_quit }, { "q", mush_quit }, { "xit", mush_quit },
      { ":a",  do_hdrs   }, { ":d", do_hdrs  }, { ":r", do_hdrs },
      { ":o",  do_hdrs   }, { ":u", do_hdrs  }, { ":n", do_hdrs },
!     { ":s",  do_hdrs   }, { ":p", do_hdrs  }, { ":m", do_hdrs },
      { "z",   do_hdrs   }, { "z-", do_hdrs  }, { "z+", do_hdrs },
      { "h",   do_hdrs   }, { "H",  do_hdrs  },
      { "f",   do_from   }, { "m",  do_mail  }, { "alts", alts  },
***************
*** 72,77 ****
--- 73,79 ----
  };
  
  struct cmd hidden_cmds[] = {
+     { "about",	print_help  },
      { "debug", toggle_debug }, { "open", 	nopenfiles },
      { "stty",	my_stty     },
      { "setenv",	Setenv      }, { "unsetenv", 	Unsetenv   },
***************
*** 200,207 ****
  		}
  	    } else {
  		if (isoff(msg[n].m_flags, PRESERVE)) {
- 		    /* || ison(msg[n].m_flags, DELETE)) */
- 		    /* turnoff(msg[n].m_flags, DELETE); */
  		    turnon(msg[n].m_flags, PRESERVE);
  		    turnon(glob_flags, DO_UPDATE);
  		}
--- 202,207 ----
***************
*** 267,273 ****
  		(void) fputc('\f', pp); /* send a formfeed for multiple copies */
  	    print("printing message %d...", n+1);
  	    print_more("(%d lines)\n", copy_msg(n, pp, (u_long) flags, NULL));
! 	    turnon(msg[n].m_flags, PRINTED), turnon(glob_flags, DO_UPDATE);
  	}
      }
      off_intr();
--- 267,274 ----
  		(void) fputc('\f', pp); /* send a formfeed for multiple copies */
  	    print("printing message %d...", n+1);
  	    print_more("(%d lines)\n", copy_msg(n, pp, (u_long) flags, NULL));
! 	    turnon(msg[n].m_flags, PRINTED|DO_UPDATE);
! 	    turnon(glob_flags, DO_UPDATE);
  	}
      }
      off_intr();
***************
*** 374,381 ****
  		if (by_subj) {
  		    if (p = header_field(msg_number, "subject")) {
  			/* convert spaces and non-alpha-numerics to '_' */
! 			if (!lcase_strncmp(p, "re: ", 4))
! 			    p += 4;
  			for (p2 = p; *p2; p2++)
  			    if (!isalnum(*p2) && !index(".,@#$%-+=", *p2))
  				*p2 = '_';
--- 375,384 ----
  		if (by_subj) {
  		    if (p = header_field(msg_number, "subject")) {
  			/* convert spaces and non-alpha-numerics to '_' */
! 			if (!lcase_strncmp(p, "re:", 3)) {
! 			    p += 3;
! 			    skipspaces(0);
! 			}
  			for (p2 = p; *p2; p2++)
  			    if (!isalnum(*p2) && !index(".,@#$%-+=", *p2))
  				*p2 = '_';
***************
*** 423,429 ****
  	    n++;
  	    if (isoff(msg[msg_number].m_flags, SAVED) && firstchar != 'c') {
  		turnon(glob_flags, DO_UPDATE);
! 		turnon(msg[msg_number].m_flags, SAVED);
  	    }
  	}
      if (mail_fp) {
--- 426,432 ----
  	    n++;
  	    if (isoff(msg[msg_number].m_flags, SAVED) && firstchar != 'c') {
  		turnon(glob_flags, DO_UPDATE);
! 		turnon(msg[msg_number].m_flags, SAVED|DO_UPDATE);
  	    }
  	}
      if (mail_fp) {
***************
*** 472,478 ****
      argv += (n-1);
      if (!strcmp(cmd, "replyall"))
  	Upper(*cmd);
!     strdup(argv[0], cmd);
  
      /* make sure the *current* message is the one being replied to */
      for (current_msg = -1, n = 0; n < msg_cnt && current_msg == -1; n++)
--- 475,482 ----
      argv += (n-1);
      if (!strcmp(cmd, "replyall"))
  	Upper(*cmd);
!     if (n > 0)
! 	strdup(argv[0], cmd);
  
      /* make sure the *current* message is the one being replied to */
      for (current_msg = -1, n = 0; n < msg_cnt && current_msg == -1; n++)
***************
*** 524,547 ****
      /* if a full path was not specified, loop through cdpath */
      if (**argv != 'p' && *p != '/' && *p != '~' && *p != '+')
  	cdpath = do_set(set_options, "cdpath");
      do  {
! 	if (cdpath) {
! 	    char c;
! 	    if (p2 = any(cdpath, " \t:"))
! 		c = *p2, *p2 = 0;
! 	    (void) sprintf(buf, "%s/%s", cdpath, p);
! 	    if (cdpath = p2) /* assign and compare to NULL */
! 		*p2 = c;
! 	    while (cdpath && (isspace(*cdpath) || *cdpath == ':'))
! 		cdpath++;
! 	} else
! 	    (void) strcpy(buf, p);
! 	x = 0;
  	path = getpath(buf, &x);
! 	if (x != 1 || chdir(path) == -1)
  	    err = errno;
! 	else
! 	    err = 0;
      } while (err && cdpath && *cdpath);
      if (err)
  	error(p);
--- 528,550 ----
      /* if a full path was not specified, loop through cdpath */
      if (**argv != 'p' && *p != '/' && *p != '~' && *p != '+')
  	cdpath = do_set(set_options, "cdpath");
+     (void) strcpy(buf, p);
      do  {
! 	err = x = 0;
  	path = getpath(buf, &x);
! 	if (x != 1 || chdir(path) == -1) {
  	    err = errno;
! 	    if (cdpath) {
! 		char c;
! 		if (p2 = any(cdpath, " \t:"))
! 		    c = *p2, *p2 = 0;
! 		(void) sprintf(buf, "%s/%s", cdpath, p);
! 		if (cdpath = p2) /* assign and compare to NULL */
! 		    *p2 = c;
! 		while (cdpath && (isspace(*cdpath) || *cdpath == ':'))
! 		    cdpath++;
! 	    }
! 	}
      } while (err && cdpath && *cdpath);
      if (err)
  	error(p);
***************
*** 568,574 ****
  	    return -1;
  	}
      }
!     if ((!argc || (*argv && **argv == 'q')) && !copyback("Really Quit? "))
  	return -1;
  #ifdef CURSES
      if (iscurses) {
--- 571,577 ----
  	    return -1;
  	}
      }
!     if ((!argc || (*argv && **argv == 'q')) && !copyback("Really Quit? ",TRUE))
  	return -1;
  #ifdef CURSES
      if (iscurses) {
***************
*** 608,614 ****
  	    if (undel)
  		turnoff(msg[argc].m_flags, DELETE);
  	    else
! 		turnon(msg[argc].m_flags, DELETE);
  
      /* only if current_msg has been affected && not in curses mode */
      if (prnt_next == 0 && !iscurses && msg_bit(list, current_msg))
--- 611,617 ----
  	    if (undel)
  		turnoff(msg[argc].m_flags, DELETE);
  	    else
! 		turnon(msg[argc].m_flags, DELETE|DO_UPDATE);
  
      /* only if current_msg has been affected && not in curses mode */
      if (prnt_next == 0 && !iscurses && msg_bit(list, current_msg))
***************
*** 634,640 ****
  	}
  #ifdef SUNTOOL
      if (istool && isoff(glob_flags, IS_PIPE)) {
! 	if (current_msg != old_msg && !do_set(set_options, "show_deleted"))
  	    (void) do_hdrs(0, DUBL_NULL, NULL);
  	else {
  	    char *av[3], buf[8];
--- 637,643 ----
  	}
  #ifdef SUNTOOL
      if (istool && isoff(glob_flags, IS_PIPE)) {
! 	if (current_msg != old_msg && do_set(set_options, "show_deleted"))
  	    (void) do_hdrs(0, DUBL_NULL, NULL);
  	else {
  	    char *av[3], buf[8];
***************
*** 1251,1255 ****
--- 1254,1306 ----
  	++last_cnt;
      }
  
+     return 0;
+ }
+ 
+ mark_msg(x, argv, list)
+ char **argv, list[];
+ {
+     int i, set_priority = 0;
+     int unmark = argv && argv[0] && argv[0][0] == 'u';
+ 
+     if (argv && *++argv && !strcmp(*argv, "-?"))
+ 	return help(0, "mark", cmd_help);
+ 
+     /* command must be "mark [ -[A|B|C|D|E] ] [msg_list]" */
+     if (!unmark && argv && *argv && **argv == '-') {
+ 	if (!argv[0][1])
+ 	    set_priority = -1; /* special case for clearing priority */
+ 	else if ((set_priority = (upper(argv[0][1]) - 'A' + 1)) < 1 ||
+ 		  set_priority > MAX_PRIORITY) {
+ 	    print("mark: priority -A through -%c required (- to clear)\n",
+ 		MAX_PRIORITY + 'A');
+ 	    return -1;
+ 	}
+ 	++argv;
+     }
+     if (x && (x = get_msg_list(argv, list)) == -1)
+ 	return -1;
+     argv += x;
+     /* if extraneous args exist or the priority was misspecified... */
+     if (argv[0]) {
+ 	print("Unknown arg: %s.  mark -? for help.\n", *argv);
+ 	return -1;
+     }
+     for (x = 0; x < msg_cnt; x++)
+ 	if (msg_bit(list, x)) {
+ 	    if (set_priority)
+ 		/* could be setting priority or clearing all priorities */
+ 		for (i = 1; i <= MAX_PRIORITY; i++)
+ 		    turnoff(msg[x].m_flags, M_PRIORITY(i));
+ 	    if (unmark)
+ 		turnoff(msg[x].m_flags, M_PRIORITY(0));
+ 	    else if (set_priority > 0) {
+ 		turnon(msg[x].m_flags, M_PRIORITY(set_priority)|DO_UPDATE);
+ 		turnon(glob_flags, DO_UPDATE);
+ 	    } else if (set_priority == 0)
+ 		turnon(msg[x].m_flags, M_PRIORITY(0));
+ 	}
+     if (istool > 1)
+ 	(void) do_hdrs(0, DUBL_NULL, NULL);
      return 0;
  }
*** /tmp/,RCSt1009555	Sun Nov  4 20:02:39 1990
--- makefile.bsd	Sun Oct 21 19:24:52 1990
***************
*** 12,18 ****
        folders.o dates.o loop.o viewopts.o curses.o curs_io.o bind.o \
        lock.o macros.o options.o addrs.o malloc.o glob.o
  
! HELP_FILES= README README-7.0 README-7.1 mush.1 cmd_help \
  	Mushrc Mailrc Gnurc sample.mushrc advanced.mushrc digestify
  
  MAKES= makefile.bsd makefile.xenix makefile.sys.v makefile.hpux makefile.sun
--- 12,18 ----
        folders.o dates.o loop.o viewopts.o curses.o curs_io.o bind.o \
        lock.o macros.o options.o addrs.o malloc.o glob.o
  
! HELP_FILES= README README-7.0 README-7.1 README-7.2 mush.1 cmd_help \
  	Mushrc Mailrc Gnurc sample.mushrc advanced.mushrc digestify
  
  MAKES= makefile.bsd makefile.xenix makefile.sys.v makefile.hpux makefile.sun
*** /tmp/,RCSt1009529	Sun Nov  4 20:02:10 1990
--- mush.1	Sun Nov  4 19:12:50 1990
***************
*** 10,17 ****
  .if n .ds - --
  .if t .ds - \(em
  .nh
! .TH MUSH 1 "Apr 25, 1990" "Version 7.1.0"
! .UC 4
  .SH NAME
  The Mail User's Shell \- Shell for electronic mail.
  .SH SYNOPSIS
--- 10,16 ----
  .if n .ds - --
  .if t .ds - \(em
  .nh
! .TH MUSH 1 "October 31, 1990" "Version 7.2.0"
  .SH NAME
  The Mail User's Shell \- Shell for electronic mail.
  .SH SYNOPSIS
***************
*** 748,754 ****
  also available, but more extensive help is provided in the pop-up menus.
  Press the RIGHT mouse button (the \*Qmenu button\*U) when pointing to any
  panel button and a number of items will appear in a menu.
! The last command in the menu list will often be one labelled \*Qhelp\*U.
  If a button does not have a menu or has no help item, check the
  menu of the \*QHelp\*U button for related topics.
  Selecting any help item will open a new scrollable window with help text.
--- 747,753 ----
  also available, but more extensive help is provided in the pop-up menus.
  Press the RIGHT mouse button (the \*Qmenu button\*U) when pointing to any
  panel button and a number of items will appear in a menu.
! The last command in the menu list will often be one labeled \*Qhelp\*U.
  If a button does not have a menu or has no help item, check the
  menu of the \*QHelp\*U button for related topics.
  Selecting any help item will open a new scrollable window with help text.
***************
*** 1396,1420 ****
  .ta 2i 4i
  .in +4
  .nf
! alias	last-msg	screen-back	
! back-msg	line-mode	screen-next	
! bind	lpr	search-again	
! bind-macro	mail	search-back	
! bottom-page	mail-flags	search-next	
! chdir	map	shell-escape	
! copy	map!	sort	
! copy-list	my-hdrs	sort-reverse	
! delete	next-msg	source	
! delete-list	preserve	top	
! display	quit	top-page	
! display-next	quit!	unbind	
! exit	redraw	undelete	
! exit!	reply	undelete-list	
! first-msg	reply-all	update	
! folder	reverse-video	variable	
! goto-msg	save	version	
! help	save-list	write	
! ignore	saveopts	write-list	
  .fi
  .in -4
  .sp
--- 1395,1419 ----
  .ta 2i 4i
  .in +4
  .nf
! alias	last-msg	saveopts	
! back-msg	line-mode	screen-back	
! bind	lpr	screen-next	
! bind-macro	mail	search-again	
! bottom-page	mail-flags	search-back	
! chdir	map	search-next	
! copy	map!	shell-escape	
! copy-list	mark	sort	
! delete	my-hdrs-msg	sort-reverse	
! delete-list	next	source	
! display	preserve	top	
! display-next	quit	top-page	
! exit	quit!	unbind	
! exit!	redraw	undelete	
! first-msg	reply	undelete-list	
! folder	reply-all	update	
! goto-msg	reverse-video	variable	
! help	save	write	
! ignore	save-list	write-list	
  .fi
  .in -4
  .sp
***************
*** 1547,1552 ****
--- 1546,1554 ----
  ^R
  Toggle reverse video mode (current message is in reverse video).
  .TP
+ *
+ Toggle mark for this message (see the \*Qmark\*U command).
+ .TP
  |
  Send message to printer
  .TP
***************
*** 1555,1561 ****
  Prompts for command; RETURN invokes a shell.
  .TP
  %
! change directory.
  .TP
  (, )
  Source/saveopts.
--- 1557,1563 ----
  Prompts for command; RETURN invokes a shell.
  .TP
  %
! Change directory.
  .TP
  (, )
  Source/saveopts.
***************
*** 1693,1699 ****
  variable below).
  .PP
  At the end of most lists of menu entries for panel items is an item
! labelled \*Qhelp\*U.
  When this item is chosen, an new window is opened where help for that
  command is displayed.
  The help windows can be scrolled in the same ways as the message
--- 1695,1701 ----
  variable below).
  .PP
  At the end of most lists of menu entries for panel items is an item
! labeled \*Qhelp\*U.
  When this item is chosen, an new window is opened where help for that
  command is displayed.
  The help windows can be scrolled in the same ways as the message
***************
*** 1757,1762 ****
--- 1759,1767 ----
  .I "message list"
  as an argument, arguments are noted only when they differ from a message list.
  .TP
+ .B about
+ Gives information about the authors of this wonderful software.
+ .TP
  .BR alias " [name] [address-list]"
  .ns
  .TP
***************
*** 1786,1792 ****
  With one argument, it prints the list associated with that name,
  and with more than one argument, it creates a new alias.
  .TP
! .BR alternates " [host-list] [!path!login] [*[user]]"
  .RB ( alts )
  This command
  is useful if you have accounts on several machines.
--- 1791,1797 ----
  With one argument, it prints the list associated with that name,
  and with more than one argument, it creates a new alias.
  .TP
! .BR alternates " [host-list] [!path!login] [user@host] [*[user]]"
  .RB ( alts )
  This command
  is useful if you have accounts on several machines.
***************
*** 1806,1830 ****
  matched instead of your login name.
  .sp
  If you have another login name on the local or remote machine, then
! that login may be specified by preceding the login name or the path
! to the login name by a `!' character.
  .sp
  For example,
  .sp
  .nf
  .ti +2
! alts zipcode maui1 !cory.berkeley.edu!dheller !root
  .fi
  .sp
! are all either hostnames or pathnames to my other accounts.
! The last item, \*Q!root\*U will match root that is only destined for my
! workstation.
! Root accounts elsewhere are not considered to be me.
  .sp
  If the
  .B alternates
  command is given with no arguments, the current set of alternate
  names is displayed.
  .TP
  .BR await " [\-T timeout]"
  Directs the shell to wait for the arrival of new mail.
--- 1811,1854 ----
  matched instead of your login name.
  .sp
  If you have another login name on the local or remote machine, then
! that login may be specified either as \*Quser@machine\*U or
! by preceding the login name or a UUCP path to the login name by a `!'
! character.
  .sp
  For example,
  .sp
  .nf
  .ti +2
! alts zipcode maui1 dheller@cory.berkeley.edu !root
  .fi
  .sp
! are all either hostnames or pathnames to accounts owned by the same user.
! The last item, \*Q!root\*U will match mail to \*Qroot\*U only if it is
! destined for the local machine, e.g. a workstation.
! Root accounts elsewhere are not considered to be equivalent.
! The address \*Qdheller@cory.berkeley.edu\*U indicates that at the machine
! \*Qcory.berkeley.edu\*U the user \*Qdheller\*U is the same person as the
! current user at the local machine.
! This could also have been specified in UUCP format:
  .sp
+ .nf
+ .ti +2
+ alts !cory.berkeley.edu!dheller
+ .fi
+ .sp
+ The leading `!' character is required to differentiate paths ending in a
+ login name from those to which the user's login name should be appended.
+ .sp
  If the
  .B alternates
  command is given with no arguments, the current set of alternate
  names is displayed.
+ Names entered in \*Quser@machine\*U form are displayed in UUCP format.
+ Note that
+ .B alternates
+ is not cumulative; any arguments given to the
+ .B alternates
+ command will remove the current list and replace it.
  .TP
  .BR await " [\-T timeout]"
  Directs the shell to wait for the arrival of new mail.
***************
*** 2583,2589 ****
  .B unmap!
  command.
  .TP
! .BR merge " [-N] folder-name"
  Messages from the named folder are read into the current folder.
  The header summaries of the merged messages are printed unless the \-N
  option is given (see the
--- 2607,2656 ----
  .B unmap!
  command.
  .TP
! .BR mark " [\-[A|B|C|D|E]]"
! .ns
! .TP
! .B unmark
! This command places a tag on messages that you wish to reference later.
! If no argument or a msg_list only is given, the mark is temporary and will
! not be saved when the folder is updated.  
! The command "headers \-H:m" (abbreviated as ":m") can be used to
! generate the list of messages so marked.
! Messages may also be assigned priority starting with A having the highest
! priority through E.
! Message priorities are saved when the folder is updated.
! The command:
! .sp
! .ti +4
! mark -C 7
! .sp
! assigns priority C to message 7.  You can clear the priority of a message
! by specifying a lone `\-' argument:
! .sp
! .ti +4
! mark -
! .sp
! This does not unmark a message.  The command,
! .B unmark
! is used for that.
! Priorities and marks may also be cleared when a status is assigned by the
! .B flags
! command.
! .sp
! The
! .B sort
! and 
! .B pick
! commands can then be used to order or select messages based on their
! priorities.  Messages may have both a temporary mark and a priority,
! but may not have more than one priority.  Priorities are shown by the
! appropriate letter code immediately following the message number in
! the header display.
! The presence of a temporary mark is shown by a `+' character.
! Temporary marks are considered to have the highest priority for sorting and
! are shown in place of the regular priority if both are set on a given message.
! .TP
! .BR merge " [\-N] folder-name"
  Messages from the named folder are read into the current folder.
  The header summaries of the merged messages are printed unless the \-N
  option is given (see the
***************
*** 2674,2679 ****
--- 2741,2747 ----
  \-f	search for pattern in \*QFrom\*U field only.
  \-h header	search for pattern in specified header only.
  \-i	ignore case of letters when searching.
+ \-p priority	select messages with the given priority (A, B, C, ...)
  \-r msg-list	search only the listed messages.
  \-s	search for pattern in \*QSubject\*U field only.
  \-t	search for pattern in \*QTo\*U field only.
***************
*** 2685,2693 ****
  .I \-ago
  option can be abbreviated as
  .IR \-a .
! Only one of \-a, \-d, \-f, \-h, \-s and \-t can be specified at once.
  Entire messages are scanned for the <pattern>
! unless \-a, \-d, \-f, \-h, \-s or \-t is specified.
  Messages marked for deletion are also searched.
  No patterns can be specified with the \-a or \-d options.
  The \-x option may not be used in conjunction with
--- 2753,2762 ----
  .I \-ago
  option can be abbreviated as
  .IR \-a .
! Only one of \-a, \-d, \-f, \-h, \-p, \-s and \-t can be specified at once,
! but multiple \-p options may be specified to select several priorities.
  Entire messages are scanned for the <pattern>
! unless \-a, \-d, \-f, \-h, \-p, \-s or \-t is specified.
  Messages marked for deletion are also searched.
  No patterns can be specified with the \-a or \-d options.
  The \-x option may not be used in conjunction with
***************
*** 3138,3144 ****
  .B home
  variable descriptions for more information.
  .TP
! .BR sort " [\-i] [[\-r] \-a | \-d | \-l | \-R | \-s | \-S]"
  This command will sort messages according to author, date, status or subject
  (with or without considering the \*QRe: \*U, in replied messages).
  In addition, the messages can be sorted in reverse order (same arguments).
--- 3207,3213 ----
  .B home
  variable descriptions for more information.
  .TP
! .BR sort " [\-i] [[\-r] \-a | \-d | \-l | \-p | \-R | \-s | \-S]"
  This command will sort messages according to author, date, status or subject
  (with or without considering the \*QRe: \*U, in replied messages).
  In addition, the messages can be sorted in reverse order (same arguments).
***************
*** 3152,3157 ****
--- 3221,3227 ----
  \-a	sort by author (alphabetical)
  \-d	sort by date
  \-l	sort by length of message
+ \-p	sort by message priority
  \-R	sort by subject including \*QRe:\*U
  \-s	sort by subject (alphabetical)
  \-S	sort by message status
***************
*** 3164,3171 ****
--- 3234,3249 ----
  .IR status .
  New, unread messages are first, followed by preserved messages,
  and finally deleted messages are placed at the end of the list.
+ If status is otherwise the same, priority is used to order the messages.
  If \-r is the only option given, the status ordering is reversed.
  .sp
+ Sorting by priority orders marked messages first, followed by messages
+ priority setting (A having higher precedence than B, and so on), and
+ finally messages having neither a mark nor a priority.
+ See the
+ .B mark
+ command for information on attaching marks and priorities to messages.
+ .sp
  When sorting by date, the boolean variable
  .B date_received
  is checked.  If it is set, then sorting goes by date received.
***************
*** 3713,3722 ****
  for a directory when the
  .B cd
  command is issued.
! If this variable is used, it is recommended that the path `.' be included.
! Note that this differs from the
! .IR csh ,
! which does not require that `.' be present.
  .TP
  .B cmd_help
  (String)
--- 3791,3798 ----
  for a directory when the
  .B cd
  command is issued.
! The current directory is always checked before any directory in 
! .BR cdpath .
  .TP
  .B cmd_help
  (String)
***************
*** 3771,3776 ****
--- 3847,3862 ----
  Completion is not possible if the \-e (\-echo) flag was given, and
  is currently not available in tool mode.
  .TP
+ .B compose_icon
+ (String)
+ Set to a pathname for an alternate icon pixmap to use when the
+ .I Mush
+ message composition window is closed.
+ If this variable is set but does not have a value, a default icon is used.
+ If this variable is not set, the composition window will be hidden when it
+ is not open, and no icon will appear.
+ The \*QCompose\*U button is used to re-open the window in this case.
+ .TP
  .B crt
  (Numeric)
  Set to a value that describes the number of lines a message
***************
*** 4285,4290 ****
--- 4371,4381 ----
  The default is the 12 hour format, but can be
  reset to use the 24 hour format by setting this variable.
  .TP
+ .B msg_win
+ (Numeric)
+ Set to the height (in lines) of the message composition (editing) window in
+ tool mode.
+ .TP
  .B newline
  (Boolean/string)
  If set, carriage returns are ignored.
***************
*** 4504,4509 ****
--- 4595,4623 ----
  \\t	a tab
  .fi
  .in -2
+ .sp
+ To include the values of variables in the prompt string, the format
+ \*Q%$variable\*U can be used, where
+ .I variable
+ is the name of any variable.
+ If the `$' character is
+ .I not
+ preceded by a `%', it will be included literally,
+ rather than introducing a variable name.
+ Thus, two equivalent ways of including the name of the current folder
+ in your prompt are:
+ .nf
+ .in +4
+ set prompt = '%F> '
+ set prompt = '%$thisfolder> '
+ .in -4
+ .fi
+ .sp
+ Note the use of single quotes to prevent the value of
+ .B thisfolder
+ from being expanded at the time the prompt is set.
+ The only difference between these settings is that \*Q%F\*U will add the
+ string \*Q[read-only]\*U if the folder was loaded in read-only mode.
  .TP
  .B quiet
  (Boolean/Multivalued)
***************
*** 5753,5759 ****
  .PP
  Version 6.5.6 was the last version designed to run under SunWindows, and is
  therefore the most recent version that will function under SunOS 2.x.
! The current version, 7.0, has been ported to SunView, and may have
  a completely new set of problems in addition to those described below.
  Also, some of those described below may have been eliminated, and remain
  in this discussion only for completeness.
--- 5867,5873 ----
  .PP
  Version 6.5.6 was the last version designed to run under SunWindows, and is
  therefore the most recent version that will function under SunOS 2.x.
! Starting with version, 7.x, interface used is SunView, and may have
  a completely new set of problems in addition to those described below.
  Also, some of those described below may have been eliminated, and remain
  in this discussion only for completeness.
***************
*** 5775,5784 ****
  your Sun Workstation has.  From time to time, it works, but when it
  doesn't, it seems to be related to other user or system definable
  dot-files or whatever.
- This of course means that the function keys are relatively untested
- in conjunction with SunView (SunOS later than 3.3).
- The default function key bindings have been eliminated
- to avoid collisions with SunView window system functions.
  .PP
  Changing the value of the
  .BR screen_win ,
--- 5889,5894 ----
***************
*** 5789,5800 ****
  .PP
  When using
  .B vi
! in the tool mode, the window is periodically one
! line \*Qshort.\*U
! That is, scrolling is off by one line and you have
! to redraw the window (using \*Qz.\*U in vi) to get it in sync again.
! This problem remains in most SunView implementations, but does not
! seem to appear with the current default composition window size.
  .PP
  When running on full filesystems,
  .I Mush
--- 5899,5913 ----
  .PP
  When using
  .B vi
! in the tool mode, the window is periodically one or more
! lines \*Qshort.\*U
! That is, scrolling is off by one line and you have to redraw the
! window (using \*Qz.\*U in vi) to get it in sync again.  The problem
! is caused by the window having less than 24 lines in the window.
! Having the tty subwindow be
! .I exactly
! 24 lines usually eliminates the problem.  This is a bug with SunView
! and will not be fixed since Sun will no longer support it.
  .PP
  When running on full filesystems,
  .I Mush
***************
*** 5807,5812 ****
--- 5920,5932 ----
  .B tmpdir
  in the initialization file to be a writable place in a filesystem that
  has enough disk space.
+ Note: some systems' setcwd() system call writes temporary information in
+ /tmp and this cannot be overridden.  You may get error messages such as
+ "file system full" even if your
+ .B tmpdir
+ variable is set to a directory in a partition other than that of /tmp.
+ There is nothing to be concerned about; chance are that you changed
+ directories and the setcwd() sysetm call can't write to its temp file.
  .PP
  Most of the other known and documented bugs
  are in the supplied README files accompanying the source.

ronald@robobar.co.uk (Ronald S H Khoo) (11/06/90)

schaefer@ogicse.cse.ogi.edu (Barton E. Schaefer) writes:

>+ 	Using "pick" with no arguments
>+ 	to repeat the last pattern search is no longer supported.

Arrrrggghhhhhhhhhh......  Sob, cry, where's my hanky ?

-- 
ronald@robobar.co.uk +44 81 991 1142 (O) +44 71 229 7741 (H)

schaefer@ogicse.ogi.edu (Barton E. Schaefer) (11/06/90)

In article <1990Nov5.221435.23662@robobar.co.uk> ronald@robobar.co.uk (Ronald S H Khoo) writes:
} schaefer@ogicse.cse.ogi.edu (Barton E. Schaefer) writes:
} 
} >+ 	Using "pick" with no arguments
} >+ 	to repeat the last pattern search is no longer supported.
} 
} Arrrrggghhhhhhhhhh......  Sob, cry, where's my hanky ?

cmd hanky '\!?pick'		# :-)

If you ever happen to notice the obscure bug in the cmd mechanism that
the above cmd tickles, rest assured that I know about it and give the
command again.  It works the second time. :-}
-- 
Bart Schaefer						schaefer@cse.ogi.edu
ZipCode Software Corporation				schaefer@zipcode.com

ronald@robobar.co.uk (Ronald S H Khoo) (11/07/90)

 schaefer@ogicse.ogi.edu (Barton E. Schaefer) writes:

> cmd hanky '\!?pick'		# :-)

Sniff, thanks...  <wipes nose> but I'll still have to change my habits.
Problem is that I use "curses mode" and like to check that my
complicated pick pattern is right by doing ":pick <complicated pattern>",
then after letting the stuff flow past (yes, it's a memory mapped screen)
I say ":pick | whatever".  I suppose it's not difficult to pop into line
mode to do this, but it'll be a while before it comes naturally ....

As a matter of interest, why does the :escape command not get put in the
history in the first place ?  Historical reasons ? [ pun intended :-) ]

Thanks for the hanky anyway :-)
-- 
ronald@robobar.co.uk +44 81 991 1142 (O) +44 71 229 7741 (H)

argv@turnpike.Eng.Sun.COM (Dan Heller) (11/09/90)

In article <1990Nov6.171917.5035@robobar.co.uk> ronald@robobar.co.uk (Ronald S H Khoo) writes:
> Problem is that I use "curses mode" and like to check that my
> complicated pick pattern is right by doing ":pick <complicated pattern>",
> then after letting the stuff flow past (yes, it's a memory mapped screen)
> I say ":pick | whatever".

You should do (and should have done)
:whatever $output
    or
:$output | whatever
(depending on "whatever" is).

Why redo the entire pick when $output already has the message list.

--
dan
----------------------------------------------------
O'Reilly && Associates   argv@sun.com / argv@ora.com
Opinions expressed reflect those of the author only.