Thread View: comp.mail.mush
1 messages
1 total messages
Started by Bela Lubkin
Mon, 31 Aug 1992 20:51
Re: filtering the response
Author: Bela Lubkin
Date: Mon, 31 Aug 1992 20:51
Date: Mon, 31 Aug 1992 20:51
44 lines
2002 bytes
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<
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads