all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: imap-debug buffer exceeds maximum size
       [not found]   ` <v9odbmlmpo.fsf@marauder.physik.uni-ulm.de>
@ 2008-01-16 18:42     ` Ted Zlatanov
  0 siblings, 0 replies; only message in thread
From: Ted Zlatanov @ 2008-01-16 18:42 UTC (permalink / raw)
  To: ding; +Cc: emacs-devel

On Tue, 15 Jan 2008 23:59:15 +0100 Reiner Steib <reinersteib+gmane@imap.cc> wrote: 

RS> On Tue, Jan 15 2008, Ted Zlatanov wrote:
>> On Tue, 08 Jan 2008 10:17:38 -0600 Ted Zlatanov <tzz@lifelogs.com> 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.

Ted

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-16 18:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <86hchomgv1.fsf@lifelogs.com>
     [not found] ` <861w8i4y1h.fsf@lifelogs.com>
     [not found]   ` <v9odbmlmpo.fsf@marauder.physik.uni-ulm.de>
2008-01-16 18:42     ` imap-debug buffer exceeds maximum size Ted Zlatanov

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.