all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* undo info for *cvs-tmp*
@ 2007-07-23 21:22 Dan Nicolaescu
  2007-07-24  1:09 ` Stefan Monnier
  2007-07-24 16:45 ` Richard Stallman
  0 siblings, 2 replies; 13+ messages in thread
From: Dan Nicolaescu @ 2007-07-23 21:22 UTC (permalink / raw)
  To: emacs-devel

Every time when commiting something to emacs CVS this warning appears:


Warning (undo): Buffer ` *cvs-tmp*' undo info was 3642818 bytes long.
The undo info was discarded because it exceeded `undo-outer-limit'.

This is normal if you executed a command that made a huge change
to the buffer.  In that case, to prevent similar problems in the
future, set `undo-outer-limit' to a value that is large enough to
cover the maximum size of normal changes you expect a single
command to make, but not so large that it might exceed the
maximum memory allotted to Emacs.

If you did not execute any such command, the situation is
probably due to a bug and you should report it.

You can disable the popping up of this buffer by adding the entry
(undo discard-info) to the user option `warning-suppress-types'.




Not sure what is the right solution here, completely disable undo for
*cvs-tmp* or up the limit. Can somebody please take a look at this? 

Thanks!
        
                --dan

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undo info for *cvs-tmp*
  2007-07-23 21:22 undo info for *cvs-tmp* Dan Nicolaescu
@ 2007-07-24  1:09 ` Stefan Monnier
  2007-07-24 18:29   ` Reiner Steib
  2007-07-24 19:33   ` undo info for *cvs-tmp* Stefan Monnier
  2007-07-24 16:45 ` Richard Stallman
  1 sibling, 2 replies; 13+ messages in thread
From: Stefan Monnier @ 2007-07-24  1:09 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

> Not sure what is the right solution here, completely disable undo for
> *cvs-tmp* or up the limit. Can somebody please take a look at this? 

Thanks.
The buffer name is " *cvs-tmp*" by default, so the leading space should turn
off undo, i.e. I'm not sure why your undo wasn't turned off.

In any case, I explicitly disabled undo in the buffer with the patch below
(which I installed in the 22 branch).


        Stefan


