[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C-x C-q more useful as toggle-read-only
From: |
Michael J Downes |
Subject: |
Re: C-x C-q more useful as toggle-read-only |
Date: |
24 Oct 2000 10:21:21 -0400 |
Klaus.Berndl@sdm.de (Klaus Berndl) writes:
> If a file is under version control IMHO toggle-read-only makes no sense,
> in such a case your options are to check out, uncheckout or check in.
...
> I'm wondering in which respect the current behavior of
> *vc-toggle-read-only* doesn't satisfy some people??
Here is an example:
On Tuesday I check out foo.bar in module A and begin making some
changes. On Wednesday I get called away to some other tasks. On Friday I
remember that I was working on something in the module A but can't
recall which file so I start looking at some files with
find-file-read-only. (It is not uncommon for me to use
find-file-read-only when I am not sure that I will be changing the
file.) When I find foo.bar I say "Aha, yes, this is where I was
working". The file is already checked out and writable, but the buffer
is read only because of the command that I used to get the file.
Now given that I have the file in front of my eyes, what is the most
direct way to continue working on it? toggle-read-only. But if I do C-x
C-q I get instead vc-toggle-read-only whose default action in this case
is to *ask if I want to revert to the master version*!?!
If I say "no", nothing happens---and I still cannot work on the file.
Since I learned eventually that there did exist a plain toggle-read-only
command I can run it by hand with M-x, but this hardly seems like a good
solution for relatively new users who may well be unaware that this is
possible unless someone explicitly points it out to them.
Even worse, if I am in a hurry or tired or just not paying attention and
somehow answer "yes" instead of "no", *all of my changes are rather
thoroughly lost* since they are not in the master file yet and
version-controlled files don't normally have a backup file (not to
mention that in this sequence even if there were a backup file it would
be quite likely to include either none of the recent changes or only
part of them).
This kind of thing happened to me often enough that I changed the
binding for C-x C-q. So it's not a problem for me any more. But I think
the current default is rather dangerously bad for new users.
It might be worth considering to make vc-toggle-read-only smarter so it
does something more cautious in the above scenario (also: toggle
view-mode if I entered the file with "v" from a dired buffer and the
file is currently checked out/writable).
But in general it seems to me automatically doing version control
operations without confirmation violates the principle of least
surprise; therefore it should be an expert option rather than the
default behavior.
- Re: C-x C-q more useful as toggle-read-only, Jari Aalto+mail.emacs, 2000/10/22
- RE: C-x C-q more useful as toggle-read-only, Mickey Ferguson, 2000/10/23
- Re: C-x C-q more useful as toggle-read-only, Paul D. Smith, 2000/10/23
- Re: C-x C-q more useful as toggle-read-only, Eli Zaretskii, 2000/10/24
- Re: C-x C-q more useful as toggle-read-only, Klaus Berndl, 2000/10/24
- Re: C-x C-q more useful as toggle-read-only,
Michael J Downes <=
- Re: C-x C-q more useful as toggle-read-only, Klaus Berndl, 2000/10/24
- Re: C-x C-q more useful as toggle-read-only, Eli Zaretskii, 2000/10/24
- Re: C-x C-q more useful as toggle-read-only, Michael John Downes, 2000/10/24
- Re: C-x C-q more useful as toggle-read-only, Klaus Berndl, 2000/10/25
- Re: C-x C-q more useful as toggle-read-only, Eli Zaretskii, 2000/10/25
- Re: C-x C-q more useful as toggle-read-only, Francesco Potorti`, 2000/10/25
- Re: C-x C-q more useful as toggle-read-only, Klaus Berndl, 2000/10/25
- Re: C-x C-q more useful as toggle-read-only, Andre Spiegel, 2000/10/26
- Re: C-x C-q more useful as toggle-read-only, Michael J Downes, 2000/10/26
- Re: C-x C-q more useful as toggle-read-only, Eli Zaretskii, 2000/10/26