all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: Re: An idea: combine-change-calls
Date: Wed, 28 Mar 2018 20:42:54 +0000	[thread overview]
Message-ID: <20180328204254.GC6592@ACM> (raw)
In-Reply-To: <jwvin9hqnhz.fsf-monnier+emacs@gnu.org>

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).



  reply	other threads:[~2018-03-28 20:42 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-24 13:50 An idea: combine-change-calls Alan Mackenzie
2018-03-24 22:18 ` Stefan Monnier
2018-03-25 19:14   ` Alan Mackenzie
2018-03-25 20:05     ` Stefan Monnier
2018-03-26 20:17       ` Alan Mackenzie
2018-03-26 21:07         ` Stefan Monnier
2018-03-27 16:58           ` Alan Mackenzie
2018-03-27 18:30             ` Stefan Monnier
2018-03-27 19:45               ` Alan Mackenzie
2018-03-27 20:24                 ` Stefan Monnier
2018-03-28 20:42                   ` Alan Mackenzie [this message]
2018-03-28 21:26                     ` Stefan Monnier
2018-03-29 15:10                       ` Alan Mackenzie
2018-03-29 15:40                         ` Stefan Monnier
2018-03-29 17:11                           ` Alan Mackenzie
2018-03-29 19:10                             ` Stefan Monnier
2018-03-30 11:46                               ` Alan Mackenzie
2018-03-30 15:05                                 ` Stefan Monnier
2018-03-31 21:00                                   ` Alan Mackenzie
2018-03-31 23:38                                     ` Stefan Monnier
2018-04-01 14:24                                       ` Alan Mackenzie
2018-04-01 19:22                                         ` Stefan Monnier
2018-03-30  9:12           ` Johan Bockgård
2018-03-30 13:04             ` Stefan Monnier
2018-04-02 16:25               ` Alan Mackenzie
2018-04-02 17:52                 ` Johan Bockgård
2018-04-03  0:41                 ` Stefan Monnier
2018-04-03  1:43                 ` Clément Pit-Claudel
2018-04-03  3:15                 ` Richard Stallman
2018-03-26 21:09         ` Stefan Monnier
2018-03-27  0:36         ` Stefan Monnier
2018-03-27 17:00           ` Alan Mackenzie

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=20180328204254.GC6592@ACM \
    --to=acm@muc.de \
    --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.