From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: Stefan Monnier <monnier+gnu/emacs@rum.cs.yale.edu>
Subject: Re: 4 minor suggestions for files.el
Date: Mon, 05 May 2003 10:57:34 -0400 [thread overview]
Message-ID: <200305051457.h45EvYlA007032@rum.cs.yale.edu> (raw)
In-Reply-To: E19Ch1W-0000qu-00@fencepost.gnu.org
> > I think that the correct way for check-in and update to interact with
> > M-x undo is to transpose the old undo list somehow to the buffer as it
> > has been updated.
>
> That's what undo-in-region does.
>
> undo-in-region does a special case of this. It does not handle the
> generality that would be needed for this, and I think that would require
> new methods.
Sure, it's not quite the same, but I use it to get the desired result.
> > Likewise, if I edit the buffer and then do a CVS update, I should
> > then be able to undo the edit I made, but not the changes made by
> > the CVS update.
>
> Why not ?
>
> When you do a CVS update, you don't know what changes are getting
> merged in. You often don't see them; they are in parts of the file
> where you have not been working.
>
> If a single undo operation would undo all of them, you would lose
> them and not know what you are losing. That is risky and not the
> right interface.
>
> In order for undo in Emacs to operate in a predictable and reliable
> way, it should undo the changes that you made with your editing. If
> you want to undo the changes that came from CVS, that should be a
> separate command, designed to coordinate with CVS. What I have in
> mind is a command to take out the changes that were made between a
> certain pair of versions.
CVS generally doesn't know: the local file generally has local
modifications (otherwise, there's generally no interesting undo log
to worry about) so the merge done by `cvs update' is not the same
as the change recorded in the repository.
Also, most of the time that I use such an undo, it's only to temporarily
take a look at a previous state of the buffer: I virtually never
want to save the file with the change undone. The only exception
is when I want to undo (in the repository) a change I installed
recently, but I rarely if ever use Emacs undo for it (I use `cvs diff'
and reverse-apply the patch, instead).
I.e. in my experience, undoing the revert (rather than only undoing changes
done before the revert) never hurts and is sometimes useful. I see
cases where your refinement (i.e. adjusting the "before revert" undo
log so it applies to the "after revert" buffer) can be marginally better,
but I doubt it's worth the effort, especially since it prevents the
user from undoing the revert itself which can also be something she wants
to do.
Stefan
next prev parent reply other threads:[~2003-05-05 14:57 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-14 20:22 4 minor suggestions for files.el Stefan Monnier
2003-04-15 19:14 ` Kai Großjohann
2003-04-15 20:16 ` Kevin Rodgers
2003-04-16 4:40 ` Richard Stallman
2003-04-17 21:39 ` Stefan Monnier
2003-04-18 11:28 ` Richard Stallman
2003-04-18 13:24 ` Andre Spiegel
2003-04-18 14:23 ` Stefan Monnier
2003-04-18 14:36 ` Andre Spiegel
2003-04-18 14:40 ` Stefan Monnier
2003-04-19 19:11 ` Stefan Monnier
2003-04-22 0:45 ` Richard Stallman
2003-04-19 13:35 ` Richard Stallman
2003-04-29 21:07 ` Stefan Monnier
2003-05-05 14:32 ` Richard Stallman
2003-05-05 14:52 ` Andre Spiegel
2003-05-06 10:14 ` Richard Stallman
2003-05-06 10:56 ` Andre Spiegel
2003-05-07 11:51 ` Richard Stallman
2003-05-07 12:31 ` Andre Spiegel
2003-05-07 14:26 ` Stefan Monnier
2003-05-09 11:20 ` Richard Stallman
2003-05-06 13:00 ` Stefan Monnier
2003-05-07 11:50 ` Richard Stallman
2003-05-05 14:57 ` Stefan Monnier [this message]
2003-05-06 10:14 ` Richard Stallman
2003-05-06 12:54 ` Stefan Monnier
2003-05-07 11:50 ` Richard Stallman
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=200305051457.h45EvYlA007032@rum.cs.yale.edu \
--to=monnier+gnu/emacs@rum.cs.yale.edu \
/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.