From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#41250: 28.0.50; Dired displays unconditionally ls-switches on modeline Date: Fri, 15 May 2020 01:33:51 +0300 Organization: LINKOV.NET Message-ID: <87v9ky9p6o.fsf@mail.linkov.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="7724"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 41250@debbugs.gnu.org To: Arthur Miller Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 15 00:43:17 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 1jZMZR-0001t8-2e for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 May 2020 00:43:17 +0200 Original-Received: from localhost ([::1]:40962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZMZP-0000s2-UM for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 May 2020 18:43:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZMZC-0000rf-4a for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 18:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51842) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZMZB-00063v-P0 for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 18:43:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZMZB-0001H0-Je for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 18:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 May 2020 22:43: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.15894961794878 (code B ref 41250); Thu, 14 May 2020 22:43:01 +0000 Original-Received: (at 41250) by debbugs.gnu.org; 14 May 2020 22:42:59 +0000 Original-Received: from localhost ([127.0.0.1]:35154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZMZ8-0001Gc-Vc for submit@debbugs.gnu.org; Thu, 14 May 2020 18:42:59 -0400 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:39011) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZMZ6-0001GI-Eo for 41250@debbugs.gnu.org; Thu, 14 May 2020 18:42:57 -0400 X-Originating-IP: 91.129.104.245 Original-Received: from mail.gandi.net (m91-129-104-245.cust.tele2.ee [91.129.104.245]) (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 731F960002; Thu, 14 May 2020 22:42:48 +0000 (UTC) In-Reply-To: (Arthur Miller's message of "Thu, 14 May 2020 03:42:32 +0200") 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:180283 Archived-At: > There is no way to turn off displaying of ls-switches on modeline when > in dired-mode. > > By default in certain configuration, dired display ls-switches on > modeline. In case those switches are a long list, for example: > > "-lA --si --time-style long-iso --group-directories-first" > > then everything else on modeline gets pushed far to the right which is > not very usable. In general I don't have much use of seing ls-switches > on modeline and would like to be able to turn them off. As of current it > does not seem possible since it is hard-coded in function > `dired-sort-set-mode-line' in dired.el. > > I suggest, as small improvement, to introduce a user option to turn off > or on displaying of ls-switches on modeline. As a suggestion I have > attached small hack to dired.el as tested on my copy of Emacs, but you > might wish to rewrite it. Drew had some other suggestions. Maybe instead of boolean better to use a number for the allowed limit that should not grow more than this number that means the length of switches string that the user can tolerate on the modeline. Then modeline will display abbreviation truncated to the specified number of characters, with an ellipses, on the assumption that the most important switches are at the beginning of the string. Customizing it to 0 effectively disables the display of switches.