[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: imap-debug buffer exceeds maximum size

From: Ted Zlatanov
Subject: Re: imap-debug buffer exceeds maximum size
Date: Wed, 16 Jan 2008 12:42:22 -0600
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

On Tue, 15 Jan 2008 23:59:15 +0100 Reiner Steib <address@hidden> wrote: 

RS> On Tue, Jan 15 2008, Ted Zlatanov wrote:
>> On Tue, 08 Jan 2008 10:17:38 -0600 Ted Zlatanov <address@hidden> wrote: 
TZ> If you turn imap-debug on, the imap-debug buffer keeps growing and
TZ> eventually will get to the max buffer size.  If then you try to do any
TZ> IMAP operations they will fail; currently you have to kill the
TZ> imap-debug buffer or empty it to continue IMAP usage.
TZ> I don't know what's the right fix, but I would guess removing half the
TZ> imap-debug buffer's contents (with a suitable message) would be a nice
TZ> compromise to keep the debug data.

RS> It would be okay, I'd guess.  But the debug output is created via the
RS> Emacs functionality `trace.el'.  I'm not familiar with this, but
RS> I don't see a possibility to limit the output buffer.

RS> (when imap-debug                    ; (untrace-all)
RS>   (require 'trace)
RS>   (buffer-disable-undo (get-buffer-create imap-debug-buffer))
RS>   (mapc (lambda (f) (trace-function-background f imap-debug-buffer))
RS>     '(
RS>       imap-utf7-encode
RS>       ;; [...]
RS>       imap-parse-body
RS>       )))

>> nnimap-debug-buffer has the same problem.

RS> Maybe `imap-log-buffer', too.

I think this is for the Emacs developers list, since trace.el is in
their tree.

My suggestions for the fix are above; I can write a patch if it's
necessary.  Looks like trace.el:trace-make-advice() needs to be adjusted
to check the buffer size.  It could set trace-inhibit but I think
trimming the buffer is a nicer solution for the user.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]