Timeline for Hook that fires when `*Messages*` is updated
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 26, 2017 at 0:48 | vote | accept | Matthew Piziak | ||
Oct 26, 2017 at 0:45 | answer | added | Stefan | timeline score: 2 | |
Oct 25, 2017 at 21:33 | comment | added | Gilles 'SO- stop being evil' |
@Name Indirect buffers wouldn't help, because what's special isn't the *Messages* buffer, but the code that inserts the messages into it.
|
|
Oct 25, 2017 at 21:32 | comment | added | Gilles 'SO- stop being evil' |
@phils Advising message wouldn't work for messages emitted by primitives. It would be risky for what is probably the reason that no hook fires when a message is emitted: any error or other message emitted from that advice/hook would cause recursion, so you'd need to be careful and disable the hook (like post-command-hook ) in case this happens.
|
|
Oct 25, 2017 at 21:23 | history | edited | Basil |
Remove unrelated tag
|
|
Jul 24, 2015 at 6:22 | comment | added | Name |
Can indirect buffers help? gnu.org/software/emacs/manual/html_node/emacs/… I mean to create a clone or indirect clone of the buffer message and fire the hook on that clone?
|
|
Jul 23, 2015 at 22:59 | comment | added | phils | All good. It sounded a bit XY, but obviously it's fine if you're asking the question you need to be asking. | |
Jul 23, 2015 at 22:28 | comment | added | Matthew Piziak | If you disagree with my reasoning, please start a chat with me. I endeavor to post high-quality questions and always appreciate advice. | |
Jul 23, 2015 at 22:26 | comment | added | Matthew Piziak |
Question is as-is. I'm trying to avoid the XY problem, but in this case I want to know the answer to this specific question. I am not trying to debug anything, and I do not want to advise message . I want to be able to fire a function whenever the contents of *Messages* change. I appreciate your efforts in trying to solve my root problem and will consider whether there is a better way to contextualize the problem. I believe this question in its current state is unambiguously answerable according to SX guidelines, and I want to be careful about adding more information.
|
|
Jul 23, 2015 at 21:41 | comment | added | phils |
There is no such hook. You could advise message , but it's not clear whether that's sufficient, or sensible. If you're trying to debug something, use the debug-on-message variable (available since 24.3).
|
|
Jul 23, 2015 at 21:23 | comment | added | phils | What are you trying to achieve? | |
Jul 23, 2015 at 18:38 | history | asked | Matthew Piziak | CC BY-SA 3.0 |