From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ruy Exel Subject: org-mode gets confused with column widths when 'time-stamp-custom-formats' are applied. Date: Tue, 14 Nov 2017 10:02:17 -0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c19516cf7a3ea055df02a57" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEZvl-0002v4-Cw for emacs-orgmode@gnu.org; Tue, 14 Nov 2017 07:03:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEZvf-0001Ov-Eq for emacs-orgmode@gnu.org; Tue, 14 Nov 2017 07:03:03 -0500 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:57162) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eEZvf-0001NN-7t for emacs-orgmode@gnu.org; Tue, 14 Nov 2017 07:02:59 -0500 Received: by mail-wm0-x22a.google.com with SMTP id z3so21484671wme.5 for ; Tue, 14 Nov 2017 04:02:59 -0800 (PST) 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" To: emacs-orgmode@gnu.org --94eb2c19516cf7a3ea055df02a57 Content-Type: text/plain; charset="UTF-8" Consider the table below: | Name | Date of Birth | |-------+------------------| | John | <1978-11-14 Tue> | | Peter | <1970-11-14 Sat> | |-------+------------------| Suppose we want to format time stamps differently, such as with the following elisp commands: (setq org-time-stamp-custom-formats (quote ("<%d %b %y>" . "<%m/%d/%y %a %H:%M>"))) (org-toggle-time-stamp-overlays) After realigning the table you get | Name | Date of Birth | |-------+------------------| | John | <14 Nov 1978> | | Peter | <14 Nov 1970> | |-------+------------------| which is wrong because column widths are not uniform. The reason, I suppose, is that when computing column widths, org-mode ignores the fact that the change of time stamps may have altered the length of the printed string. Best wishes, Ruy Exel --94eb2c19516cf7a3ea055df02a57 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Consider the table below:

| Name=C2=A0 | Date of Bi= rth=C2=A0=C2=A0=C2=A0 |
|-------+------------------|
| John=C2=A0 | &= lt;1978-11-14 Tue> |
| Peter | <1970-11-14 Sat> |
|-------+-= -----------------|

Suppose we want to format time stam= ps differently, such as with the following elisp commands:

(setq org= -time-stamp-custom-formats (quote ("<%d %b %y>" . "<= ;%m/%d/%y %a %H:%M>")))
(org-toggle-time-stamp-overlays)

= After realigning the table you get

| Name=C2=A0 | Date of Birth=C2=A0=C2=A0=C2= =A0 |
|-------+------------------|
| John=C2=A0 | <14 Nov 1978>= |
| Peter | <14 Nov 1970> |
|-------+------------------|

which is wrong because column widths are not uniform.=C2=A0= The reason, I suppose, is that when computing column widths, org-mode igno= res the fact that the change of time stamps may have altered the length of = the printed string.

Best wishes,
Ruy Exel

--94eb2c19516cf7a3ea055df02a57--