[news.newusers.questions] RN's "h" switch

mesard@bbn.com (Wayne Mesard) (01/02/90)

wdstarr@athena.mit.edu (William December Starr) writes:
>For reasons which defy human comprehension, I'm trying to rig
>something for RN (running under vanilla UNIX, I think) which will
>allow me to toggle between two states while in RN.  The states are:

>(1) Most of my "h" switches are set to a negative state, [...]
>    This is the default state, generated by my issuing the following
>    setenv before calling RN:
>

Long "setenv RNINIT" deleted.

>    The other state is: [everything turned on]

> I've tried tying a lot of "&switch" commands to an rn macro:
> 
>     # { -- "{" causes all hiding to be disabled.
>     #      Active only in article and pager modes.
> 
>     { %(%m=[ap]?&switch +harticle-i.d. &switch +happroved &switch +hdistribution &switch +hexpires &switch +hfollowup-to &switch +hmessage-id &switch +hnf-from &switch +hnf-id &switch +hnewsgroups &switch +horganization &switch +hpath &switch +hposted &switch +hposting-version &switch +hreply-to &switch +hreferences &switch +hrelay-version &switch +hsender &switch +hxref:{)
>
>but all that gets me is a nice little crash:
>
>    % interp buffer overflow!
>
>    Caught an internal error--.newsrc restored
>
>Can anybody help me out on this?

Well, part of the problem is that you took the RN man page too
literally.  When it said

    &switch {switch}

it meant

    &<your-switch-here> <more-switches-here-if-you-want>

So the above can be properly rewritten (I think) as:

    { %(%m=[ap]?&+harticle-i.d. +happroved +hdistribution +hexpires\
	+hfollowup-to +hmessage-id +hnf-from +hnf-id +hnewsgroups \
	+horganization +hpath +hposted +hposting-version +hreply-to\
	+hreferences +hrelay-version +hsender +hxref:)

But there's an easier way to turn all the headers on.
Specify an empty string for the "h" switch. That is:

   &+h

From the RN man page:

     -h<string>
          hides (disables the printing of) all header lines
          beginning with string. For instance, -hexp will disable
          the printing of the "Expires:" line.  Case is insigni-
          ficant.  If <string> is null, all header lines except
          Subject are hidden, and you may then use +h to select
          those lines you want to see.  You may wish to use the
          baud-rate switch modifier below to hide more lines at
          lower baud rates.

You don't specify the "reasons which defy human comprehension," but if
it's just to look at all the headers from one or two articles, you
should know about the "v" command (for "verbose") at the article
selection level.

Wayne();