From: Magnus Henoch <mange@freemail.hu>
Subject: Re: `last-message' variable ?
Date: Tue, 16 May 2006 10:45:25 +0200 [thread overview]
Message-ID: <87fyjauzmi.fsf@freemail.hu> (raw)
In-Reply-To: 87slnb54eq.fsf@tallis.ilo.ucl.ac.uk
Bastien <bastien@xxx.fr> writes:
> Just guessing, i thought Emacs would have a `last-message' variable,
> in case we want to fetch the last message quickly. Apparently, this
> is not the case.
>
> How do i get the last message string ?
>
> What about implementing this ?
I have worked around it like this:
(defun last-message ()
"Display last message from *Messages* buffer."
(interactive)
(with-current-buffer "*Messages*"
(save-excursion
(goto-char (point-max))
(previous-line)
(message "%s" (buffer-substring (point) (1- (point-max)))))))
Magnus
next prev parent reply other threads:[~2006-05-16 8:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-15 22:06 `last-message' variable ? Bastien
2006-05-16 8:45 ` Magnus Henoch [this message]
[not found] ` <mailman.1884.1147769158.9609.help-gnu-emacs@gnu.org>
2006-05-16 10:31 ` Bastien
2006-05-16 11:58 ` Tim X
2006-05-16 12:44 ` Bastien
2006-05-16 14:57 ` Kim F. Storm
[not found] ` <mailman.1900.1147791985.9609.help-gnu-emacs@gnu.org>
2006-05-16 15:23 ` Bastien
2006-05-16 15:51 ` Drew Adams
[not found] <mailman.1905.1147794706.9609.help-gnu-emacs@gnu.org>
2006-05-16 16:13 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fyjauzmi.fsf@freemail.hu \
--to=mange@freemail.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).