all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: emacs-devel@gnu.org
Subject: Re: How to successively log stuff to a file?
Date: Tue, 04 Feb 2014 13:36:05 +0100	[thread overview]
Message-ID: <87wqhb5a2y.fsf@rosalinde.fritz.box> (raw)
In-Reply-To: <87wqhbaho3.fsf@web.de> (Michael Heerdegen's message of "Tue, 04 Feb 2014 00:41:00 +0100")

On Tue, 04 Feb 2014 00:41:00 +0100 Michael Heerdegen <michael_heerdegen@web.de> wrote:

> 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.

You can suppress the message:

   write-region is an interactive built-in function in `C source code'.
   
   (write-region START END FILENAME &optional APPEND VISIT LOCKNAME MUSTBENEW)
   
   Write current region into specified file.
   [...]
   If VISIT is neither t nor nil nor a string,
     that means do not display the "Wrote file" message.

Steve Berman



  reply	other threads:[~2014-02-04 12:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-03 23:41 How to successively log stuff to a file? Michael Heerdegen
2014-02-04 12:36 ` Stephen Berman [this message]
2014-02-06  3:37   ` Michael Heerdegen
2014-02-06  3:54   ` persistent file locks (was: How to successively log stuff to a file?) Michael Heerdegen
2014-02-06  6:21     ` Eli Zaretskii
2014-02-06  6:57       ` persistent file locks Michael Heerdegen
2014-02-06  8:34         ` Eli Zaretskii
2014-02-07 12:27           ` Michael Heerdegen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wqhb5a2y.fsf@rosalinde.fritz.box \
    --to=stephen.berman@gmx.net \
    --cc=emacs-devel@gnu.org \
    --cc=michael_heerdegen@web.de \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.