🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.mush
Article #335

Re: filtering the response

#335
From: Bela Lubkin
Date: Mon, 31 Aug 1992 20:51
44 lines
2002 bytes
Robert Brown asked about pre-filtering included messages before replying
to them.  Here's one possible solution.  Note that I haven't implemented
it myself, but that his question addresses something that's been
bothering me for a long time.

I have a command alias:

  cmd rv reply -eI

which I use to reply to messages.  It automatically includes the
original message and throws me into my editor (vi, thus the mnemonic
"rv").

Suppose I changed the indent_str to something uniquely identifiable.  I
could then change my editor string to name a script which would first
edit each line starting with the indent_str, then edit the results with
vi.  The edit would consist of removing the unique indent_str,
de-tabbing the line, then prefixing the *real* indent_str that I intend
to use.

(If you do something like this, I also highly recommend setting
"edit_hdrs" so that you can edit your headers in the same editor
session).

You might also want to use a specific editor script only for replies,
not other commands.  So:

  cmd rv 'set edsave=$editor; set editor="$HOME/bin/mush_reply";
          reply -eI; set editor=$edsave'
  set edit_hdrs indent_str="UnIqUePrEfIx--"

bin/mush_reply:

  sed '/^UnIqUePrEfIx--/s/^..............//; detab; s/^/> /' $1 >/tmp/$$.mr
  mv /tmp/$$.mr $1
  exec vi $1

"detab" is, of course, not a sed command; and none of this has been
tested; and you'll probably want to write a C program to actually do
what my sed pseudo-code pretends to do.

And if you do, please post the results.  I'd like to use it...

>Bela<
Technical Details
Message-ID: <9208311351.aa27805@scoke.sco.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!ames!haven.umd.edu!darwin.sura.net!gatech!bloom-beacon!INTERNET!dont-send-mail-to-path-lines

Show Full Headers
Complete Article Headers
Newsgroups: comp.mail.mush
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!ames!haven.umd.edu!darwin.sura.net!gatech!bloom-beacon!INTERNET!dont-send-mail-to-path-lines
From: belal@sco.COM (Bela Lubkin)
Subject: Re: filtering the response
Message-ID: <9208311351.aa27805@scoke.sco.COM>
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
Date: Mon, 31 Aug 1992 20:51:43 GMT
Lines: 44