all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 73150@debbugs.gnu.org
Subject: bug#73150: [PATCH] Human readable last display time of killed buffer
Date: Mon, 09 Sep 2024 17:23:57 +0200	[thread overview]
Message-ID: <875xr47svm.fsf@ledu-giraud.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 684 bytes --]

Tags: patch

Hi,

This patch display a human readable version of `buffer-display-time'
when said buffer is selected to be killed.


In GNU Emacs 31.0.50 (build 23, x86_64-unknown-openbsd7.6) of 2024-09-07
 built on computer
Repository revision: 6dcd3d24045113fb0afec0d7f43e322c9baa06ab
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101013
System Description: OpenBSD computer 7.6 GENERIC.MP#311 amd64

Configured using:
 'configure CC=egcc CPPFLAGS=-I/usr/local/include
 LDFLAGS=-L/usr/local/lib MAKEINFO=gmakeinfo --prefix=/home/manuel/emacs
 --bindir=/home/manuel/bin --with-x-toolkit=no --without-cairo
 --without-compress-install'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Human-readable-last-display-time-of-killed-buffer.patch --]
[-- Type: text/patch, Size: 998 bytes --]

From 8f3f61105817a05218e0fde05e1dd0748579b17a Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Mon, 9 Sep 2024 17:16:32 +0200
Subject: [PATCH] Human readable last display time of killed buffer

* lisp/midnight.el (clean-buffer-list): Upon killing a buffer,
add a human readable last displayed information.
---
 lisp/midnight.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/midnight.el b/lisp/midnight.el
index bfa99d6a7a8..fc1e08f2189 100644
--- a/lisp/midnight.el
+++ b/lisp/midnight.el
@@ -179,7 +179,8 @@ clean-buffer-list
                     (and (buffer-file-name buf) (buffer-modified-p buf))
                     (get-buffer-window buf 'visible)
                     (< delay cbld))
-          (message "[%s] killing `%s'" ts bn)
+          (message "[%s] killing `%s' (last displayed %s ago)" ts bn
+                   (format-seconds "%Y, %D, %H, %M, %z%S" delay))
           (kill-buffer buf))))))
 
 ;;; midnight hook
-- 
2.46.0


[-- Attachment #3: Type: text/plain, Size: 18 bytes --]

-- 
Manuel Giraud

             reply	other threads:[~2024-09-09 15:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-09 15:23 Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-09-12  9:31 ` bug#73150: [PATCH] Human readable last display time of killed buffer 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=875xr47svm.fsf@ledu-giraud.fr \
    --to=bug-gnu-emacs@gnu.org \
    --cc=73150@debbugs.gnu.org \
    --cc=manuel@ledu-giraud.fr \
    /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.