🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #953

Re: :w invalidates posting?

#953
From: Rob Lemley
Date: Fri, 28 Sep 1990 18:57
26 lines
1861 bytes
In <1990Sep27.153936.8403@ux1.cso.uiuc.edu> gordon@osiris.cso.uiuc.edu (John Gordon) writes:

>	Several times I have been (f)ollowing up to an article, or (w)riting
>a letter to the author of an article, and I do a :w from vi to save the text,
>and when I finish, nn gives me a "message not sent" message when i ZZ the
>letter and hit 's' and <Enter>.

I have had similar problems with vi when it is forked from another process.
Apparently vi sends non-zero status codes back to the invoking program
frequently.  I often hit interrupt (control-c) in vi to cancel commands
and this also seems to get passed back to the calling program.  From a
casual check of the nn source, it appears that non-zero exit status from
the editor will cause the send or post to not be sent.
I have implemented a shell script which I use to get around the problem.
I put the script in my $HOME/bin, put $HOME/bin first in my PATH, and set
all of my editor environment variable to $HOME/bin/vi (EDITOR, VISUAL, etc.).
Here it is:

--------------------- Cut Here --------------------------------------------
:
#
# vi -- execute vi and always return 0
#
trap "trap '' 2" 2	# ignore interrupts during vi
/usr/bin/vi ${1+"$@"}
exit 0
Technical Details
Message-ID: <1719@b15.INGR.COM>
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!gmdzi!unido!mcsun!uunet!ingr!
References: <1990Sep27.153936.8403@ux1.cso.uiuc.edu>

Show Full Headers
Complete Article Headers
Message-ID: <1719@b15.INGR.COM>
Subject: Re: :w invalidates posting?
Date: Fri, 28 Sep 1990 18:57:05 +0000
From: rcl@b15.INGR.COM (Rob Lemley)
References: <1990Sep27.153936.8403@ux1.cso.uiuc.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!gmdzi!unido!mcsun!uunet!ingr!
Newsgroups: news.software.nn
Keywords: nn,vi
Distribution: news.software.nn
Organization: Intergraph Huntsville
Lines: 26
Posted: Fri Sep 28 19:57:05 1990
Th: b15!rcl