From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#44068: 28.0.50; Faulty uses of tabulated-list-format Date: Thu, 29 Oct 2020 18:06:16 -0700 Message-ID: References: <87imb7e242.fsf@gmx.net> <83zh4ipbli.fsf@gnu.org> <877drm13j3.fsf@gmx.net> <831rhuoy36.fsf@gnu.org> <87y2k2yqqb.fsf@gmx.net> <87h7qori97.fsf@gmx.net> <874kmcfy2h.fsf@rub.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2680"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44068@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 30 02:23:06 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYJ8E-0000bv-Pl for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Oct 2020 02:23:06 +0100 Original-Received: from localhost ([::1]:33870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYJ8D-0003MT-S8 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Oct 2020 21:23:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYIsk-0001Gr-3Q for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 21:07:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44003) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYIsh-0003wk-0E for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 21:07:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYIsg-0005V4-Qz for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 21:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Oct 2020 01:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44068 X-GNU-PR-Package: emacs Original-Received: via spool by 44068-submit@debbugs.gnu.org id=B44068.160401998521087 (code B ref 44068); Fri, 30 Oct 2020 01:07:02 +0000 Original-Received: (at 44068) by debbugs.gnu.org; 30 Oct 2020 01:06:25 +0000 Original-Received: from localhost ([127.0.0.1]:55548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYIs4-0005U2-NJ for submit@debbugs.gnu.org; Thu, 29 Oct 2020 21:06:24 -0400 Original-Received: from mail-ej1-f51.google.com ([209.85.218.51]:45958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYIs2-0005Tq-TP for 44068@debbugs.gnu.org; Thu, 29 Oct 2020 21:06:23 -0400 Original-Received: by mail-ej1-f51.google.com with SMTP id dk16so5765883ejb.12 for <44068@debbugs.gnu.org>; Thu, 29 Oct 2020 18:06:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=EaHiDs5ZYNSXf6a0AQm3fe6I/ASghz4iOLuy91cb2ro=; b=cI25ZznIGK7NH3S6yJMoTaezowZeMY+Rl/TJZp1vRARaUT60w9i19pJLJH2s/B6/1M 1/U3SkvZMMEn5nfkk2JBuoaBFrcXgZm5SjyRw22TfbYsfdre6aVLi3UI4TfRZloo2Q1x IiKnrN+CAcvxMIoFJGws0dev0fCLAJ/LeySL32wntEKCK8BcEw6GnXD2jkHGukodkJDs 466OKldtwt1HnrXLQf73AE67nvGDqmqItsP4qq7ncqkicrRHUTMxSysNSh2V/zHM5OLB jZ8UoBuu44nIwAISHf9x9cZWE1tvPMHFpB02Uz0PTCpyQguEJn+1pXlDKIvdjQGiFTNc Nqog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=EaHiDs5ZYNSXf6a0AQm3fe6I/ASghz4iOLuy91cb2ro=; b=Uyqrmn2aJgMvwy1B5y36RwoPHsyrHC5YrULDo7hki22iTzOh2DPkIxFwHEP+OR/K1q S5JT5hi6PsjcstBCK3PtsprBs7+l6/lyWIzPjdX+N+nrHDn6o7X4fNK3H6r0+2dSqqfV /GLib5YSsygkqJ7ufpnq436uIIPjfErusRgCe8c0aAIVJAvHmRcn4RN8JnJizJ/ZNoDN K4Qo+ZdA4IilE2XZLAaXXnQhj6/Kx41wjwlo571wRaOq7OhEVGkWd9FdwSe/hvFrMcQr Wk8KyoKqf+I4d9/yNhXH8CsyM83opKZIVowoOXDGPk0B7SbdiFqkApr6ESvrK94PjdOg T3cA== X-Gm-Message-State: AOAM532K0GYxXbkEoHjBolTricZKuO9ftjQENKyT4CScze/5JCs1D3+Z 3V9fNFxc7XKKsH10pXNGhC8kkWhiAGmvLx52rDA= X-Google-Smtp-Source: ABdhPJzufsExh1/u7bhzRRQnM3oIr7uOS2eFs96mvihsTCLAwYwU0/PsquMej1wJp9vW08a7Ylzbzizcw+RWIycdJ54= X-Received: by 2002:a17:906:a40b:: with SMTP id l11mr55815ejz.25.1604019977137; Thu, 29 Oct 2020 18:06:17 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 29 Oct 2020 18:06:16 -0700 In-Reply-To: <874kmcfy2h.fsf@rub.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:192028 Archived-At: Stephen Berman writes: > Try the attached patch; does it do what you're suggesting well enough? Yes, it looks better. > I meant that in some uses of tabulated-list-mode there are columns whose > default width is so narrow that, when selected for sorting, they are > immediately truncated (using the patch in my previous post), e.g. the > "Status" column in list-processes. And the issue is exacerbated with > the current patch implementing your new suggestion: with its default > width "Status" is now truncated whether selected or not. But the "Status" field in process-menu-mode is 7, so why is it truncated when there is room? "Status" is only 6 characters. I would expect that "Status" was not truncated in this case, IOW that: - Without a sorting indicator - label width <= column width => display it all - label width > column width => truncate - With a sorting indicator - label width <= column width => display it all - label width > column width => truncate For the last column, we should probably just show it all regardless of its width, and never truncate. Does the above make sense? BTW, perhaps we should add unit tests for all this, since it seems like we have a fair amount of use-cases to think about. Maybe that could be a good excuse to make tabulated-list-init-header a bit more functional... > In such cases it may be better to make the default width of such > columns wider, which is what my first patch did. Then with the > current patch, it will still be truncated when the column is > sufficiently narrowed with `{'. Yes, the default width of such columns should also be made wider, I think. But first we should probably make sure that the underlying logic here is sound. Thanks again for working on this.