From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.bugs Subject: bug#41250: 28.0.50; Dired displays unconditionally ls-switches on modeline Date: Fri, 15 May 2020 23:14:59 +0200 Message-ID: References: > <87v9ky9p6o.fsf@mail.linkov.net>> <654acc31-015d-4552-bd9b-3b8c69661fcd@default>> > <0957af50-7f85-455a-9d2c-e96451727872@default>> <83a729uiaq.fsf@gnu.org>> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="92757"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 41250@debbugs.gnu.org, juri@linkov.net To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 15 23:19:13 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 1jZhjd-000O2Z-Dl for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 May 2020 23:19:13 +0200 Original-Received: from localhost ([::1]:37424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZhjc-0006L8-88 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 May 2020 17:19:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZhgY-0002YX-T4 for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 17:16:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZhgY-0005nZ-Ih for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 17:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZhgY-0001Qw-EQ for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 17:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Arthur Miller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 May 2020 21:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41250 X-GNU-PR-Package: emacs Original-Received: via spool by 41250-submit@debbugs.gnu.org id=B41250.15895773105448 (code B ref 41250); Fri, 15 May 2020 21:16:02 +0000 Original-Received: (at 41250) by debbugs.gnu.org; 15 May 2020 21:15:10 +0000 Original-Received: from localhost ([127.0.0.1]:38963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZhfi-0001Po-2a for submit@debbugs.gnu.org; Fri, 15 May 2020 17:15:10 -0400 Original-Received: from mail-oln040092073093.outbound.protection.outlook.com ([40.92.73.93]:64958 helo=EUR04-HE1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZhfg-0001PX-R5 for 41250@debbugs.gnu.org; Fri, 15 May 2020 17:15:09 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IFMyXYhJJG/CYKVcdc4UZ0SFm2TlklF5Z5x8XkCHrDyx9qkBPzV69kTlIx6xUGKmES8b/knFi6cKk0cflJAK+LsEZgRhGraeD7nCZUrGR9POmu6+fZousy1W5p8cEu9CeUQfeqcJP4Z4dt9CRWBX+efeKAiwkN0MXRbLZRyVGs0vEnGDZzurnNtuj4K0K2EHAgnNyRla8NmVowNnmLkzEX45/B1UiVJBLWcS2LswLzrxAq4KxGs6tbRSjc8OClVFMddUm1wqBENVCQe8QcY6XRh451f+UozBDNcblyRajZx7fsMOiLjvAMaPvpS+VkjsoVCL7fTQhH1QXumuWWCtKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CU8itzd1WbGbN6Qgf7M9MppnphCJgEG1pfW1kkvhDLA=; b=O5AMgEhR17r7rjaYoQzkil2FG3ps3q+9XIXu+dP58hYWKaEAkRJaKmnGTq9piSqlyKMS8O1n/RTYfYSqQTJCKF1HNkUUjdo5DuEn5RRy3fFnb9eMRNwlZ7tkuDqd3LNOUFUOJP3Fj7kWVb222vrGP9oFNqH5rpWptuwHWFup6kkgO/7aQKqBGJBEj37ef4AsYsT44wzny6fYLf62FSWP68w0ElOO7uSngfhVRzqykiAO0Lr24u4LoswBrGqrsq13x3J3e9gjY/w7hZF/OXDVYuPCf/dPiWgdRIj/fP39hRRGKZolo8bc7Uh5Z4iRtpzdLfJRwHxN9CCCSVAvAcksig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=live.com; dmarc=pass action=none header.from=live.com; dkim=pass header.d=live.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CU8itzd1WbGbN6Qgf7M9MppnphCJgEG1pfW1kkvhDLA=; b=b2zJrqVJByBqkZF8+oxHjsm9Nt1Q8MhW9pxI0VOWzt9RhpJFsCvm00aFBRJDtVdv18I+eNvCnx0w+dhxmRvf9kjrXAsN9KIuK2cvfcUUul5vo898FG08IVrlIE07aLZ8QH/edy1XV4XV0JdWurrCV+MQ5NpQzdmwVwrX3oxFdqdQgBH+KaY8E6yTlzaHdLDDju/s6OUNzOyCPVANPneU0XHBNMn4YIwB4fc8x4AzHr0ah0kUwKxcPJfTbemyUMRNirI/jzEqSae87RvETL5HRlxBHVvvBLwS/PCy5RQfs3nqP/zemXTHnEAcy6uhssYpV9ML7yMYFZlGUr3aJdqkEA== Original-Received: from HE1EUR04FT017.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::49) by HE1EUR04HT169.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::381) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.19; Fri, 15 May 2020 21:15:01 +0000 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com (2a01:111:e400:7e0d::53) by HE1EUR04FT017.mail.protection.outlook.com (2a01:111:e400:7e0d::63) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.19 via Frontend Transport; Fri, 15 May 2020 21:15:01 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:88798BD86D582AEE470A3766D8E66ECC89A34376744C9E7775C4D578F17F68EC; UpperCasedChecksum:786E2B20393F8CE5FA15F5F38BF64E2AFC2CBFA572F6C696CB22F1D579E2D100; SizeAsReceived:7956; Count:48 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com ([fe80::49f0:2314:a959:bec5]) by VI1PR06MB4526.eurprd06.prod.outlook.com ([fe80::49f0:2314:a959:bec5%7]) with mapi id 15.20.2979.033; Fri, 15 May 2020 21:15:01 +0000 In-Reply-To: (Drew Adams's message of "Fri, 15 May 2020 14:00:11 -0700 (PDT)") X-ClientProxiedBy: AM7PR04CA0027.eurprd04.prod.outlook.com (2603:10a6:20b:110::37) To VI1PR06MB4526.eurprd06.prod.outlook.com (2603:10a6:803:ac::17) X-Microsoft-Original-Message-ID: <87blmoc33g.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM7PR04CA0027.eurprd04.prod.outlook.com (2603:10a6:20b:110::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.24 via Frontend Transport; Fri, 15 May 2020 21:15:00 +0000 X-Microsoft-Original-Message-ID: <87blmoc33g.fsf@live.com> X-TMN: [RAx9ihMRUUOgTMu5NJIXQK3cVpjex2Rz] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 6056c48d-77c0-450b-d756-08d7f9150762 X-MS-TrafficTypeDiagnostic: HE1EUR04HT169: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qyanAjt5Q0fsX5U2ME9WYhHPki6dzx9X/GQ3Y8IT+DeWuzw8iWv8yFD+3D1tcrPmXpP1LV6rUtoX3RuBhZmvg9CEypQKgbdg8qouTnERQeJrpTFkQEsXqtccWJBGcQ8vtQKdirQEXK7e1KnogFZiuysZewtYCi9Inx2gTmpptnyyRbWICDrFvqYNwyvBTMsl5OfaUC8onnTyhyOgjQrEQg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:0; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR06MB4526.eurprd06.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:; DIR:OUT; SFP:1901; X-MS-Exchange-AntiSpam-MessageData: BqOtHoNufxWmOwjvnf+uWcPcmruk/kF5FLFmX8SVk7kIaES+mQfxEhrK1xg9m3kjsYHwYPAT2uADT+y8Fo1bAG6iyqSPynQQc33GgY3RY3cF0+iJEwgPSOQCOkF5ZO0N+pNUfm8nLl3k6FcQBV93Jg== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6056c48d-77c0-450b-d756-08d7f9150762 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2020 21:15:01.3480 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT169 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:180363 Archived-At: Drew Adams writes: >> > an integer - show first N chars of switches >> >> I don't think this is a useful value: the user will rarely know how >> much space is available on the mode line. > > A user may know how much space they're willing > to give to this, as a general preference/rule. > > Mode-line data can vary considerably, depending > on one's setup, the buffer's mode, and other > things. And the effective available space > depends on window width. > > So of course no particular truncation constant > length will fit all contexts. Such truncation > is of limited utility, IMO, but I thought that's > what was requested. > > Sure, truncation could instead be relative (%). > In that case what it's relative to needs to be > considered. > > This is why, in the general case, a function > value is there. You'll recall that in an earlier > mail I said that truncation can just be done by > such a function. (Well, at that point I said a > `format' string - that too can truncate.) > > What I wrote up is just a simple truncation. If > you have a better one you want to suggest, fine. > >> Also, truncating without showing ellipsis or some >> other sign of truncation is IMO a sub-optimal UI. > > Arguable - mode-line space is limited. But maybe. > > I imagine you're suggesting appending a char such > as `.' to whatever truncation is used. That's > fine by me (though I'm not crazy about that char, > which I find generally illegible). An alternative > (more readable, but wastes 2 more chars, is `...'. > Another alternative is to surround the set of > switches with delimiters, e.g. "" or '' or [] ... As I understand Eli, he means, if switches are displayed only partially on modeline, then after the switch chars there would be an elipsis, which I understand means "...". I think it is OK since it indicates that there is more to it which indeed is quite common, but yes it does take more space on modeline.