Xref: utzoo news.admin:1823 comp.sources.bugs:875 news.software.b:1240 Path: utzoo!mnetor!uunet!mcvax!enea!erix!per From: per@erix.UUCP (Per Hedeland) Newsgroups: news.admin,comp.sources.bugs,news.software.b Subject: Re: enhancement to rn = index command Message-ID: <1584@erix.UUCP> Date: 22 Mar 88 13:53:38 GMT References: <3063@haddock.ISC.COM> Reply-To: per@erix.UUCP (Per Hedeland) Organization: Ericsson Telecom, Stockholm, Sweden Lines: 43 In article <3063@haddock.ISC.COM> trb@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@erix.ericsson.se or {mcvax,uunet}!enea!erix!per