Thread View: gnu.emacs.bug
3 messages
3 total messages
Started by Gary_M_Selzer
Wed, 23 Dec 1992 17:36
suggestion for new emacs feature: spatial undo
Author: Gary_M_Selzer
Date: Wed, 23 Dec 1992 17:36
Date: Wed, 23 Dec 1992 17:36
10 lines
910 bytes
910 bytes
Spatial undo would undo changes in order of decreasing spatial proximity to point. I think this would be an unusual and useful feature. I have not thought about how to implement this (it might be a research project.) I am unsure where to send this suggestion; the Emacs 18.57 DISTRIB file invites suggestions for improvement but does not tell where to send them. I am mailing this suggestion to bug-gnu-emacs@prep.ai.mit.edu as listed in DISTRIB.
suggestion for new emacs feature: spatial undo
Author: Francesco Potorti`
Date: Thu, 07 Jan 1993 17:55
Date: Thu, 07 Jan 1993 17:55
10 lines
890 bytes
890 bytes
Spatial undo would undo changes in order of decreasing spatial proximity to point. Great!!! I often find myself wanting to undo some changes after having done some more in other places of the file. If just someone knew how to implement this ... Francesco Potorti` | pot@cnuce.cnr.IT (Internet) | 39369::pot (DECnet) | +39-50-593203 (voice)
Re: suggestion for new emacs feature: spatial undo
Author: John X. Laporta
Date: Mon, 11 Jan 1993 21:41
Date: Mon, 11 Jan 1993 21:41
46 lines
2625 bytes
2625 bytes
In article <m0n9zZf-0001E5C@fly.cnuce.cnr.IT> pot@fly.cnuce.cnr.it (Francesco Potorti`) writes:
Spatial undo would undo changes in order of decreasing spatial
proximity to point.
Great!!! I often find myself wanting to undo some changes after
having done some more in other places of the file. If just someone
knew how to implement this ...
Try apollo_tmlib_csm_src.tar.Z on on contrib at export.lcs.mit.edu.
The history object supports undo redo.
The member functions of the history object as written enforce a protocol
in which history of of undone operations is removed when a new operation
is recorded in history. But there are many other possible protocols that
could be handled through history::add_molecule().
The history object uses a circular buffer a certain size to record history;
this resembles the operation of the history command in UNIX. However, there
is a call to change the size of the circular buffer. Using this call
you should be able to expand the size of the array whenver it fills up.
This would allow you to retain history information about all operations
in a session.
There is a thornier problem with what you propose. If later operations were
dependent on earlier operations that I have undone, what is the status or
meaning of the later operations? If there are dependencies like this,
probably the later operations are no longer valid after the undo of the
previous operations. So I suggest either a rigorously modular
architecture for the operations (including lots of copying of data rather
than recording of a pointer argument) OR giving up the idea of saving the
history of the later operations once the earlier operations have been
undone.
One practical difficulty remains. The history object always "undoes" the
last recorded operation. It always "redoes" the last undone operation.
To do what you want there would have to be some capacity to browse the
history stack (with the eye or a program) so as to be able to choose
the appropriate operation to undo.
--
John X. Laporta
Technical Specialist
jxl@opl.com
TEL: (617) 965-0220 x 2579
FAX: (617) 965-7599
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads