Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!nrl-cmf!ames!pasteur!ucbvax!decwrl!hplabs!hpda!hpsemc!bd
From: bd@hpsemc.HP.COM (bob desinger)
Newsgroups: comp.sys.hp
Subject: Re: GNUemacs and HP2392
Message-ID: <1250005@hpsemc.HP.COM>
Date: 11 May 88 00:55:14 GMT
References: <4698@batcomputer.tn.cornell.edu>
Organization: HP Technology Access Center, Cupertino, CA
Lines: 173

Rohit Aggarwal (rohit@hpindda.HP.COM) writes:
> 	In the same area does anyone have a terminal-emulator for
> 	hp2392 that works in gnumacs?

I'm not sure what you mean.  Do you mean "can someone please tell me
how to work the M-x shell command?"  If so, I found that `M-x shell'
finally worked under 18.50 but not on previous versions of Gnu Emacs.

To answer the original question, I have in my .emacs file a line of:
	
	(load "local/hp")		; DWIM with C-h and DEL

In /usr/local/emacs/lisp/local/hp.el, we have the file below.  Unwrap
according to the directions, install in the right place, and your
keypad editing keys will all work.  (You'll also have Backspace mapped
to DEL and vice-versa, at a level lower than Emacs knows about it.)
This doesn't know about function-keys, however, unlike the previous
posting.

Oh, yes, the file contains control characters so it's uuencoded.
The format below is compatible with uudecode, but you won't need
it to unpack this.

-- bd

#! /bin/sh
# This is a shell archive.  Remove anything before this line,
# then unwrap it by saving it in a file and typing "sh file".
#
# Wrapped by bd at hpsemc on Tue May 10 17:51:09 1988
# Contents:
#	hp.el 	

PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:$PATH; export PATH
echo 'At the end, you should see the message "End of shell archive."'


echo Compiling the unpacker for files containing control characters
pwd=`pwd`; cd /tmp
cat >unpack$$.c <<'E*O*F'
#include 
#define DEC(c)	(((c) - ' ') & 077)
main()
{
	int n;
	char dest[128], a,b,c,d;

	scanf("begin %o ", &n);
	gets(dest);

	if (freopen(dest, "w", stdout) == NULL) {
		perror(dest);
		exit(1);
	}

	while ((n=getchar()) != EOF && (n=DEC(n)) != 0)  {
		while (n>0) {
			a = DEC(getchar());
			b = DEC(getchar());
			c = DEC(getchar());
			d = DEC(getchar());
			if (n-- > 0) putchar(a << 2 | b >> 4);
			if (n-- > 0) putchar(b << 4 | c >> 2);
			if (n-- > 0) putchar(c << 6 | d);
		}
		n=getchar();
	}
	exit(0);
}
E*O*F
cc -o unpack$$ unpack$$.c && rm unpack$$.c
cd $pwd

echo Extracting hp.el '[contains control characters]'
/tmp/unpack$$ <<'@eof'
begin 664 hp.el
M.SL[('1E7)I9VAT("A#*2 Q.3@U+" Q.3@V+" Q.3@W($9R964@4V]F
M='=A2!W87)R86YT>2X@($YO(&%U=&AO6]N92!F;W(@=&AE
M(&-O;G-E<75E;F-E6]N92!I2P@;6]D:69Y(&%N
M9"!R961I2!U;F1E6EN9R!P97)M:7-S:6]N(&YO=&EC92(N(" @06X@97AA
M8W0@8V]P>0H[.R!O9B!T:&4@9&]C=6UE;G0@:7,@6]U(&UA>2!R961I2"!A2!E2!F=6YC=&EO;BUK97EM87 @
M(D$B("=I;G-E6UA<" B1"(@)V1E;&5T92UC:&%R*0HH9&5F:6YE+6ME>2!F=6YC
M=&EO;BUK97EM87 @(D4B("=K:6QL+6QI;F4I"BAD969I;F4M:V5Y(&9U;F-T
M:6]N+6ME>6UA<" B1B(@)W-C2!F=6YC=&EO;BUK97EM87 @(DDB("=O=F5R=W)I=&4M;6]D92D**&1E
M9FEN92UK97D@9G5N8W1I;VXM:V5Y;6%P("),(B G9&5L971E+6QI;F4I"BAD
M969I;F4M:V5Y(&9U;F-T:6]N+6ME>6UA<" B4B(@)W-C2UL
M:6YE7,@9F]R
M(&-U7,I( IR
 
end
@eof

set `wc -lwc