From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/37502 Path: main.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.gnus.general Subject: Re: Bug on Summary line. Date: 05 Aug 2001 12:51:45 +1000 Organization: Not today, thank you, Mother. Message-ID: <874rrnrzge.fsf@inanna.rimspace.net> References: <2nitggb5vq.fsf@piglet.jia.vnet> <8766c7f4bf.fsf@inanna.rimspace.net> <87d76dxmqo.fsf@inanna.rimspace.net> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1035172906 14235 80.91.224.250 (21 Oct 2002 04:01:46 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:01:46 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 25134 invoked from network); 5 Aug 2001 02:52:08 -0000 Original-Received: from melancholia.rimspace.net (HELO melancholia.danann.net) (203.36.211.210) by gnus.org with SMTP; 5 Aug 2001 02:52:08 -0000 Original-Received: from localhost (melancholia.rimspace.net [203.36.211.210]) by melancholia.danann.net (Postfix) with ESMTP id 2FDB72A833 for ; Sun, 5 Aug 2001 12:51:51 +1000 (EST) Original-Received: by localhost (Postfix, from userid 1000) id A6F6F82146; Sun, 5 Aug 2001 12:51:45 +1000 (EST) Original-To: ding@gnus.org In-Reply-To: (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "Fri, 03 Aug 2001 18:35:54 +0200") X-Homepage: http://danann.net/ User-Agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.5 (anise) Original-Lines: 40 Xref: main.gmane.org gmane.emacs.gnus.general:37502 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:37502 On Fri, 03 Aug 2001, Kai Gro=DFjohann wrote: > On 04 Aug 2001, Daniel Pittman wrote: >=20 >> This is because the `%-20,20' style specifications work in >> characters, not columns. The summary buffer display, however, is a >> fixed *column* width display. >>=20 >> As such, a character that is not one column wide spills further than >> it should. For most characters, you have `(=3D 1 (char-width >> ch))'. For double-width characters, that is actually `(=3D 2 >> (char-width ch))'. >>=20 >> So, what you want to do is go into `gnus-spec.el' and find the >> functions `gnus-tilde-max-form' and `gnus-tilde-cut-form'. They are, >> for reference, on lines 249 and 265. >>=20 >> You then want to rewrite those so that, rather than using >> `substring', they use something akin to `truncate-string-to-width', >> `string-width' and `char-width'. >=20 > Why not change the code that deals with `%-20,20' to grok wide chars? That's what I was suggesting, Kai. The %-20,20 form is shorthand for %~(cut 20)~(max 20), unless I misread something in the code. :) > IMVHO, that would be the right thing to do. After all, suppose > somebody has a tab character somewhere... Ack. TAB? I don't know *any* way to make TAB show up correctly. You would need to specially detect it. At least, that's the case under XEmacs -- TAB has a char-width of 1. Daniel --=20 Two hundred francs for sanctuary and she led me by the hand To a room of dancing shadows where all the heartache disappears And from the glowing tongues of candles I heard her whisper in my ear. =ABJ'=E9ntend ton coeur=BB -- Marillion, _Bitter Suite (III)_ (Misplaced Childhood)