[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fri, 01 Mar 2019 23:20:38 +0100
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
I just wrote this:
(defun insert-last-message ()
(let ((end (goto-char (point-max)))
(start (re-search-backward "^[[:space:]]*[[:graph:]]+")) )
(buffer-substring start end) ))))
(defalias 'ilm #'insert-last-message)
Again, this is another example of something
that seems to work, but it doesn't look good,
and I'm pretty sure it won't work in all cases
(e.g., multiline messages, possibly also
messages with wierd chars etc).
What I would like to have, and what I think
would be the sound solution, is to have a
data structure, a stack list, with the most
recent messages. One could have a variable to
specify the desired length of that list.
Every message would then go into that list, and
be accessed LIFO.
After that, one could easily even do
prefix args to access/output/insert not the
last, but the second last message, or any
message stored, if one can keep track of them
that is :)
Also, one could have a "blacklist" with
uninteresting messages, that would never enter
the list. Perhaps even a regexp blacklist, if
that wouldn't be too slow (?).
And when all of it still fails, one could still
use the *Messages* buffer and get whatever
Is this a difficult thing to do?
underground experts united
|[Prev in Thread]
||[Next in Thread]|
Emanuel Berg <=