[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] double-width characters in tables
From: |
Eric Abrahamsen |
Subject: |
[O] double-width characters in tables |
Date: |
Tue, 12 Feb 2013 18:56:17 +0800 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2 (gnu/linux) |
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
- [O] double-width characters in tables,
Eric Abrahamsen <=
- Re: [O] double-width characters in tables, Jambunathan K, 2013/02/12
- Re: [O] double-width characters in tables, Bastien, 2013/02/12
- Re: [O] double-width characters in tables, Eric Abrahamsen, 2013/02/12
- Re: [O] double-width characters in tables, Nick Dokos, 2013/02/12
- Re: [O] double-width characters in tables, Bastien, 2013/02/12
- Re: [O] double-width characters in tables, Takaaki ISHIKAWA, 2013/02/12
- Re: [O] double-width characters in tables, Achim Gratz, 2013/02/12
- Re: [O] double-width characters in tables, Eric Abrahamsen, 2013/02/12
- [O] [PATCH] Re: double-width characters in tables, Eric Abrahamsen, 2013/02/12