sam-fans - fans of the sam editor
 help / color / mirror / Atom feed
From: shopiro@disney.etcore.ml.com (Jonathan Shopiro)
To: arnold@cc.gatech.edu
Cc: sam-fans@hawkwind.utcs.toronto.edu
Subject: Re: sam and varios mail programs
Date: Thu, 8 Dec 1994 02:55:49 -0500	[thread overview]
Message-ID: <9412081755.AA03140@belfast.ml.com> (raw)

I use mailx with sam as my editor.  I only have one instance of sam on
my workstation.  It works like this:

I invoke mailx with the following command:

	crt=50 PAGER=Bcat VISUAL=BB mailx

"crt=50" means if it's longer than 50 lines run it through the pager.

"PAGER=Bcat" means use Bcat (a shell script; see below) to display long messages.

"VISUAL=BB" means use BB (ditto) as the message editor

Then when I try to read a long message it appears in sam.  When I
compose a message I can type "~v" and the message so far appears in
sam.  I edit it until its perfect, select write, and go back to the
mailx window where I hit return and then send it.  It's a mess, really,
but it beats mailtool and textedit (no characterization sufficiently
derogatory).

Now for my question: has anybody gotten <exch> to work reliably with
sam and 9term under Solaris?  It seems to work for a while after
rebooting but then it doesn't work anymore.  I poked through the code
to some X function about swapping selections and then I gave up.  Also,
is it supposed to work to snarf in one 9term window and paste (the
snarfed text) into another?  That never works for me.

		-- Jonathan Shopiro
		   Merrill Lynch & Co.


Here are the shell scripts (simple modifications of B, both of them):

Bcat:
	#!/bin/sh
	
	file=$HOME/tmp/Bcat$$
	files=$file
	line="none"
	
	if [ $# != 0 ]; then
		echo 'usage: Bcat'  1>&2
		exit 1
	fi
	
	dir=`/bin/pwd`
	if [ "$USER" = "" ]; then
		USER=$LOGNAME
	fi
	pipe=/tmp/.sam.$USER
	
	if [ $DISPLAY != "" ]; then
		pipe=$pipe.$DISPLAY
	fi
	
	if [ ! -r $pipe ]; then
		echo `basename $0`": No pipe \""$pipe"\" to sam." 1>&2
		exit 1
	fi
	
	cat - >$file
	
	echo "B $files" >> $pipe
	if [ $line != "none" ]; then
		echo $line >> $pipe
	fi
	
	read dummy

BB:
	#!/bin/sh
	
	files=
	line="none"
	
	if [ $# = 0 ]; then
		echo 'usage: BB [-nnnn] files...'  1>&2
		exit 1
	fi
	
	dir=`/bin/pwd`
	if [ "$USER" = "" ]; then
		USER=$LOGNAME
	fi
	pipe=/tmp/.sam.$USER
	
	if [ $DISPLAY != "" ]; then
		pipe=$pipe.$DISPLAY
	fi
	
	if [ ! -r $pipe ]; then
		echo `basename $0`": No pipe \""$pipe"\" to sam." 1>&2
		exit 1
	fi
	
	for i in $*
	do
		case "$i" in
			/*)	files="$files $i"
				;;
			-*)	line=`echo $i | sed 's/.//'`
				;;
			*)	files="$files $dir/$i"
				;;
		esac
	done
	
	echo "B $files" >> $pipe
	if [ $line != "none" ]; then
		echo $line >> $pipe
	fi
	
	read dummy




             reply	other threads:[~1994-12-08 18:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-12-08  7:55 Jonathan Shopiro [this message]
1994-12-08 16:35 Arnold Robbins
1994-12-08 16:50 Rich Salz
1994-12-08 16:56 Arnold Robbins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9412081755.AA03140@belfast.ml.com \
    --to=shopiro@disney.etcore.ml.com \
    --cc=arnold@cc.gatech.edu \
    --cc=sam-fans@hawkwind.utcs.toronto.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).