From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/37413 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: Bug on Summary line. Date: Fri, 03 Aug 2001 18:35:54 +0200 Message-ID: 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=us-ascii X-Trace: main.gmane.org 1035172833 13758 80.91.224.250 (21 Oct 2002 04:00:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:00:33 +0000 (UTC) Cc: ding@gnus.org Return-Path: Return-Path: Original-Received: (qmail 22937 invoked from network); 3 Aug 2001 16:36:29 -0000 Original-Received: from waldorf.cs.uni-dortmund.de (129.217.4.42) by gnus.org with SMTP; 3 Aug 2001 16:36:29 -0000 Original-Received: from lothlorien.cs.uni-dortmund.de (lothlorien.cs.uni-dortmund.de [129.217.19.67]) by waldorf.cs.uni-dortmund.de with ESMTP id SAA19485; Fri, 3 Aug 2001 18:35:55 +0200 (MES) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.19.80]) by lothlorien.cs.uni-dortmund.de id SAA06065; Fri, 3 Aug 2001 18:35:54 +0200 (MET DST) Original-Received: (from grossjoh@localhost) by lucy.cs.uni-dortmund.de (8.9.3/8.9.3/Debian 8.9.3-21) id SAA06525; Fri, 3 Aug 2001 18:35:54 +0200 Original-To: Daniel Pittman In-Reply-To: <87d76dxmqo.fsf@inanna.rimspace.net> (Daniel Pittman's message of "04 Aug 2001 00:05:19 +1000") User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.105 Original-Lines: 26 Xref: main.gmane.org gmane.emacs.gnus.general:37413 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:37413 On 04 Aug 2001, Daniel Pittman wrote: > This is because the `%-20,20' style specifications work in > characters, not columns. The summary buffer display, however, is a > fixed *column* width display. > > As such, a character that is not one column wide spills further than > it should. For most characters, you have `(= 1 (char-width > ch))'. For double-width characters, that is actually `(= 2 > (char-width ch))'. > > 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. > > 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'. Why not change the code that deals with `%-20,20' to grok wide chars? IMVHO, that would be the right thing to do. After all, suppose somebody has a tab character somewhere... kai -- ~/.signature: No such file or directory