From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#41250: 28.0.50; Dired displays unconditionally ls-switches on modeline Date: Fri, 15 May 2020 14:00:11 -0700 (PDT) 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; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="15499"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41250@debbugs.gnu.org, arthur.miller@live.com, juri@linkov.net To: Eli Zaretskii , Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 15 23:01:16 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 1jZhSG-0003xe-0q for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 May 2020 23:01:16 +0200 Original-Received: from localhost ([::1]:48354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZhSE-0004AW-V8 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 May 2020 17:01:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZhS2-00049p-6M for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 17:01:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZhS1-0000iR-SA for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 17:01:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZhS1-000159-RJ for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 17:01:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 May 2020 21:01:01 +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.15895764314114 (code B ref 41250); Fri, 15 May 2020 21:01:01 +0000 Original-Received: (at 41250) by debbugs.gnu.org; 15 May 2020 21:00:31 +0000 Original-Received: from localhost ([127.0.0.1]:38943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZhRP-00014A-Is for submit@debbugs.gnu.org; Fri, 15 May 2020 17:00:31 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:35496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZhRN-00013v-3O for 41250@debbugs.gnu.org; Fri, 15 May 2020 17:00:21 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04FKuuWP048909; Fri, 15 May 2020 21:00:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=urkGdg3AZhBvAlZa+QNd50/Gh5vq/lQk/yFxqmU+DB4=; b=Sqq4F301xoa7RKiudVzqbFOP2t9e1FegdWoNHmXOQz3NfM5lZV/frV+DaYLM9ZW+O+s5 SDYToLxEIS+G+/BtKXDv29eD7tPxM+jU05GPjsFc2+c5MWAvzPlQ+iu/GRyDSH3cVAz5 qvGTDEHgcjz8cuKf3/Vs3toz9nZTd7+49fMR5AzyeUSXoBu8sJDa1NV6PVrTcxzROt30 Jdh39NQC9Q+WONLH5gH6lZnerh58rHhY1aDaUbJ5VmpQ3sHxDGnX4gj26p8CSDIG3D4v zdioX63BkPUpzFKbWUxkgNnw5cOn1diLkbjYD2pNKeeN+tvZENYx9Snvo4irktL+P+zX gg== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 3100ygds3k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 15 May 2020 21:00:14 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04FKwpvA108498; Fri, 15 May 2020 21:00:14 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 3100ys7rjp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 May 2020 21:00:13 +0000 Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 04FL0Co4022173; Fri, 15 May 2020 21:00:12 GMT In-Reply-To: <<83a729uiaq.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4993.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9622 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=972 adultscore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005150174 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9622 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 adultscore=0 cotscore=-2147483648 mlxscore=0 suspectscore=0 spamscore=0 impostorscore=0 mlxlogscore=982 malwarescore=0 clxscore=1015 phishscore=0 bulkscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005150174 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:180361 Archived-At: > > an integer - show first N chars of switches >=20 > 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 [] ...