Subject: Re: bug#30129: 25.3; ibuffer sorting order does not return to normal after using `ibuffer-invert-sorting' twice

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 04 Feb 2021 13:00:16 +0100

Lars Ingebrigtsen <[email-masked]> writes:

> Windy Tusooa <[email-masked]> writes:
>
>> In ibuffer-mode, the command `ibuffer-invert-sorting’ reverse the
>> order of buffers.  But when the command is used the second time, the
>> order does not return to normal.
>
> If you call it three times, it does return to normal.  :-)  Until you
> hit `g' again.
>
> This should now work better in Emacs 28.

Uhm, not really -- the problem is that every time ibuffer-redisplay is
called, the order is inverted...  since there is no explicit `recency'
sorter.

I've now added such a sorter, and that fixes the problem.  However, this
effectively reverts e782065477917c10759d618e43b2ec18330ffae3, which made
calling `ibuffer-do-sort-by-recency' twice (permanently) reverse the
sorting order...  which I think is pretty odd, since there's already a
command for that.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no