🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #3821

nn macro-mania; Help!

#3821
From: Sudarshan S. Chawathe
Date: Mon, 01 Mar 1993 03:31
56 lines
2560 bytes
Aim: to be able to type a single key to see a postcript file included in
an article on screen using ghostview (and similarly for printing it).

( If someone already has some nifty macros for this, and could mail them
to me, I'd be most greatful, though at some point I would also like to
know what's happening with my macros...)

I have the foll macro defined in my init file:

# Print a Postcript file directly (stripping leading junk)
map show T (
	:set printer pstailview
	:print input
# The foll doesn't work!
#	:set printer "enscript -Ppalm2 -hG"
)

Problem 1:
If I uncomment the second :set command, nn complains with "Error in
macro 106"  I can't figure why.

Problem 2:
pstailview is a simple shell script (see below) that strips leading
junk from a postcript file present in its stdin and forward the result
to ghostview for displaying.   That works fine BUT if I try running
ghostview in the background, nn complains saying "command didn't read
complete article" and ghostview doesn't display anything either.

Problem 3:
If I replace pstailview with pstailpr, which is the same shell script as
before with lpr instead of ghostview at the end of the pipe, nn
complains with "command didn't read...", "exit status XXX" and nothing
gets printed either.

Here are the files in my bin that I'm using:

pstailview:
#!/bin/sh
/u/chaw/bin/getpstail | ghostview - 
# doesn't work if I put an & here------^

pstailpr:
#!/bin/sh
/u/chaw/bin/getpstail | lpr -Ppalm2 -h
# doesn't work at all

getpstail:
sed -e '/^%!/,$!d'


Help!  Thanks,

-Chaw

_________________________________________________________________________
Chaw@cs.Stanford.edu                                         tat tvam asi
Technical Details
Message-ID: <chaw.730956666@Pluto.Stanford.EDU>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!sparky!uunet!enterpoop.mit.edu!stanford.edu!CSD-NewsHost.Stanford.EDU!Pluto.Stanford.EDU!chaw

Show Full Headers
Complete Article Headers
Message-ID: <chaw.730956666@Pluto.Stanford.EDU>
Subject: nn macro-mania; Help!
Date: Mon, 01 Mar 1993 03:31:06 +0000
From: Chaw@cs.Stanford.edu (Sudarshan S. Chawathe)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!sparky!uunet!enterpoop.mit.edu!stanford.edu!CSD-NewsHost.Stanford.EDU!Pluto.Stanford.EDU!chaw
Newsgroups: news.software.nn
Originator: chaw@Pluto.Stanford.EDU
X-Disclaimer: Blame it on the cat.
Keywords: nn macro help
Sender: news@CSD-NewsHost.Stanford.EDU
Reply-To: Chaw@cs.Stanford.edu (Sudarshan S. Chawathe)
Fcc: log/outgoing
Organization: CS Department, Stanford University, California, USA
Lines: 57