[305] in bug-owl
Re: owlconf.vtformat question
daemon@ATHENA.MIT.EDU (Jeremy Daniel)
Wed Dec 10 20:58:09 2003
To: bug-owl@MIT.EDU
Cc: Christopher M Keleshian <kelesh@MIT.EDU>
From: Jeremy Daniel <jdaniel@MIT.EDU>
Date: 10 Dec 2003 20:58:07 -0500
In-Reply-To: <200312021040.hB2AeHA0020131@meeko.mit.edu>
Message-ID: <skeekvc9kuo.fsf@multics.mit.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
I didn't actually write the owlconf.vtformat, but here's a patch that
will do what you suggested.
> cvs diff examples/owlconf.vtformat
Index: examples/owlconf.vtformat
===================================================================
RCS file: /mit/ktools/src/owl/repository/owl/examples/owlconf.vtformat,v
retrieving revision 1.1
diff -u -r1.1 owlconf.vtformat
--- examples/owlconf.vtformat 28 Jun 2002 04:16:50 -0000 1.1
+++ examples/owlconf.vtformat 11 Dec 2003 01:46:06 -0000
@@ -87,17 +87,19 @@
$header = sprintf "%-8s %-13s ", lc($owl::sender), lc($channel);
+ my $indent = 22;
if ($owl::msg =~ /=/) {
# indent it
+ my $spaces = " "x($indent+1);
$tmp=$owl::msg;
- $tmp=~s/^/ /g;
- $tmp=~s/\n/\n /g;
+ $tmp=~s/^/$spaces/g;
+ $tmp=~s/\n/\n$spaces/g;
$out.=$header."\n".$tmp;
} else {
# fill it
my $pagewidth = 74;
$out .= $header;
- $out .= fill_text($owl::msg, $pagewidth, 22, 1);
+ $out .= fill_text($owl::msg, $pagewidth, $indent, 1);
}
# note: no zsig added in this version
Christopher M Keleshian <kelesh@MIT.EDU> writes:
> Hey. Sorry for bothering you, but I'm guessing you wrote this and I
> have a question about it. I really like the way it formats messages,
> and I was wondering if you could explain this bug and perhaps offer a
> fix:
>
> Any message with an equals sign "=" in it is not indented. It
> is started in column 8 for some reason. This is where the default owl
> messages (without a owlconf file) are displayed, so I think the equals
> signs causes either format message or fill_text to fail. I'm guessing
> format message but i'm not positive. I'm just learning perl so I have
> no idea why an equals sign would break it like this. Do you have any
> suggestions? Or can you suggest a better person to ask? Thanks.
>
> -kelesh
--
Jer
------------------------------------------------------------------
Jeremy Daniel Cell Phone: 617-429-8573 /
4 Farragut Ave jdaniel-phone@mit.edu
Somerville, MA 02144-1709 AIM: jdanielmit
Zephyr athena users over the web: http://webzephyr.mit.edu/