[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: An idea: combine-change-calls
From: |
Alan Mackenzie |
Subject: |
Re: An idea: combine-change-calls |
Date: |
Wed, 28 Mar 2018 20:42:54 +0000 |
User-agent: |
Mutt/1.7.2 (2016-11-26) |
Hello, Stefan.
On Tue, Mar 27, 2018 at 16:24:28 -0400, Stefan Monnier wrote:
> >> See http://elpa.gnu.org/packages/undo-tree.html
> > Interesting. But I think it would be overkill for me personally.
> The point is not to make you use it, but that this package uses the same
> buffer-undo-list, so any change to the format would break it.
It would need amendment, of course, but that wouldn't be difficult. But
I suspect that the mechanism you suggested (an `apply' format element
recursively calling primitive-undo), will break other packages too, even
if the format of undo lists isn't changed. We'd have to try it out.
> > I really don't want to do this [combining all the undo elements into
> > a single undo element]. Some people will want to analyse
> > buffer-undo-list and such a replacement will throw off this
> > analysis, possibly to the extent of making it useless.
> How/why? I can't think of any case where it would cause such problems:
> the resulting undo-list, tho less detailed than the original one, is
> perfectly valid.
You put it most eloquently yourself in Subject: Re: What improvements
would be truly useful? Date: Thu, 08 Mar 2018 23:43:57 -0500:
Of course Emacs can also hide information (as text-properties, as
invisible text, as data stored in buffer-local variables, ...) but most
packages follow a design where as little info as possible is hidden.
Indeed, whenever I hide such information, I think it over many times
because I know there's a very strong chance that users won't like it.
What we've been discussing goes beyond hiding information, it is the
destruction of information. Users, maybe just a few, won't like that at
all.
Incidentally, position elements in the undo list don't work: `undo'
removes them from buffer-undo-list. I think you amended that bit of
code some years ago. Can you say why this is done? The comment in the
code:
;; Don't specify a position in the undo record for the undo command.
;; Instead, undoing this should move point to where the change is.
doesn't give any reason, and the various pertinent commit messages
aren't any help either.
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
- An idea: combine-change-calls, Alan Mackenzie, 2018/03/24
- Re: An idea: combine-change-calls, Stefan Monnier, 2018/03/24
- Re: An idea: combine-change-calls, Alan Mackenzie, 2018/03/25
- Re: An idea: combine-change-calls, Stefan Monnier, 2018/03/25
- Re: An idea: combine-change-calls, Alan Mackenzie, 2018/03/26
- Re: An idea: combine-change-calls, Stefan Monnier, 2018/03/26
- Re: An idea: combine-change-calls, Alan Mackenzie, 2018/03/27
- Re: An idea: combine-change-calls, Stefan Monnier, 2018/03/27
- Re: An idea: combine-change-calls, Alan Mackenzie, 2018/03/27
- Re: An idea: combine-change-calls, Stefan Monnier, 2018/03/27
- Re: An idea: combine-change-calls,
Alan Mackenzie <=
- Re: An idea: combine-change-calls, Stefan Monnier, 2018/03/28
- Re: An idea: combine-change-calls, Alan Mackenzie, 2018/03/29
- Re: An idea: combine-change-calls, Stefan Monnier, 2018/03/29
- Re: An idea: combine-change-calls, Alan Mackenzie, 2018/03/29
- Re: An idea: combine-change-calls, Stefan Monnier, 2018/03/29
- Re: An idea: combine-change-calls, Alan Mackenzie, 2018/03/30
- Re: An idea: combine-change-calls, Stefan Monnier, 2018/03/30
- Re: An idea: combine-change-calls, Alan Mackenzie, 2018/03/31
- Re: An idea: combine-change-calls, Stefan Monnier, 2018/03/31
- Re: An idea: combine-change-calls, Johan Bockgård, 2018/03/30