all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: phillip.lord@russet.org.uk (Phillip Lord)
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] fix/no-undo-boundary-on-secondary-buffer-change f59d1be: Move undo amalgamation to lisp.
Date: Tue, 27 Oct 2015 12:45:22 +0000	[thread overview]
Message-ID: <87wpu8lbtp.fsf@russet.org.uk> (raw)
In-Reply-To: <jwv7fm9ttag.fsf-monnier+emacsdiffs@gnu.org> (Stefan Monnier's message of "Mon, 26 Oct 2015 13:56:37 -0400")

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

>> But, after self-insert-command, actually, undo-undoably-changed-buffers
>> tells all the buffers that were modified since the last time we added an
>> auto-boundary. This will only be the same as the buffers which have
>> changed as a result of self-insert-command iff
>> undo-undoably-changed-buffers was nil before the command. It need not be
>> if buffers are undoably-changing as a result of a timer or a process for
>> instance.
>
> Indeed, with process filters and such there's a real probability that
> this isn't the case.  I think we can avoid this problem by making
> self-insert-command explicitly call undo-auto-boundaries at its end.
>
>> My other concern is that after a self-insert-command, I can guarantee
>> that the current-buffer hasn't changed much (normally by one char). But,
>> for example, with lentic a self-insert-command in one buffer can in
>> worse case result in all the characters in another buffer changing.
>
> In the worst case self-insert-command can also change the whole buffer.
> So the worst case is not nearly as important as the "reasonably expectable
> cases".

In the case of lentic, the worst case is, unfortunately, not uncommon.
Original it happened every key press, not it is rare enough not to cause
noticable lag, but it is enough to add a lot of stuff into
buffer-undo-list.


>> So amalgamating these changes might result in a big buffer-undo-list.
>
> I don't see how/why the size of buffer-undo-list would be affected.

Oh, sorry, I mean, "big" in the sense of "big chunks between boundaries"
which in turn means "not open for GC".

Regardless, I've made the changes, and pushed them.

I have noticed one problem case. The *scratch* buffer is created without
an undo-boundary after the ";;; This buffer is..." message. I think this
is a bootstrap problem and can be fixed by adding an undo-boundary call
to startup.el.

Other than this, are these changes ready to go?

Phil



  reply	other threads:[~2015-10-27 12:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20151005134118.10933.50859@vcs.savannah.gnu.org>
     [not found] ` <E1Zj610-0002qx-SM@vcs.savannah.gnu.org>
2015-10-05 15:15   ` [Emacs-diffs] fix/no-undo-boundary-on-secondary-buffer-change f59d1be: Move undo amalgamation to lisp Stefan Monnier
2015-10-05 16:24     ` Phillip Lord
2015-10-07 19:28       ` Stefan Monnier
2015-10-08 19:56         ` Phillip Lord
2015-10-08 20:53           ` Stefan Monnier
2015-10-09  8:31             ` Phillip Lord
2015-10-16 21:02         ` Phillip Lord
2015-10-18 16:51           ` Stefan Monnier
2015-10-21 19:27             ` Phillip Lord
2015-10-26 17:56               ` Stefan Monnier
2015-10-27 12:45                 ` Phillip Lord [this message]
2015-10-27 14:50                   ` Stefan Monnier
2015-10-28 10:01                     ` Phillip Lord
2015-10-28 13:05                       ` Stefan Monnier
2015-10-29 14:44                         ` Phillip Lord
2015-10-29 15:47                           ` Stefan Monnier
2015-10-30  8:44                             ` Phillip Lord
2015-10-30 13:28                               ` Stefan Monnier
2015-10-30 14:21                                 ` David Kastrup
2015-11-02 16:56                                   ` Phillip Lord
2015-11-02 19:37                                     ` David Kastrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wpu8lbtp.fsf@russet.org.uk \
    --to=phillip.lord@russet.org.uk \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.