From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/41609 Path: main.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-correct-length vs. string-width Date: Sat, 05 Jan 2002 18:00:34 +1100 Organization: Not today, thank you, Mother. Sender: owner-ding@hpc.uh.edu Message-ID: <877kqx704t.fsf@inanna.rimspace.net> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035176979 7116 80.91.224.250 (21 Oct 2002 05:09:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 05:09:39 +0000 (UTC) Return-Path: Original-Received: (qmail 29575 invoked from network); 5 Jan 2002 11:33:12 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 5 Jan 2002 11:33:12 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16Mp4A-0000Q3-00; Sat, 05 Jan 2002 05:32:46 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 05 Jan 2002 05:32:38 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id FAA13153 for ; Sat, 5 Jan 2002 05:32:27 -0600 (CST) Original-Received: (qmail 29566 invoked by alias); 5 Jan 2002 11:32:30 -0000 Original-Received: (qmail 29561 invoked from network); 5 Jan 2002 11:32:29 -0000 Original-Received: from melancholia.rimspace.net (HELO melancholia.danann.net) (210.23.138.19) by gnus.org with SMTP; 5 Jan 2002 11:32:29 -0000 Original-Received: from localhost (melancholia.rimspace.net [210.23.138.19]) by melancholia.danann.net (Postfix) with ESMTP id 692B82A837 for ; Sat, 5 Jan 2002 22:32:06 +1100 (EST) Original-Received: by localhost (Postfix, from userid 1000) id 83C548217B; Sat, 5 Jan 2002 18:00:34 +1100 (EST) Original-To: ding@gnus.org In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sat, 29 Dec 2001 00:24:39 +0100") Original-Lines: 35 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.5 (asparagus, i686-pc-linux) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:41609 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:41609 On Sat, 29 Dec 2001, Lars Magne Ingebrigtsen wrote: > Simon Josefsson writes: > >> When I try the examples from the original thread >> (<87itf461hj.fsf@inanna.rimspace.net> etc) `string-width' works fine. >> (format "%-10s" ...) with wide characters still behaves differently >> between Emacs and XEmacs though, but that shouldn't matter. > > It seems to work correctly on Emacs 20, 21 and XEmacs 21, so I think > we should probably ditch `gnus-correct-length' and related functions > like `gnus-char-width'. > > Or, at the very least, have gnus-ems.el just check whether > `string-width' gives reasonable results, and defalias according to > that. > > Unless somebody has a good reason for why we shouldn't do that... (format "%-10s" ...) differs on character vs byte width between XEmacs and GNU Emacs. This means that the "correct" width is lost when doing cut operations on wide characters in the summary buffer... ...so, feel free to fix it, but if I start getting the wrong results I will submit a patch to make it work again. It's only really the `format' stuff that's different between the two Emacs-en, IIRC, but I have not thought about this for ages... Daniel -- If there really is a God who created the entire universe with all of its glories, and He decides to deliver a message to humanity, He will not use, as His messenger, a person on cable TV with a bad hairstyle. -- Dave Barry