Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!think!linus!philabs!philmtl!ray From: ray@philmtl.philips.ca (Ray Dunn) Newsgroups: news.newusers.questions Subject: Re: Dealing with "Followup-To:" in RN Message-ID: <992@philmtl.philips.ca> Date: 5 Feb 90 20:30:04 GMT References: <1990Feb3.222514.435@athena.mit.edu> Organization: Philips Electronics Ltd. Product Group PC. Montreal. Lines: 90 In referenced article, wdstarr@athena.mit.edu (William December Starr) writes: >...article that didn't have Followup-To lines in them, I'd wind up with >something like > > Newsgroups: ---- misc.legal ---- misc.legal > >which seems to indicate, against all reason, that the %F value is >simultaneously (a) not null, (b) eyeball-visibly identical to %C and >(c) not really identical to %C. Rather than try to believe six >impossible things before breakfast, I've defaulted to assuming that I >don't really know what the heck I'm doing. Can anybody help? This anamoly is due to the fact that you cannot have a variable expanded in a "pattern" field in the rn stuff. If you are using emacs, you might like to try the following: Define the following in your .login file: setenv NEWSHEADER 'Newsgroups: %(%F=^$?%C:%F)\ Subject: %(%S=^$?%"\n\nSubject: ":Re: %S)\ %(%R=^$?:References: %R\n)%(%D=^$?:Distribution: %D\ )Organization: %o\n\ %(%`expr "%F" = "%n"`=1?:{warn_ray_newsgroups}%n\n)' setenv MAILHEADER 'To: %t\nSubject: %(%i=^$?:Re: %S\ Newsgroups: %n\nIn-Reply-To: %i)\ Organization: %o\nCc: %L\n\n{posn_cursor_here_emacs}' then define the following in your emacs .emacs_pro: (defun (rn-mode ans ;define any pet local conditions you might want for rn replies (text-mode) (setq right-margin 76) (setq mode-string "rn") ; position cursor as instructed in header info (if (!(error-occurred (search-forward "{posn_cursor_here_emacs}"))) (provide-prefix-argument 24 (delete-previous-character)) ) ; process any newsgroup followup warning (if (looking-at "{warn_ray_newsgroups}") (progn (provide-prefix-argument 21 (delete-next-character)) (kill-to-end-of-line) (delete-next-character) (save-excursion ; display original newsgroups on line following new Newsgroups: (beginning-of-file) (next-line) (insert-string "Originally: ") (yank-from-killbuffer) (newline)(newline) (beginning-of-file) ; bell the user - the ^G should be replaced by a CTRL G code (send-string-to-terminal "^G") ; ask if want to replace current ones (setq ans (get-tty-string (concat "Use original Newsgroups? "))) (if (| (= ans "y")(= ans "Y")) (progn ; yes - delete current, insert original (search-forward ": ") (yank-from-killbuffer) (kill-to-end-of-line) ) ) ; fix-up header - remove Originally: lines (next-line)(beginning-of-line) (provide-prefix-argument 3 (kill-to-end-of-line)) ) ) ) ) ) (auto-execute "rn-mode" "*.letter") (auto-execute "rn-mode" "*.article") This will flag clearly when there is a difference between the newsgroups and followup-to lines of an article you are replying to, allow you to chose one or the other, and automatically fix up the header. -- Ray Dunn. | UUCP: ray@philmtl.philips.ca Philips Electronics Ltd. | ..!{uunet|philapd|philabs}!philmtl!ray 600 Dr Frederik Philips Blvd | TEL : (514) 744-8200 Ext : 2347 (Phonemail) St Laurent. Quebec. H4M 2S9 | FAX : (514) 744-6455 TLX : 05-824090