jerry@ORA.ORA.COM (Jerry Peek) (02/04/91)
In message <9102022126.AA04152@MURRAY.CS.NYU.EDU>, Konstantin Laufer wrote: > Could somebody suggest what to put in the file forwcomps in order to reuse > automatically the subject of the original message? I was thinking of using > the operations typically used in the file replcomps. ... It appears that forw > doesn't use forwcomps the same way as repl uses replcomps. It's true that "forw" just copies the forwcomps file into the draft message... it doesn't pay attention to mh-format strings that way that "repl" does. You can use "forw -format" or "forw -filter file" to change the body (the message you're forwarding), but that won't change the header of the forwarded message. You can do it with "repl", though. First, make a file named myforwcomps (or any name) with these five lines (don't indent them): To: Cc: %<{subject}Subject: %{subject}\n%>\ Reply-To: laufer@cs.nyu.edu -------- Next, make a file named myforwfilt with these ten lines (not indented): ; filter file for "myforw" version of "repl" : :----- Forwarded Message : extras:nocomponent : body:nocomponent : :----- End of Forwarded Message : Then, put this line in your .mh_profile: myforw: -forw myforwcomps -filter myforwfilt And in your bin directory, made a symbolic link to "repl" named "myforw". If you use the C-shell, you should re-set the shell's hash table too: % ln -s /usr/local/mh/repl myforw % rehash To forward a message, type the command: % myforw It's not perfect -- for instance, it can only forward one message at a time while the real "forw" can forward a lot of messages -- but it works. (BTW, Chapter 9 of the Nutshell MH & xmh book has lots of examples like this.) --Jerry Peek, jerry@ora.com