bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17219: 24.3.50; wrong alignment when a list is given to dired


From: Charalampos Mitrodimas
Subject: bug#17219: 24.3.50; wrong alignment when a list is given to dired
Date: Mon, 23 Dec 2024 00:25:26 +0000

Hi Jakub,


On 22/12/24 11:08 PM, Jakub Ječmínek via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote:
It seems that adding simple `dired--align-all-files' to the end of
`dired-revert' resolves this.

 From 41780fde84fe1c55a0a7417a833dc0b8303a3db8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Je=C4=8Dm=C3=ADnek?= <kuba@kubajecminek.cz>
Date: Sun, 22 Dec 2024 21:53:53 +0100
Subject: [PATCH] Align files after dired revert (Bug#17219)

* lisp/dired.el (dired-revert): Add dired--align-all-files
function call.
---
  lisp/dired.el | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/dired.el b/lisp/dired.el
index 028b862d159..acd31fb6424 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2157,7 +2157,8 @@ dired-revert
        (if (dired-goto-subdir dir)
            (dired-hide-subdir 1))))
      (unless modflag (restore-buffer-modified-p nil))
-    (hack-dir-local-variables-non-file-buffer))
+    (hack-dir-local-variables-non-file-buffer)
+    (dired--align-all-files))
What about performance? Depending on the size of the directory, recalculating alignment could have a minor performance impact.
    ;; outside of the let scope
  ;;;  Might as well not override the user if the user changed this.
  ;;;  (setq buffer-read-only t)


--
C. Mitrodimas






reply via email to

[Prev in Thread] Current Thread [Next in Thread]