enhancement to rn = index command
Per Hedeland
per at erix.UUCP
Tue Mar 22 23:53:38 AEST 1988
In article <3063 at haddock.ISC.COM> trb at haddock.isc.com (Andrew Tannenbaum) writes:
> This patch lets you use printf-style formatting in rn strings,
> most usefully, the SUBJLINE variable.
>
> A sample of the output is just below. The format used is
> -ESUBJLINE="%:-50.50s %:.24t"
This is actually quite unnecessary, you can achieve the same effect with
standard rn and
-ESUBJLINE="\
%(%s =\
^\\(..................................................\\)?%1) \
%(%t=^\\(........................\\)?%1:%t)"
(Your example seems to use 45 cols for the subject, though, which is probably
better on an 80 col terminal.) Of course, it's a bit more complicated, but
how often do you change your SUBJLINE? (Here is mine, BTW, created from the
"sample" used the previous time this fix was suggested:
-ESUBJLINE="\
%(%(%f=(\\(.*[^ ].*\\))$?%1:%f) =^\\(...............\\)?%1) \
(%( %[lines]=\\(....\\)$?%1)) \
%(%[subject]=^\\(...................................................\\)?\
%1:%[subject])"
)
> I also fixed the /foo/= bug (it wasn't checking SUBJLINE). I
I guess it's debatable whether this is correct. I would say that the
documentation is (slightly) inaccurate when saying that = prints the "subject".
> I notice that the %s fields have all the Re's stripped off, which
> isn't quite right, but I haven't dealt with that. (That's an
> existing bug, or at least the doc for = says that it uses %s by
> default).
If you want them, just use %[subject] instead of %s above. (Surely, nobody
uses the defaults? :-)
--Per Hedeland
per at erix.ericsson.se or {mcvax,uunet}!enea!erix!per
More information about the Comp.sources.bugs
mailing list