home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / mail / mush / 320 < prev    next >
Encoding:
Text File  |  1992-08-31  |  1.9 KB  |  55 lines

  1. Newsgroups: comp.mail.mush
  2. Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!haven.umd.edu!darwin.sura.net!gatech!bloom-beacon!INTERNET!dont-send-mail-to-path-lines
  3. From: belal@sco.COM (Bela Lubkin)
  4. Subject: Re: filtering the response
  5. Message-ID: <9208311351.aa27805@scoke.sco.COM>
  6. Sender: daemon@athena.mit.edu (Mr Background)
  7. Organization: The Internet
  8. Date: Mon, 31 Aug 1992 20:51:43 GMT
  9. Lines: 44
  10.  
  11. Robert Brown asked about pre-filtering included messages before replying
  12. to them.  Here's one possible solution.  Note that I haven't implemented
  13. it myself, but that his question addresses something that's been
  14. bothering me for a long time.
  15.  
  16. I have a command alias:
  17.  
  18.   cmd rv reply -eI
  19.  
  20. which I use to reply to messages.  It automatically includes the
  21. original message and throws me into my editor (vi, thus the mnemonic
  22. "rv").
  23.  
  24. Suppose I changed the indent_str to something uniquely identifiable.  I
  25. could then change my editor string to name a script which would first
  26. edit each line starting with the indent_str, then edit the results with
  27. vi.  The edit would consist of removing the unique indent_str,
  28. de-tabbing the line, then prefixing the *real* indent_str that I intend
  29. to use.
  30.  
  31. (If you do something like this, I also highly recommend setting
  32. "edit_hdrs" so that you can edit your headers in the same editor
  33. session).
  34.  
  35. You might also want to use a specific editor script only for replies,
  36. not other commands.  So:
  37.  
  38.   cmd rv 'set edsave=$editor; set editor="$HOME/bin/mush_reply";
  39.           reply -eI; set editor=$edsave'
  40.   set edit_hdrs indent_str="UnIqUePrEfIx--"
  41.  
  42. bin/mush_reply:
  43.  
  44.   sed '/^UnIqUePrEfIx--/s/^..............//; detab; s/^/> /' $1 >/tmp/$$.mr
  45.   mv /tmp/$$.mr $1
  46.   exec vi $1
  47.  
  48. "detab" is, of course, not a sed command; and none of this has been
  49. tested; and you'll probably want to write a C program to actually do
  50. what my sed pseudo-code pretends to do.
  51.  
  52. And if you do, please post the results.  I'd like to use it...
  53.  
  54. >Bela<
  55.