all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#73150: [PATCH] Human readable last display time of killed buffer
@ 2024-09-09 15:23 Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-09-12  9:31 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-09-09 15:23 UTC (permalink / raw)
  To: 73150

[-- 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-12  9:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-09 15:23 bug#73150: [PATCH] Human readable last display time of killed buffer Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-12  9:31 ` Eli Zaretskii

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.