emacs-diffs
[Top][All Lists]
Advanced

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

scratch/memrep 4547414 2/4: Reformat the data some more


From: Lars Ingebrigtsen
Subject: scratch/memrep 4547414 2/4: Reformat the data some more
Date: Thu, 10 Dec 2020 07:08:19 -0500 (EST)

branch: scratch/memrep
commit 45474143bde57c1d5b665e949db26655362e3a71
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Reformat the data some more
---
 lisp/emacs-lisp/memory-report.el | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/lisp/emacs-lisp/memory-report.el b/lisp/emacs-lisp/memory-report.el
index bef8435..3497195 100644
--- a/lisp/emacs-lisp/memory-report.el
+++ b/lisp/emacs-lisp/memory-report.el
@@ -31,6 +31,7 @@
   (interactive)
   (pop-to-buffer "*Memory-Report*")
   (special-mode)
+  (setq truncate-lines t)
   (let ((reports (append (memory-report--garbage-collect)
                          (memory-report--image-cache)
                          (memory-report--buffers)
@@ -39,14 +40,15 @@
         (inhibit-read-only t)
         summaries details)
     (erase-buffer)
+    (insert "Estimated Emacs Memory Usage\n\n")
     (dolist (report reports)
       (if (listp report)
           (push report summaries)
         (push report details)))
     (dolist (summary (nreverse summaries))
-      (insert (format "%-40s %s\n"
-                      (car summary)
-                      (memory-report--format (cdr summary)))))
+      (insert (format "%s  %s\n"
+                      (memory-report--format (cdr summary))
+                      (car summary))))
     (insert "\n")
     (dolist (detail (nreverse details))
       (insert detail "\n")))
@@ -105,7 +107,7 @@
               (dolist (object (seq-sort (lambda (e1 e2)
                                           (> (cadr e1) (cadr e2)))
                                         data))
-                (insert (format "%s %s\n"
+                (insert (format "%s  %s\n"
                                 (memory-report--format (cadr object))
                                 (capitalize (symbol-name (car object))))))
               (buffer-string))))))
@@ -140,7 +142,7 @@
                                                    (> (cdr e1) (cdr e2)))
                                                  variables)
                 do (insert (memory-report--format size)
-                           " "
+                           "  "
                            (symbol-name symbol)
                            "\n"))
        (buffer-string)))))
@@ -223,7 +225,7 @@
                                                         (> (cdr e1) (cdr e2)))
                                                       buffers)
                      do (insert (memory-report--format size)
-                                " "
+                                "  "
                                 (buffer-name buffer)
                                 "\n"))
             (buffer-string)))))



reply via email to

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