GNU bug report logs -
#73047
30.0.90; feature request - add recency column to ibuffer
Previous Next
Reported by: Daniel Mendler <mail <at> daniel-mendler.de>
Date: Thu, 5 Sep 2024 15:30:02 UTC
Severity: wishlist
Found in version 30.0.90
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 11 Jan 2025 15:06:38 +0200
with message-id <861px9zeht.fsf <at> gnu.org>
and subject line Re: bug#73047: 31; [PATCH] - add recency column to ibuffer
has caused the debbugs.gnu.org bug report #73047,
regarding 30.0.90; feature request - add recency column to ibuffer
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
73047: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73047
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Dear Emacs maintainers,
I want to propose the addition of an optional recency column to Ibuffer,
which shows the last buffer display time. Sorting by recency is already
supported by Ibuffer (ibuffer-do-sort-by-recency). I use the following
code in my configuration:
(defvar-keymap ibuffer-recency-header-map
"<mouse-1>" #'ibuffer-do-sort-by-recency)
(define-ibuffer-column recency
(:inline t :summarizer ignore :header-mouse-map ibuffer-recency-header-map)
(if-let ((time (buffer-local-value 'buffer-display-time buffer)))
(progn
(require 'marginalia)
(marginalia--time (buffer-local-value 'buffer-display-time buffer)))
"never"))
The time string is formatted in a human readable form, relative to to
the current time, e.g., "2 mins ago", "30 secs ago" or "never". I use
the function from the Marginalia package from GNU ELPA for formatting
right now. As far as I know Emacs does not yet provide a relative time
formatting function? Maybe there is interest in adding marginalia--time
to Emacs, e.g., with the name format-time-relative? As far as I know,
multiple packages define a similar formatting function, such that we
could potentially get some code reuse. The function could be ported
back via Compat to make it available to ELPA packages.
Thank you!
[Message part 3 (message/rfc822, inline)]
> From: Daniel Mendler <mail <at> daniel-mendler.de>
> Cc: 73047 <at> debbugs.gnu.org, jdtsmith <at> gmail.com
> Date: Sat, 11 Jan 2025 13:24:05 +0100
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> Cc: JD Smith <jdtsmith <at> gmail.com>
> >> Date: Sat, 28 Dec 2024 13:50:20 +0100
> >> From: Daniel Mendler via "Bug reports for GNU Emacs,
> >> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> >>
> >> Daniel Mendler <mail <at> daniel-mendler.de> writes:
> >>
> >> > I've attached a patch to this mail which adds a recency column to
> >> > Ibuffer. It uses the `seconds-to-string' function with the READABLE
> >> > argument.
> >>
> >> Please disregard the earlier patch, which was a wrong version. I've
> >> attached a better patch to this mail. Thanks.
> >
> > Thanks. Should this be called out in NEWS?
>
> Yes. I've added an entry to the NEWS file. See the updated patch
> attached to this mail. Thanks.
Thanks, installed on the master branch, and closing the bug.
This bug report was last modified 129 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.