[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is there a way to get the last message?

From: Marcin Borkowski
Subject: Is there a way to get the last message?
Date: Sun, 28 May 2017 12:50:12 +0200
User-agent: mu4e 0.9.19; emacs 26.0.50

Hi all,

I know about (current-message).  However, this won't work:

(defun get-last-message ()
  "Try to get the last message."
    (insert (or (current-message) ""))
    (clipboard-kill-ring-save (point-min) (point-max))))

M-x get-last-message puts the empty string into the clipboard and kill

Apparently `current-message' is cleared before this command has a chance
to get it.  This makes sense, but there is no `previous-message' command.

Is there any way to get the last thing displayed in the echo area (from
`message' or possibly from `error', too)?  This would be quite useful:
one could then paste it to a search engine to look up the internet for
some hints about the error/message.


Marcin Borkowski

reply via email to

[Prev in Thread] Current Thread [Next in Thread]