all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Štěpán Němec" <stepnem@gmail.com>
To: 10978@debbugs.gnu.org
Subject: bug#10978: `calendar-string-spread' loses with double-width characters
Date: Fri, 09 Mar 2012 12:57:30 +0100	[thread overview]
Message-ID: <87vcme6l79.fsf@gmail.com> (raw)

The algorithm used obviously works using `length', but for every
double-width character the resulting string is one char too long when
actually displayed, defeating its purpose when formatting the calendar
mode line (`calendar-update-mode-line' et al.).

Ex.:

(calendar-string-spread '("a" "b" "c") ?\s 10)
;=> "a   b    c" ; OK

(calendar-string-spread '("矢" "b" "c") ?\s 10)
;=> "矢   b    c" ; not OK

-- 
Štěpán





             reply	other threads:[~2012-03-09 11:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-09 11:57 Štěpán Němec [this message]
2012-03-09 12:33 ` bug#10978: `calendar-string-spread' loses with double-width characters Eli Zaretskii
2012-03-09 14:05   ` Drew Adams
2012-03-10  9:57     ` Eli Zaretskii
2012-03-10  2:27   ` Glenn Morris
2012-03-10  2:32     ` Glenn Morris
2012-03-10 10:02       ` Eli Zaretskii
2012-03-12 20:26         ` Glenn Morris
2012-03-16  1:12           ` Glenn Morris
2012-03-10  7:32     ` Eli Zaretskii

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=87vcme6l79.fsf@gmail.com \
    --to=stepnem@gmail.com \
    --cc=10978@debbugs.gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.