[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to successively log stuff to a file?
From: |
Michael Heerdegen |
Subject: |
How to successively log stuff to a file? |
Date: |
Tue, 04 Feb 2014 00:41:00 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Hello,
I have written a little library for logging stuff, i.e. hit keys and
executed commands, messages, and file loads [1].
I want that you can define a dribble file where all my logged output
would be written to. That would be a good help to reconstruct what you
did before a crash, or for writing bug reports (Yes, I know about
`open-dribble-file', but it's in C).
What is the smartest way to do that (in LISP, of course)?
I could save the buffer content to a file regularly. To have a complete
log after crashes, I would have to save the buffer after each
keystroke. This seems very dumb.
There is also `write-region'. But that prints a message in the echo
area after each call, i.e. in my case, after each hit key.
Is there a smarter/cleverer/more low level way to do what I want?
Thanks,
Michael.
[1] https://github.com/michael-heerdegen/interaction-log.el
- How to successively log stuff to a file?,
Michael Heerdegen <=