[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tabulated-list: extend truncation into next align-right col
From: |
Tino Calancha |
Subject: |
Re: tabulated-list: extend truncation into next align-right col |
Date: |
Tue, 1 Nov 2016 12:31:42 +0900 (JST) |
User-agent: |
Alpine 2.20 (DEB 67 2015-01-07) |
On Mon, 31 Oct 2016, Stefan Monnier wrote:
+ ;; TODO: don't truncate to `width' if the next column is align-right
+ ;; and has some space left.
[...]
+(defvar-local tabulated-list--col-max-widths nil
By "some space left" I meant "in the current line", so there shouldn't be
any need to compute the maximum width.
Yeah, but we must preserve the legibility of the table.
If we calculate the maximum widths and we restrict the
truncation until one well-defined limit, then the table
looks nicer.
For instance, compare following two tables:
;; Without computing maximum widths:
C1 C2 Numbers
abc **************************************... 123456
abc *******************************************... 1
abc ************************************ 123
;; With `tabulated-list--col-max-widths':
C1 C2 Numbers
abc **************************************... 123456
abc **************************************... 1
abc ************************************ 123
With many rows this effect might have an impact on table
readability.