From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#41250: 28.0.50; Dired displays unconditionally ls-switches on modeline Date: Sun, 17 May 2020 18:17:05 +0300 Message-ID: <83wo5abngu.fsf@gnu.org> References: <87v9ky9p6o.fsf@mail.linkov.net> <654acc31-015d-4552-bd9b-3b8c69661fcd@default> <0957af50-7f85-455a-9d2c-e96451727872@default> <83a729uiaq.fsf@gnu.org> <835zcwv15e.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="38019"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41250@debbugs.gnu.org, juri@linkov.net To: Arthur Miller Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 17 17:18:11 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 1jaL3K-0009m1-BC for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 May 2020 17:18:10 +0200 Original-Received: from localhost ([::1]:52844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaL3J-0007is-48 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 May 2020 11:18:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaL3C-0007ik-Hj for bug-gnu-emacs@gnu.org; Sun, 17 May 2020 11:18:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60993) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaL3C-0006ZT-8x for bug-gnu-emacs@gnu.org; Sun, 17 May 2020 11:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jaL3C-0004XY-59 for bug-gnu-emacs@gnu.org; Sun, 17 May 2020 11:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 May 2020 15:18: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.158972864517405 (code B ref 41250); Sun, 17 May 2020 15:18:02 +0000 Original-Received: (at 41250) by debbugs.gnu.org; 17 May 2020 15:17:25 +0000 Original-Received: from localhost ([127.0.0.1]:44306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaL2a-0004We-Qr for submit@debbugs.gnu.org; Sun, 17 May 2020 11:17:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaL2Y-0004WS-HS for 41250@debbugs.gnu.org; Sun, 17 May 2020 11:17:22 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60465) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaL2Q-0006O9-Ne; Sun, 17 May 2020 11:17:14 -0400 Original-Received: from [176.228.60.248] (port=2171 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jaL2Q-0007XE-1k; Sun, 17 May 2020 11:17:14 -0400 In-Reply-To: (message from Arthur Miller on Sun, 17 May 2020 05:01:53 +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:180470 Archived-At: > From: Arthur Miller > Cc: drew.adams@oracle.com, 41250@debbugs.gnu.org, juri@linkov.net > Date: Sun, 17 May 2020 05:01:53 +0200 > > I have introduced dired-mode-line-hook, which is a usual thing in Emacs, > which is ment as a list of hooks that user can set. Each hook should > return a string that will be concatenated to the lighter. So users can > print whatever they want to that string (number of files, dirs etc). > > I have introduced also another function that will just iterate through > hooks concat stuff and update the modeline and refactored some code to > call this function instead of old dired-sort-set-modeline. Also > dired-sort-set-modeline is changed to work as a mentioned hook and is > used as default value for dired-mode-line-hook. > > If user does not prefer to see any aditional info on modeline then it is > just to set dired-mode-line-hook to nil. Obs, that can probably be coded > more elegantly, me & elisp are maybe not best friends (yet :-)). I have > built and tested emacs with the patch, but I might have missed > something. Once again, I think users should have simple means to request simple variations in behavior. A hook is not a simple means, it requires non-trivial knowledge of Lisp. So it should not be the only or main solution to such problems. > While I was looking through the code to set myself into dired, I have > also noticed lots of '^L' chars, I took the freedom to clean it up where > I saw them, there are probably more. You shouldn't remove them, they divide large files into sections, and make it easy to move by "pages".