[Top][All Lists]

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

Re: Undo information in nnfolder buffers.

From: Lute Kamstra
Subject: Re: Undo information in nnfolder buffers.
Date: Mon, 23 May 2005 13:04:10 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Reiner Steib <address@hidden> writes:

> On Fri, Apr 22 2005, Lute Kamstra wrote:
>> As a result, my spam group tends to grow rather big.  So once in a
>> while I pay it a visit and do M P b and B <DEL> to send the spam to
>> /dev/null.  With CVS Emacs, this gives me loads of messages like this:
>>   Buffer spam undo info is 3234240 bytes long; discard it? (yes or no)
>> Is it necessary to record undo information in nnfolder buffers?  Or in
>> other back ends for that matter?
> I don't think it is necessary.  But I'm not sure how this should be
> achieved within Gnus.  Could you provide a patch or a suggestion?

I use nnfolder so all messages of one group end up in one big file.
When I open the group, this file is loaded into a buffer.  At this
moment, Gnus should call buffer-disable-undo so that changing this
buffer (as is done by gnus-summary-delete-article) will not record
undo information.

It turns out that Gnus actually does this when it loads a group file
for the first time, but not always when it loads the file a second
time.  The patch below fixes this.  Ok to commit?

>> Human editing in back ends is explicitly requested and terminated,
>> so it should be easy to enable and disable recording undo
>> information at those moments.

Forget this remark.  I mistakenly thought that gnus-summary-edit-article
caused direct editing of the big file with all the messages of a group.


Index: lisp/gnus/nnfolder.el
RCS file: /cvsroot/emacs/emacs/lisp/gnus/nnfolder.el,v
retrieving revision 1.21
diff -c -r1.21 nnfolder.el
*** lisp/gnus/nnfolder.el       25 Feb 2005 01:52:09 -0000      1.21
--- lisp/gnus/nnfolder.el       23 May 2005 10:55:09 -0000
*** 875,880 ****
--- 875,881 ----
                    (nnheader-find-file-noselect file t)))))
      (mm-enable-multibyte) ;; Use multibyte buffer for future copying.
+     (buffer-disable-undo)
      (if (equal (cadr (assoc group nnfolder-scantime-alist))
               (nth 5 (file-attributes file)))
        ;; This looks up-to-date, so we don't do any scanning.
*** 901,907 ****
              maxid start end newscantime
              novbuf articles newnum
-         (buffer-disable-undo)
          (setq maxid (cdr active))
          (unless (or gnus-nov-is-evil nnfolder-nov-is-evil
--- 902,907 ----

reply via email to

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