Article View: comp.mail.mush
Article #22Re: tilde escapes if edit_headers set
From: Bart Schaefer
Date: Sat, 08 Aug 1992 07:01
Date: Sat, 08 Aug 1992 07:01
36 lines
1908 bytes
1908 bytes
On Aug 6, 2:36pm, Arnold Robbins wrote:
} Subject: tilde escapes if edit_headers set
}
} Could someone explain (preferably in the news group) if it's a bug or
} feature that ~c to add someone to the Cc: list won't work if edit_hdrs
} is set?
It's a "feature" of the way edit_hdrs is implemented. When edit_hdrs
is off, the addresses are stored entirely in core and are never placed
in the "file" until the rest of the headers are added at send time.
When edit_hdrs is on, exactly the reverse happens: the addresses are
stored only in the file, and are never read into core until all the
headers are checked, again at send time. Doing it any other way
requires a complete rewrite of the file every time the in-core copy
of the addresses has changed when you want to either send or to go
back into the editor.
Here's a shell script that prompts for Cc: and rewrites the file. You
can then add to .mushrc something like
if $?edit_hdrs
map! '~c' '~e cc_ed'
endif
---------------------------------------------------------------------------
:
echo -n 'Cc: ' # BSD
# echo 'Cc: \c' # SYSV
read line
sed -e '1,/^$/'"s/^Cc: /Cc: $line, /" < $1 > /tmp/$$
mv /tmp/$$ $1
---------------------------------------------------------------------------
--
Bart Schaefer schaefer@zigzag.z-code.com
Z-Code Software Corp. schaefer@z-code.com
Technical Details
Message-ID:
<9208080701.AA16317@zigzag.zipcode.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!usc!snorkelwacker.mit.edu!bloom-beacon!INTERNET!dont-send-mail-to-path-linesShow Full Headers
Complete Article Headers
Newsgroups: comp.mail.mush Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!usc!snorkelwacker.mit.edu!bloom-beacon!INTERNET!dont-send-mail-to-path-lines From: bart@zigzag.z-code.COM (Bart Schaefer) Subject: Re: tilde escapes if edit_headers set Message-ID: <9208080701.AA16317@zigzag.zipcode.com> Sender: daemon@athena.mit.edu (Mr Background) Reply-To: bart@zigzag.z-code.com Organization: The Internet Date: Sat, 8 Aug 1992 07:01:02 GMT Lines: 36