GNU bug report logs - #79253
Add timestamps to *Messages*

Previous Next

Package: emacs;

Reported by: "R. Diez" <rdiez-2006 <at> rd10.de>

Date: Sat, 16 Aug 2025 07:38:04 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: "R. Diez" <rdiez-2006 <at> rd10.de>
Cc: 79253 <at> debbugs.gnu.org, rms <at> gnu.org
Subject: bug#79253: Add timestamps to *Messages*
Date: Mon, 18 Aug 2025 14:39:23 +0300
> Cc: 79253 <at> debbugs.gnu.org
> Date: Mon, 18 Aug 2025 08:49:55 +0200
> From:  "R. Diez" via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> > Ordinary Emacs editing is sequential and only the order matters.
> > For people like me, whi do that, timestamps would be unhelpful clutter.
> > So if we implement timestamps, there should be an easy way to turn them off.
> 
> When I switch to a *Compile-Log* buffer, I get an extra menu at the top called "Compile", with options like "Next Error" and "Stop Compilation".
> 
> Wouldn't it be cool if the *Messages* buffer also displayed a new menu with options like "Show Timestamps", "Show Time Deltas" and "Clear Buffer"?

See my earlier reply: the *Messages* buffer is put under a special
major mode, so that mode could define menus that are useful in that
buffer.  Patches welcome.

> But I am now more inclined to just offer a hook to capture the text lines sent to the *Messages* buffer. This way, you have complete freedom: you can send the text lines to syslog and/or implement your own *Enhanced Messages* buffer with all those features. I'm sure somebody would then write an Emacs package with such functionality. After the hook, the only other thing probably missing is to change all internal callers so that they write whole lines in a go.

I don't think a hook is necessary.  You could write a special minor
mode, whereby a timer would periodically copy the contents of the
*Messages* buffer to a file or a system log or whatever.

(Having hooks for inserting text into *Messages* is hard technically
because we deliberately use low-level functions to do that, to avoid
any such hooks, because hooks could be unsafe to run, and having such
a hook signal an error while storing messages into *Messages* might
render Emacs unusable.)




This bug report was last modified 25 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.