From: Simon Josefsson <jas@extundo.com>
Cc: ding@gnus.org
Subject: Re: gnus-correct-length vs. string-width
Date: Fri, 28 Dec 2001 18:22:50 +0100 [thread overview]
Message-ID: <iluadw3mf85.fsf@extundo.com> (raw)
In-Reply-To: <m3sn9vctee.fsf@defun.localdomain> (Jesper Harder's message of "Fri, 28 Dec 2001 15:26:49 +0100")
Jesper Harder <harder@ifa.au.dk> writes:
> Is the built-in function `string-width' known to be broken?
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.
> I'm asking because the Gnus substitute `gnus-correct-length' seems to be
> horribly expensive in comparison -- it really degrades performance when
> generating summary buffers. Here's the elp results for entering an NNTP
> group with 4000 messages:
Could CJK people please try running with the patch below?
--- gnus-spec.el.~6.27.~ Tue Dec 18 20:42:52 2001
+++ gnus-spec.el Fri Dec 28 18:21:11 2001
@@ -264,11 +264,7 @@
(insert (make-string (max (- ,(abs column) (current-column)) 0)
? ))))))
-(defun gnus-correct-length (string)
- "Return the correct width of STRING."
- (let ((length 0))
- (mapcar (lambda (char) (incf length (gnus-char-width char))) string)
- length))
+(defalias gnus-correct-length 'string-width)
(defun gnus-correct-substring (string start &optional end)
(let ((wstart 0)
next prev parent reply other threads:[~2001-12-28 17:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-28 14:26 Jesper Harder
2001-12-28 17:22 ` Simon Josefsson [this message]
2001-12-28 23:24 ` Lars Magne Ingebrigtsen
2002-01-05 7:00 ` Daniel Pittman
2002-01-05 16:08 ` Lars Magne Ingebrigtsen
2002-01-06 11:25 ` Daniel Pittman
2001-12-30 1:32 ` Jesper Harder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=iluadw3mf85.fsf@extundo.com \
--to=jas@extundo.com \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).