emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: double-width characters in tables
Date: Tue, 12 Feb 2013 16:32:29 +0530	[thread overview]
Message-ID: <87halhiym2.fsf@gmail.com> (raw)
In-Reply-To: <878v6tdcmm.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Tue, 12 Feb 2013 18:56:17 +0800")


File a bug report - M-x report-emacs-bug RET - against Orgmode.  I am
sure something useful will come out of it, eventually.  It is good to
get eyes and mouths of emacs-devel-ers involved, for whatever it is
worth.  Believe me it is good, for the discussion and suggestions it
will open up.

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> This problem has been flagged up before:
>
> http://orgmode.org/worg/org-issues.html#mid-87pqt04qg1-2Efsf-40gmail-2Ecom
>
> It's causing me headaches at the moment, so I'm trying to see if I can
> find a solution.
>
> The proximate cause of issues with double-width characters in table
> fields (they also mess with justification) is that the contents of the
> fields are propertized with a length based on `length', and not
> `string-width'. So you get this:
>
> #("《蛙》" 0 3 (fontified t line-prefix #("    " 0 4 (face org-indent))
>  wrap-prefix #("    " 0 4 (face org-indent)) face org-table))
>
> 3 is the number of characters in the string, but it takes up 6 columns
> of screen width. That messes up justification.
>
> I can't for the life of me figure out where that number is getting added
> to the string! I tried changing `length' to `string-width' in all manner
> of org functions, such as `org-add-props', but could never get that
> number changed during the fontification of the org tables.
>
> I wouldn't be surprised if this is something outside of org, or if
> "fixing" it would lead to more troubles, but does anyone have any ideas
> about this? Fixable, or not?
>
> Thanks!
> Eric
>
>
>

-- 

  reply	other threads:[~2013-02-12 11:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12 10:56 double-width characters in tables Eric Abrahamsen
2013-02-12 11:02 ` Jambunathan K [this message]
2013-02-12 11:22   ` Bastien
2013-02-12 11:16 ` Bastien
2013-02-12 15:43   ` Eric Abrahamsen
2013-02-12 15:50     ` Nick Dokos
2013-02-12 15:55     ` Bastien
2013-02-12 17:55       ` Takaaki ISHIKAWA
2013-02-12 18:43     ` Achim Gratz
2013-02-13  1:46       ` Eric Abrahamsen
2013-02-13  2:23         ` [PATCH] " Eric Abrahamsen
2013-02-13 11:42           ` Bastien
2013-02-13 13:18             ` Eric Abrahamsen
2013-02-13  8:50         ` Eric Abrahamsen
2013-02-13 11:31         ` Bastien

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87halhiym2.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric@ericabrahamsen.net \
    /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 public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).