GNU bug report logs -
#79253
Add timestamps to *Messages*
Previous Next
Full log
Message #20 received at 79253 <at> debbugs.gnu.org (full text, mbox):
>> Could you implement an easy way to add timestamps to the *Messages* buffer?
>
> Did you try using set-message-function to install your function as the
> one that adds a time stamp to the text of the message to be shown? If
> you tried, and it didn't work, please tell what didn't work. If you
> didn't try, please do.
First of all, thanks for the hint. The 'message' function does not mention 'set-message-function' or the like, so I missed it.
I could find very little information about 'set-message-function', and no examples whatsoever, so I came up with this:
(defun my-message-function (msg)
"" ; No docstring yet.
(concat "Test: " msg))
(setq set-message-function #'my-message-function)
The effect is that messages in the minibuffer do get the "Test:" prefix, but messages in the *Messages* buffer do not.
But that is exactly the opposite of what I am trying to achieve!
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.