all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Cc: Phillip Lord <phillip.lord@newcastle.ac.uk>
Subject: Re: [Emacs-diffs] fix/no-undo-boundary-on-secondary-buffer-change e5ff575 2/2: Add a timer to ensure undo-boundaries in buffers.
Date: Sat, 29 Aug 2015 23:30:13 -0400	[thread overview]
Message-ID: <jwvio7xsbga.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <E1ZSik4-000326-4S@vcs.savannah.gnu.org> (Phillip Lord's message of "Fri, 21 Aug 2015 09:36:08 +0000")

> +(defun undo-ensure-boundary ()
> +  "Add an `undo-boundary' if `buffer-undo-list' is long.
> +
> +Return t if an undo boundary has been added.
> +
> +Normally, Emacs will only garbage collect data from
> +`buffer-undo-list' when this list is longer than `undo-limit'. It
> +then collects data from after the first `undo-boundary' after
> +`undo-limit'. If there are no boundaries in the list,
> +`buffer-undo-list' will grow until it reaches
> +`undo-outer-limit' (by default a much larger value than
> +`undo-limit'), when it will discard the data anyway. In this
> +case, however, it is treated as an exceptional case, and the a
> +warning is signalled.
> +
> +This function add an `undo-boundary' to `buffer-undo-list' if
> +there is no other `undo-boundary', and `buffer-undo-list' is
> +longer than `undo-limit'. It provides a useful default mechanism
> +for adding an `undo-boundary' which retains data where possible,
> +without signalling warnings to the user."

I think this makes sense, but we should do it in the GC code, then.


        Stefan



       reply	other threads:[~2015-08-30  3:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150821093606.11577.60349@vcs.savannah.gnu.org>
     [not found] ` <E1ZSik4-000326-4S@vcs.savannah.gnu.org>
2015-08-30  3:30   ` Stefan Monnier [this message]
2015-09-01 12:24     ` [Emacs-diffs] fix/no-undo-boundary-on-secondary-buffer-change e5ff575 2/2: Add a timer to ensure undo-boundaries in buffers Phillip Lord
2015-09-01 16:16       ` Stefan Monnier
2015-09-01 17:19         ` Phillip Lord
2015-09-06 23:03           ` Stefan Monnier
2015-09-14 14:41             ` RFM: How to make a buffer-local var in C layer Phillip Lord
2015-09-15  1:48               ` Stefan Monnier
2015-09-15 12:08                 ` Phillip Lord
2015-09-15 14:18                   ` Stefan Monnier
2015-09-15 14:20                   ` Stefan Monnier
2015-09-15 15:27                     ` Phillip Lord

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=jwvio7xsbga.fsf-monnier+emacsdiffs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=phillip.lord@newcastle.ac.uk \
    /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.