From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.devel Subject: Re: tabulated-list: extend truncation into next align-right col Date: Tue, 1 Nov 2016 12:31:42 +0900 (JST) Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1477971150 20995 195.159.176.226 (1 Nov 2016 03:32:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 1 Nov 2016 03:32:30 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: Emacs developers , Tino Calancha To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 01 04:32:27 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1Pnm-0000yZ-MB for ged-emacs-devel@m.gmane.org; Tue, 01 Nov 2016 04:31:54 +0100 Original-Received: from localhost ([::1]:39632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1Pnp-0000vQ-Bd for ged-emacs-devel@m.gmane.org; Mon, 31 Oct 2016 23:31:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1Pni-0000vI-AX for emacs-devel@gnu.org; Mon, 31 Oct 2016 23:31:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1Pnf-0006Cr-66 for emacs-devel@gnu.org; Mon, 31 Oct 2016 23:31:50 -0400 Original-Received: from mail-pf0-x232.google.com ([2607:f8b0:400e:c00::232]:33191) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c1Pne-0006Ch-VW for emacs-devel@gnu.org; Mon, 31 Oct 2016 23:31:47 -0400 Original-Received: by mail-pf0-x232.google.com with SMTP id d2so12736956pfd.0 for ; Mon, 31 Oct 2016 20:31:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=lY8gqyYe47z+nUROfgPZb0aeMUFt7j4b6DjL3e7u8xM=; b=KC8BsOgsCy26LJeU7UZTBN5CeLHUNtVruZwbduNQvF9csSKgkyit537FBMbmfLD6I7 yl9OvjLY8KVw4qR8jSRWIkTQqlLSsSOqCLedfPulZnz9Rg0YklE+sNi/SDoxBuYpKoRy a8fYILoTBoNRP6pQVdGaLfhQTuFCJsBlMo84d03YE4ScmL67UTgqZRItEIc+GnjP/NJt 2vqXrWf3kp9P3Bgad3HUh+8io+ZzL0dEpK+/5KdZgVBdO1H2qHI3G8As6znluyuv6qC/ Pd1HiH2TOZyZabhqi65ZbagwiQq+jRKvO9TnsIJ/CMoh4utU9z4/Z/IFIvviUr+zST6E fOPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=lY8gqyYe47z+nUROfgPZb0aeMUFt7j4b6DjL3e7u8xM=; b=Jq2ufV7A/8nQZd+tCZhSLKWmgwGGRQ4q7X7meSf7BdYPX2goXL2m6nMux6ZM8rvu7z IPVrNKRnTdkbZKSAn86+BSa2bQY90+N7HPNShiLRBsuFAA10CZtM2QvFLmGIPMj+GVtq lfW2pUkDq8ZNwF/prTQQy/DgSCSq9i8lZnBQ8zKxxeQbGZPvV3WgvywLKQoGm3lpdSXF mH8rgYPh98sxZp0pD1/Dxi9Ub3z3vCVVbr0+hTS+SrA1CUft7JIFo0LBsiCkZG82b6cJ 9fRvVHaMKnIJWD92xvRGRoAGdW9Bskd1YcbzgHrccJ2owKmcS2cxRPL6uWsDAzX7GvD0 +3Gg== X-Gm-Message-State: ABUngvcFGdrmZmw3MGs4pGPm7qu1y9HSRJOkBKlGjcGLmJFWcosBqy1GSQm7wW7bdsQ5Ew== X-Received: by 10.98.144.219 with SMTP id q88mr55582185pfk.116.1477971105584; Mon, 31 Oct 2016 20:31:45 -0700 (PDT) Original-Received: from calancha-pc (57.92.100.220.dy.bbexcite.jp. [220.100.92.57]) by smtp.gmail.com with ESMTPSA id 21sm38476039pfs.88.2016.10.31.20.31.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Oct 2016 20:31:45 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:209053 Archived-At: 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.