Subject: bug#65511: [PATCH] copy-next-command-output suggestion

From: Jeremy Bryant <[email-masked]>
Date: Thu, 13 Feb 2025 23:20:20 +0000

Stefan Kangas <[email-masked]> writes:

> Jeremy Bryant <[email-masked]> writes:
>
>> Yes, I will work on this.
>>
>> Stefan Monnier <[email-masked]> writes:
>>
>>>>> It might not be that hard to do: tho: just push markers in *Messages* at
>>>>> the beginning/end of every command (unless there have been no messages
>>>>> since the last push), make sure we throw away those markers that reach
>>>>> `point-min`, and then add a `copy-last-command-output` command that uses
>>>>> those markers to extract the last message using those markers.
>>>>> The tricky part will be to find the right message when messages are
>>>>> emitted (e.g. by the completion UI) while the user types
>>>>> `M-x copy-last-command-output RET`.
>>>> Maybe we should indeed try to come up with such an alternative
>>>> implementation.
>>>
>>> Jeremy, do you want to take a crack at it?
>
> Jeremy, were you able to make any progress here?

I worked on it but got stuck.
The facility is useful - I currently use that snippet from Stefan M in my
.emacs, as is.
I will see if I have time to revisit.
Thanks for the chaser.