From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: double-width characters in tables Date: Tue, 12 Feb 2013 16:32:29 +0530 Message-ID: <87halhiym2.fsf@gmail.com> References: <878v6tdcmm.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5Ddg-0002eP-5r for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 06:03:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5Dda-0006mZ-Hi for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 06:03:04 -0500 Received: from mail-da0-f51.google.com ([209.85.210.51]:59857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5Dda-0006m5-BW for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 06:02:58 -0500 Received: by mail-da0-f51.google.com with SMTP id n15so3156817dad.24 for ; Tue, 12 Feb 2013 03:02:57 -0800 (PST) In-Reply-To: <878v6tdcmm.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Tue, 12 Feb 2013 18:56:17 +0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Abrahamsen Cc: emacs-orgmode@gnu.org 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 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: > > #("=E3=80=8A=E8=9B=99=E3=80=8B" 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 > > > --=20