From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/38698 Path: main.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.gnus.general Subject: Re: Slight bug in the `gnus-use-correct-string-widths' implementation. Date: Mon, 10 Sep 2001 11:13:01 +1000 Organization: Not today, thank you, Mother. Message-ID: <87k7z7zw4i.fsf@inanna.rimspace.net> References: <87itf461hj.fsf@inanna.rimspace.net> <87g09zrypn.fsf@inanna.rimspace.net> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035174518 23823 80.91.224.250 (21 Oct 2002 04:28:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:28:38 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 25502 invoked from network); 10 Sep 2001 01:13:55 -0000 Original-Received: from melancholia.rimspace.net (HELO melancholia.danann.net) (203.36.211.210) by gnus.org with SMTP; 10 Sep 2001 01:13:55 -0000 Original-Received: from localhost (melancholia.rimspace.net [203.36.211.210]) by melancholia.danann.net (Postfix) with ESMTP id 201222A833 for ; Mon, 10 Sep 2001 11:13:38 +1000 (EST) Original-Received: by localhost (Postfix, from userid 1000) id 4464B820F9; Mon, 10 Sep 2001 11:13:02 +1000 (EST) Original-To: ding@gnus.org In-Reply-To: (Michael Totschnig's message of "Sat, 08 Sep 2001 23:31:58 -0400") X-Homepage: http://danann.net/ User-Agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.5 (artichoke) Original-Lines: 30 Xref: main.gmane.org gmane.emacs.gnus.general:38698 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:38698 --=-=-= On Sat, 08 Sep 2001, Michael Totschnig wrote: > Simon Josefsson wrote: > >> Daniel Pittman writes: >> >>>> It's quite nagging to me because I usually send and receive Korean >>>> mails. >>> >>> The attached patch fixes is, but it's probably quite ugly and >>> offensive to the eyes of the Gnus experts[1] so I trust that one of >>> them will rewrite it to be nicer... >> >> I committed it, trusting that someone will send a patch cleaning it >> up if necessary. > > I have the impression that this patch could be responsible for a > problem with specifications I observe since updating today: Rats. You got me; I missed that glitch in my code. It now respects the side that the padding should be on as well as the width of it, with the attached patch. Daniel --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Index: gnus-spec.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-spec.el,v retrieving revision 6.13 diff -u -u -p -r6.13 gnus-spec.el --- gnus-spec.el 2001/09/08 07:53:16 6.13 +++ gnus-spec.el 2001/09/10 01:12:00 @@ -376,16 +376,21 @@ "Return a form that pads EL to PAD-WIDTH accounting for multi-column characters correctly. This is because `format' may pad to columns or to characters when given a pad value." - (let ((pad (abs pad-width))) + (let ((pad (abs pad-width)) + (side (< 0 pad-width))) (if (symbolp el) `(let ((need (- ,pad (gnus-correct-length ,el)))) (if (> need 0) - (concat ,el (make-string need ?\ )) + (concat ,(when side '(make-string need ?\ )) + ,el + ,(when (not side) '(make-string need ?\ ))) ,el)) `(let* ((val (eval ,el)) (need (- ,pad (gnus-correct-length ,el)))) (if (> need 0) - (concat ,el (make-string need ?\ )) + (concat ,(when side '(make-string need ?\ )) + ,el + ,(when (not side) '(make-string need ?\ ))) ,el))))) (defun gnus-parse-format (format spec-alist &optional insert) --=-=-= -- When your hammer is C++, everything begins to look like a thumb. -- Simon Brooke --=-=-=--