Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #14790

Re: Undo / Redo design pattern.

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.programming
Subject Re: Undo / Redo design pattern.
Date 2022-04-05 02:25 +0100
Organization A noiseless patient Spider
Message-ID <87fsms5njg.fsf@bsb.me.uk> (permalink)
References <7dd390a8-2947-43b7-af05-2ca9c5c3bfb4n@googlegroups.com> <69b65fe6-1c26-4288-9ad1-7d08f6ed0d97n@googlegroups.com> <8c77e04d-e729-4711-813c-67c9b0ee053fn@googlegroups.com>

Show all headers | View raw


Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:

> You need two stacks because after a series of undos, you have a series
> of redos.

This is just a random observation that might trigger something useful in
more complex situations...

Emacs has what I find to be a very useful refinement of undo/redo: it
can be limited to a region of the text.

Say I delete most of the quoted material in a reply (Emacs is my Usenet
client), and then make a few remarks at the end of the post, maybe doing
some undo or redo operations.  If I now realise I need some of the stuff
I delete for context, I can highlight the top of my reply and undo in
the selected region only.  The big delete will be undone, and I can then
do the more selective editing I now know I need.

-- 
Ben.

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Undo / Redo design pattern. Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2022-04-03 04:16 -0700
  Re: Undo / Redo design pattern. Öö Tiib <ootiib@hot.ee> - 2022-04-03 06:26 -0700
    Re: Undo / Redo design pattern. Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2022-04-03 13:32 -0700
  Re: Undo / Redo design pattern. Julio Di Egidio <julio@diegidio.name> - 2022-04-04 01:03 -0700
    Re: Undo / Redo design pattern. Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2022-04-04 01:49 -0700
      Re: Undo / Redo design pattern. Julio Di Egidio <julio@diegidio.name> - 2022-04-04 05:23 -0700
        Re: Undo / Redo design pattern. Julio Di Egidio <julio@diegidio.name> - 2022-04-04 06:02 -0700
          Re: Undo / Redo design pattern. Julio Di Egidio <julio@diegidio.name> - 2022-04-04 06:14 -0700
            Re: Undo / Redo design pattern. Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2022-04-04 06:38 -0700
              Re: Undo / Redo design pattern. Julio Di Egidio <julio@diegidio.name> - 2022-04-04 18:02 -0700
                Re: Undo / Redo design pattern. Julio Di Egidio <julio@diegidio.name> - 2022-04-04 18:08 -0700
          Re: Undo / Redo design pattern. Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2022-04-04 06:46 -0700
            Re: Undo / Redo design pattern. Julio Di Egidio <julio@diegidio.name> - 2022-04-04 17:59 -0700
      Re: Undo / Redo design pattern. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-04-05 02:25 +0100
        Re: Undo / Redo design pattern. Julio Di Egidio <julio@diegidio.name> - 2022-04-04 18:53 -0700
        Re: Undo / Redo design pattern. Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2022-04-05 02:03 -0700
  Re: Undo / Redo design pattern. Kristjan Robam <ya3891921@gmail.com> - 2022-04-04 04:04 -0700

csiph-web