emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-mode gets confused with column widths when 'time-stamp-custom-formats' are applied.
@ 2017-11-14 12:02 Ruy Exel
  2017-11-15 17:15 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Ruy Exel @ 2017-11-14 12:02 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 809 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1172 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: org-mode gets confused with column widths when 'time-stamp-custom-formats' are applied.
  2017-11-14 12:02 org-mode gets confused with column widths when 'time-stamp-custom-formats' are applied Ruy Exel
@ 2017-11-15 17:15 ` Nicolas Goaziou
  2017-11-15 19:10   ` Ruy Exel
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2017-11-15 17:15 UTC (permalink / raw)
  To: Ruy Exel; +Cc: emacs-orgmode

Hello,

Ruy Exel <ruyexel@gmail.com> writes:

> 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> |
> |-------+------------------|

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: org-mode gets confused with column widths when 'time-stamp-custom-formats' are applied.
  2017-11-15 17:15 ` Nicolas Goaziou
@ 2017-11-15 19:10   ` Ruy Exel
  0 siblings, 0 replies; 3+ messages in thread
From: Ruy Exel @ 2017-11-15 19:10 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 869 bytes --]

Wow!  That was quick.  Thanks.

Ruy

On Nov 15, 2017 15:15, "Nicolas Goaziou" <mail@nicolasgoaziou.fr> wrote:

> Hello,
>
> Ruy Exel <ruyexel@gmail.com> writes:
>
> > 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> |
> > |-------+------------------|
>
> Fixed. Thank you.
>
> Regards,
>
> --
> Nicolas Goaziou
>

[-- Attachment #2: Type: text/html, Size: 1483 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-15 19:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-14 12:02 org-mode gets confused with column widths when 'time-stamp-custom-formats' are applied Ruy Exel
2017-11-15 17:15 ` Nicolas Goaziou
2017-11-15 19:10   ` Ruy Exel

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).