all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Shingo Tanaka <shingo.fg8@gmail.com>
To: 53133@debbugs.gnu.org
Subject: bug#53133: 28.0.90; tabulated-list-sort doesn't work as expected
Date: Sun, 09 Jan 2022 11:03:27 +0900	[thread overview]
Message-ID: <87k0f9is28.wl-shingo.fg8@gmail.com> (raw)

Hi,

tabulated-list-sort sometimes doesn't work as expected due to the change between
28.0.90 and 28.0.50.

Here is how to reproduce:
1. Open Emacs from terminal with `emacs --no-init-file'
2. Type M-x list-buffers
3. Type C-x o (go to Buffer Menu)
4. Type C-M-Right 5 times to move on to "Fundamental" in "Mode" column
5. Type S 2 times or more to toggle sorting order
6. You will be able to see that "Size" column is selected as the sorting column
   unexpectedly

Looks like below change from 28.0.50 is releated to this issue, because it
disappears when I just rewind this change.

--- tabulated-list.el.org	2022-01-06 22:32:13.936852142 +0900
+++ tabulated-list.el	2022-01-07 15:15:42.000000000 +0900
@@ -574,7 +581,8 @@
       (when not-last-col
         (when (> pad-right 0) (insert (make-string pad-right ?\s)))
         (insert (propertize
-                 (make-string (- width (min width label-width)) ?\s)
+                 ;; We need at least one space to align correctly.
+                 (make-string (- width (min 1 width label-width)) ?\s)
                  'display `(space :align-to ,next-x))))
       (put-text-property opoint (point) 'tabulated-list-column-name name)
       next-x)))

Hope this will be fixed appropriately in the coming major release.

Regards,
Shingo





             reply	other threads:[~2022-01-09  2:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-09  2:03 Shingo Tanaka [this message]
2022-01-09 10:44 ` bug#53133: 28.0.90; tabulated-list-sort doesn't work as expected Eli Zaretskii
2022-01-09 11:30   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k0f9is28.wl-shingo.fg8@gmail.com \
    --to=shingo.fg8@gmail.com \
    --cc=53133@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.