--- pcvs.el	23 jui 2007 01:28:44 -0400	1.98.2.3
+++ pcvs.el	23 jui 2007 21:05:47 -0400	
@@ -396,7 +396,9 @@
       (set (make-local-variable 'cvs-buffer) cvs-buf)
       ;;(cvs-minor-mode 1)
       (let ((lbd list-buffers-directory))
-	(if (fboundp mode) (funcall mode) (fundamental-mode))
+	(if (fboundp mode) (funcall mode)
+          (fundamental-mode)
+          (buffer-disable-undo))
 	(when lbd (set (make-local-variable 'list-buffers-directory) lbd)))
       (cvs-minor-mode 1)
       ;;(set (make-local-variable 'cvs-buffer) cvs-buf)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undo info for *cvs-tmp*
  2007-07-23 21:22 undo info for *cvs-tmp* Dan Nicolaescu
  2007-07-24  1:09 ` Stefan Monnier
@ 2007-07-24 16:45 ` Richard Stallman
  1 sibling, 0 replies; 13+ messages in thread
From: Richard Stallman @ 2007-07-24 16:45 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

    Not sure what is the right solution here, completely disable undo for
    *cvs-tmp* or up the limit. Can somebody please take a look at this? 

What is the *cvs-tmp* buffer?  I have done some checkins with VC
recently and they did not create a *cvs-tmp* buffer.

Anyway, if the code which uses that buffer does not itself need the
undo data structure, I think the best solution is to turn off undo in
that buffer.  I doubt that it is important to support undo by users
in a buffer that exists for internal purposes.

Can someone please DTRT then ack?
If the problem exists in Emacs 22, please put the change in Emacs 22
as well as the trunk.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undo info for *cvs-tmp*
  2007-07-24  1:09 ` Stefan Monnier
@ 2007-07-24 18:29   ` Reiner Steib
  2007-07-24 19:34     ` Stefan Monnier
  2007-07-24 19:33   ` undo info for *cvs-tmp* Stefan Monnier
  1 sibling, 1 reply; 13+ messages in thread
From: Reiner Steib @ 2007-07-24 18:29 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Dan Nicolaescu, emacs-devel

On Tue, Jul 24 2007, Stefan Monnier wrote:

> The buffer name is " *cvs-tmp*" by default, so the leading space should turn
> off undo, i.e. I'm not sure why your undo wasn't turned off.
>
> In any case, I explicitly disabled undo in the buffer with the patch below

IIRC, I saw a message about undo in "*cvs-diff*" too.  Shouldn't undo
be disabled there as well?

I think the message appeared after diffing a large file (several MB)
where all the line endings have been messed up inadvertently (\r\n ->
\r\r\n).  If it's useful, I will try to reproduce the problem.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undo info for *cvs-tmp*
  2007-07-24  1:09 ` Stefan Monnier
  2007-07-24 18:29   ` Reiner Steib
@ 2007-07-24 19:33   ` Stefan Monnier
  2007-07-24 20:40     ` Dan Nicolaescu
  1 sibling, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2007-07-24 19:33 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

>> Not sure what is the right solution here, completely disable undo for
>> *cvs-tmp* or up the limit. Can somebody please take a look at this? 

> Thanks.
> The buffer name is " *cvs-tmp*" by default, so the leading space should turn
> off undo, i.e. I'm not sure why your undo wasn't turned off.

> In any case, I explicitly disabled undo in the buffer with the patch below
> (which I installed in the 22 branch).

Actually, this patch was redundant because the code that follows also should
turn off undo logging in that buffer (because `normal' should be nil).

"Redundant" implies that it probably won't fix your problem.  Can you try
and give us more info as to how to reproduce the problem?


        Stefan

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undo info for *cvs-tmp*
  2007-07-24 18:29   ` Reiner Steib
@ 2007-07-24 19:34     ` Stefan Monnier
  2007-07-24 21:28       ` undo info for `*cvs-diff*' (was: undo info for *cvs-tmp*) Reiner Steib
  0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2007-07-24 19:34 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

>> The buffer name is " *cvs-tmp*" by default, so the leading space should turn
>> off undo, i.e. I'm not sure why your undo wasn't turned off.
>> 
>> In any case, I explicitly disabled undo in the buffer with the patch below

> IIRC, I saw a message about undo in "*cvs-diff*" too.  Shouldn't undo
> be disabled there as well?

Hmm... IIRC undo *is* disabled there while building the buffer and is later
re-enabled (since diff-mode does support editing in various ways).

So please give us more info as to how to reproduce the problem.


        Stefan

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undo info for *cvs-tmp*
  2007-07-24 19:33   ` undo info for *cvs-tmp* Stefan Monnier
@ 2007-07-24 20:40     ` Dan Nicolaescu
  2007-07-24 22:03       ` Stefan Monnier
  0 siblings, 1 reply; 13+ messages in thread
From: Dan Nicolaescu @ 2007-07-24 20:40 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

  > >> Not sure what is the right solution here, completely disable undo for
  > >> *cvs-tmp* or up the limit. Can somebody please take a look at this? 
  > 
  > > Thanks.
  > > The buffer name is " *cvs-tmp*" by default, so the leading space should turn
  > > off undo, i.e. I'm not sure why your undo wasn't turned off.
  > 
  > > In any case, I explicitly disabled undo in the buffer with the patch below
  > > (which I installed in the 22 branch).
  > 
  > Actually, this patch was redundant because the code that follows also should
  > turn off undo logging in that buffer (because `normal' should be nil).
  > 
  > "Redundant" implies that it probably won't fix your problem.  Can you try
  > and give us more info as to how to reproduce the problem?

emacs -Q
M-x cvs-status RET ~/src/emacs/lisp RET
C-x b  *cvs-tmp* RET
C-h v buffer-undo-list RET
buffer-undo-list is a variable defined in `C source code'.
Its value is nil
Local in buffer  *cvs-tmp*; global value is nil
Automatically becomes buffer-local when set in any fashion.

I think the value is expected to be t not nil... 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* undo info for `*cvs-diff*' (was: undo info for *cvs-tmp*)
  2007-07-24 19:34     ` Stefan Monnier
@ 2007-07-24 21:28       ` Reiner Steib
  2007-07-25  4:48         ` undo info for `*cvs-diff*' Stefan Monnier
  0 siblings, 1 reply; 13+ messages in thread
From: Reiner Steib @ 2007-07-24 21:28 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Dan Nicolaescu, emacs-devel

On Tue, Jul 24 2007, Stefan Monnier wrote:

> Hmm... IIRC undo *is* disabled there while building the buffer and is later
> re-enabled (since diff-mode does support editing in various ways).
>
> So please give us more info as to how to reproduce the problem.

Here's a recipe:

- On the shell, create a very large diff, e.g.:

  cvs update gnus.texi
  cp -p gnus.texi /tmp/

  Make sure, that you don't have any valuable changes in gnus.texi!

  cat calc.texi calc.texi calc.texi > gnus.texi

- emacs -Q -f cvs-update

- In Emacs, hit RET.  Move point to gnus.texi and hit `='.

- On the shell:

  rm gnus.texi
  cvs update gnus.texi

- In Emacs, again do `=' on gnus.texi

==> Undo warning appears:

,----[ *Warnings* ]
| Warning (undo): Buffer `*cvs-diff*' undo info was 5641808 bytes long.
| The undo info was discarded because it exceeded `undo-outer-limit'.
| [...]
`----

- Restore gnus.texi

  cp -p /tmp/gnus.texi .

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undo info for *cvs-tmp*
  2007-07-24 20:40     ` Dan Nicolaescu
@ 2007-07-24 22:03       ` Stefan Monnier
  2007-07-24 22:16         ` Dan Nicolaescu
  2007-07-25 15:02         ` Richard Stallman
  0 siblings, 2 replies; 13+ messages in thread
From: Stefan Monnier @ 2007-07-24 22:03 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

> emacs -Q
> M-x cvs-status RET ~/src/emacs/lisp RET
> C-x b  *cvs-tmp* RET
> C-h v buffer-undo-list RET
> buffer-undo-list is a variable defined in `C source code'.
> Its value is nil
> Local in buffer  *cvs-tmp*; global value is nil
> Automatically becomes buffer-local when set in any fashion.

> I think the value is expected to be t not nil... 

That might be right.  But nil is still far from "too big".


        Stefan

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undo info for *cvs-tmp*
  2007-07-24 22:03       ` Stefan Monnier
@ 2007-07-24 22:16         ` Dan Nicolaescu
  2007-07-25 15:02         ` Richard Stallman
  1 sibling, 0 replies; 13+ messages in thread
From: Dan Nicolaescu @ 2007-07-24 22:16 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

  > > emacs -Q
  > > M-x cvs-status RET ~/src/emacs/lisp RET
  > > C-x b  *cvs-tmp* RET
  > > C-h v buffer-undo-list RET
  > > buffer-undo-list is a variable defined in `C source code'.
  > > Its value is nil
  > > Local in buffer  *cvs-tmp*; global value is nil
  > > Automatically becomes buffer-local when set in any fashion.
  > 
  > > I think the value is expected to be t not nil... 
  > 
  > That might be right.  But nil is still far from "too big".

OK, here's a complete recipe:

emacs -Q
M-x cvs-status RET ~/src/emacs/ RET
then place the cursor over one of the files that is in the 
"Needs update"  state, and press: O

I get the *cvs-tmp* after that. 
(In may case the file was etc/ChangeLog, but I don't think it matters)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undo info for `*cvs-diff*'
  2007-07-24 21:28       ` undo info for `*cvs-diff*' (was: undo info for *cvs-tmp*) Reiner Steib
@ 2007-07-25  4:48         ` Stefan Monnier
  2007-07-25 16:53           ` Dan Nicolaescu
  0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2007-07-25  4:48 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

> ,----[ *Warnings* ]
> | Warning (undo): Buffer `*cvs-diff*' undo info was 5641808 bytes long.
> | The undo info was discarded because it exceeded `undo-outer-limit'.
> | [...]
> `----

I believe I know what was causing this trouble.  Can you try the
patch below which I just installed in the 22 branch?


        Stefan


--- pcvs.el	25 jui 2007 00:41:22 -0400	1.98.2.4
+++ pcvs.el	25 jui 2007 00:43:49 -0400	
@@ -392,17 +392,18 @@
     (with-current-buffer buf
       (setq buffer-read-only nil)
       (setq default-directory dir)
-      (unless nosetup (erase-buffer))
+      (unless nosetup
+        (buffer-disable-undo)
+        (erase-buffer))
       (set (make-local-variable 'cvs-buffer) cvs-buf)
       ;;(cvs-minor-mode 1)
       (let ((lbd list-buffers-directory))
-	(if (fboundp mode) (funcall mode)
-          (fundamental-mode)
-          (buffer-disable-undo))
+	(if (fboundp mode) (funcall mode) (fundamental-mode))
 	(when lbd (set (make-local-variable 'list-buffers-directory) lbd)))
       (cvs-minor-mode 1)
       ;;(set (make-local-variable 'cvs-buffer) cvs-buf)
-      (unless normal
+      (if normal
+          (buffer-enable-undo)
 	(setq buffer-read-only t)
 	(buffer-disable-undo))
       buf)))

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undo info for *cvs-tmp*
  2007-07-24 22:03       ` Stefan Monnier
  2007-07-24 22:16         ` Dan Nicolaescu
@ 2007-07-25 15:02         ` Richard Stallman
  1 sibling, 0 replies; 13+ messages in thread
From: Richard Stallman @ 2007-07-25 15:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: dann, emacs-devel

    > I think the value is expected to be t not nil... 

    That might be right.  But nil is still far from "too big".

t means "don't record undo info".  nil means "do record undo info, but
there isn't any yet."  So if it gets set to nil instead of t, that
will cause the unwanted recording of potentially large undo info.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undo info for `*cvs-diff*'
  2007-07-25  4:48         ` undo info for `*cvs-diff*' Stefan Monnier
@ 2007-07-25 16:53           ` Dan Nicolaescu
  0 siblings, 0 replies; 13+ messages in thread
From: Dan Nicolaescu @ 2007-07-25 16:53 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

  > > ,----[ *Warnings* ]
  > > | Warning (undo): Buffer `*cvs-diff*' undo info was 5641808 bytes long.
  > > | The undo info was discarded because it exceeded `undo-outer-limit'.
  > > | [...]
  > > `----
  > 
  > I believe I know what was causing this trouble.  Can you try the
  > patch below which I just installed in the 22 branch?
  >
  > 
  >         Stefan
  > 
  > 
  > --- pcvs.el	25 jui 2007 00:41:22 -0400	1.98.2.4
  > +++ pcvs.el	25 jui 2007 00:43:49 -0400	
  > @@ -392,17 +392,18 @@
  >      (with-current-buffer buf
  >        (setq buffer-read-only nil)
  >        (setq default-directory dir)
  > -      (unless nosetup (erase-buffer))
  > +      (unless nosetup
  > +        (buffer-disable-undo)
  > +        (erase-buffer))
  >        (set (make-local-variable 'cvs-buffer) cvs-buf)
  >        ;;(cvs-minor-mode 1)
  >        (let ((lbd list-buffers-directory))
  > -	(if (fboundp mode) (funcall mode)
  > -          (fundamental-mode)
  > -          (buffer-disable-undo))
  > +	(if (fboundp mode) (funcall mode) (fundamental-mode))
  >  	(when lbd (set (make-local-variable 'list-buffers-directory) lbd)))
  >        (cvs-minor-mode 1)
  >        ;;(set (make-local-variable 'cvs-buffer) cvs-buf)
  > -      (unless normal
  > +      (if normal
  > +          (buffer-enable-undo)
  >  	(setq buffer-read-only t)
  >  	(buffer-disable-undo))
  >        buf)))

Applying it to HEAD makes the problem disappear for me.

Thanks!

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-07-25 16:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-23 21:22 undo info for *cvs-tmp* Dan Nicolaescu
2007-07-24  1:09 ` Stefan Monnier
2007-07-24 18:29   ` Reiner Steib
2007-07-24 19:34     ` Stefan Monnier
2007-07-24 21:28       ` undo info for `*cvs-diff*' (was: undo info for *cvs-tmp*) Reiner Steib
2007-07-25  4:48         ` undo info for `*cvs-diff*' Stefan Monnier
2007-07-25 16:53           ` Dan Nicolaescu
2007-07-24 19:33   ` undo info for *cvs-tmp* Stefan Monnier
2007-07-24 20:40     ` Dan Nicolaescu
2007-07-24 22:03       ` Stefan Monnier
2007-07-24 22:16         ` Dan Nicolaescu
2007-07-25 15:02         ` Richard Stallman
2007-07-24 16:45 ` Richard Stallman

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.