From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: imap-debug buffer exceeds maximum size Date: Wed, 16 Jan 2008 12:42:22 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <86abn5zk6p.fsf@lifelogs.com> References: <86hchomgv1.fsf@lifelogs.com> <861w8i4y1h.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1200508900 29565 80.91.229.12 (16 Jan 2008 18:41:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Jan 2008 18:41:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: ding@gnus.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 16 19:41:57 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JFDCm-00084F-6z for ged-emacs-devel@m.gmane.org; Wed, 16 Jan 2008 19:41:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JFDCN-00037r-Jy for ged-emacs-devel@m.gmane.org; Wed, 16 Jan 2008 13:41:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JFDCI-00036v-55 for emacs-devel@gnu.org; Wed, 16 Jan 2008 13:41:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JFDCE-00035b-OS for emacs-devel@gnu.org; Wed, 16 Jan 2008 13:41:09 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JFDCE-00035W-C0 for emacs-devel@gnu.org; Wed, 16 Jan 2008 13:41:06 -0500 Original-Received: from blockstar.com ([170.224.69.95] helo=mail.blockstar.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JFDCD-0004pI-Sq for emacs-devel@gnu.org; Wed, 16 Jan 2008 13:41:06 -0500 Original-Received: from tzlatanov-ubuntu-desktop.jumptrading.com (unknown [38.98.147.130]) by mail.blockstar.com (Postfix) with ESMTP id 40B24418D5B; Wed, 16 Jan 2008 11:13:42 -0800 (PST) X-Hashcash: 1:20:080116:emacs-devel@gnu.org::5koNVk1O+ZcXUKAM:0000000000000000000000000000000000000000000rYJ X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" X-Hashcash: 1:20:080116:ding@gnus.org::+1xRtlwAQ2N9gO4k:00001buT In-Reply-To: (Reiner Steib's message of "Tue, 15 Jan 2008 23:59:15 +0100") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:86984 gmane.emacs.gnus.general:66144 Archived-At: On Tue, 15 Jan 2008 23:59:15 +0100 Reiner Steib wrote: RS> On Tue, Jan 15 2008, Ted Zlatanov wrote: >> On Tue, 08 Jan 2008 10:17:38 -0600 Ted Zlatanov 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