GNU bug report logs - #4940
Avoiding loss of rcirc messages from the on disk log

Previous Next

Package: emacs;

Reported by: Giorgos Keramidas <keramida <at> ceid.upatras.gr>

Date: Mon, 16 Nov 2009 21:45:04 UTC

Severity: normal

Tags: patch

Done: Deniz Dogan <deniz.a.m.dogan <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 4940 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Ryan Yeske <rcyeske <at> gmail.com>
Cc: 4940 <at> debbugs.gnu.org
Subject: Re: Avoiding loss of rcirc messages from the on disk log
Date: Sun, 17 Jan 2010 19:01:33 -0500
Hi Ryan,

Could you review the patch from Giorgos Keramidas?  Thanks.

> The IRC buffers of "rcirc.el" use the auto-save mechanism to push log
> messages on disk.  This is a very good idea, since it avoids hitting the
> disk for every single line of the IRC log.  On busy channels it probably
> saves a *lot* of time that would be spent waiting for messages to be
> saved on disk.

> Unfortunately, it also means that the simple action of killing an rcirc
> buffer may lose some of the messages.  Any messages still on the alist
> `rcirc-log-alist' are still in memory and I've noticed that some of
> these may not be written to the log files in `rcirc-log-directory'.


diff -r e1381fd70a71 lisp/net/rcirc.el
--- a/lisp/net/rcirc.el	Fri Apr 03 03:02:01 2009 +0300
+++ b/lisp/net/rcirc.el	Sat Oct 31 05:12:55 2009 +0200
 <at>  <at>  -984,6 +984,8  <at>  <at>  If ALL is non-nil, update prompts in all
 (defun rcirc-kill-buffer-hook ()
   "Part the channel when killing an rcirc buffer."
   (when (eq major-mode 'rcirc-mode)
+    (when (and rcirc-log-directory rcirc-log-alist)
+      (rcirc-log-write))
     (rcirc-clean-up-buffer "Killed buffer")))
 
 (defun rcirc-change-major-mode-hook ()




This bug report was last modified 14 years and 183 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.