all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Is there a way to get the last message?
@ 2017-05-28 10:50 Marcin Borkowski
  2017-05-28 11:18 ` Stephen Berman
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Marcin Borkowski @ 2017-05-28 10:50 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

Hi all,

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

(defun get-last-message ()
  "Try to get the last message."
  (interactive)
  (with-temp-buffer
    (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
ring.

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.

Best,

--
Marcin Borkowski



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

end of thread, other threads:[~2017-05-29 18:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-28 10:50 Is there a way to get the last message? Marcin Borkowski
2017-05-28 11:18 ` Stephen Berman
2017-05-28 11:41   ` John Ankarström
2017-05-29 18:51     ` Emanuel Berg
2017-05-28 14:12   ` Marcin Borkowski
2017-05-28 22:11   ` Emanuel Berg
2017-05-28 11:51 ` tomas
2017-05-28 18:24 ` Emanuel Berg

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.