[Top][All Lists]

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

Re: A new(?) warning of erase-buffer, which was not seen before.

From: Miles Bader
Subject: Re: A new(?) warning of erase-buffer, which was not seen before.
Date: Sat, 24 Mar 2007 11:41:50 +0900

martin rudalics <address@hidden> writes:
> You can't do that by simply scanning the buffer-undo-list and comparing
> positions.  If I recall correctly `erc-update-undo-list' doesn't even
> handle the simple case where the undo list records an insertion from A
> to B, and you want to insert a text from C to D where A < C and D < B.
> It would either modify both A and B or none of them.

For uses like erc and comint it hardly matters.  I don't know if it's
worth trying to support the general case.

In the case of comint, I'd actually like to try supporting a model where
the undo-list-updating is _not_ handled directly by the text modifying
code -- i.e. `insert/delete-without-undo' wouldn't work.  The reason is
that some text modification is done by various hook functions in comint,
and those are harder to control (e.g. they may be written by the user).

I don't think this is too much of a problem given the restrictions of
comint mode (where non-undoable and undoable modifications are separated
by a clear boundary).

To support this model in a more general manner I guess would require
primitive support (e.g., something like an `inhibit-undo' variable which
would cause primitives to adjust the undo list instead of recording undo


Is it true that nothing can be known?  If so how do we know this?  -Woody Allen

reply via email to

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