* bug#2623: 23.0.91; File is under version-control; use C-x v v to check in/out
[not found] <xbaiy6vdsmeg.fsf@cam.ac.uk>
@ 2009-03-10 16:08 ` Stefan Monnier
2009-03-11 12:04 ` Leo
0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2009-03-10 16:08 UTC (permalink / raw
To: Leo; +Cc: emacs-pretest-bug, 2623
> File is under version-control; use C-x v v to check in/out
> This message is misleading if not wrong as most of the version control
> tools do not use read-only to indicate their status.
Check in/out used to be bound to C-x C-q (because back then, most of the
version control tools did use read-only to indicate their status), so
the above message is there to remind people who have C-x C-q hardcoded
in their fingers that maybe they really meant to type C-x v v.
BTW, why did you type C-x C-q? Is the file read-only?
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2623: 23.0.91; File is under version-control; use C-x v v to check in/out
2009-03-10 16:08 ` bug#2623: 23.0.91; File is under version-control; use C-x v v to check in/out Stefan Monnier
@ 2009-03-11 12:04 ` Leo
2009-03-11 14:55 ` Stefan Monnier
0 siblings, 1 reply; 10+ messages in thread
From: Leo @ 2009-03-11 12:04 UTC (permalink / raw
To: bug-gnu-emacs; +Cc: emacs-pretest-bug
On 2009-03-10 16:08 +0000, Stefan Monnier wrote:
>> File is under version-control; use C-x v v to check in/out
>> This message is misleading if not wrong as most of the version control
>> tools do not use read-only to indicate their status.
>
> Check in/out used to be bound to C-x C-q (because back then, most of the
> version control tools did use read-only to indicate their status), so
> the above message is there to remind people who have C-x C-q hardcoded
> in their fingers that maybe they really meant to type C-x v v.
Should this be changed in 21st?
> BTW, why did you type C-x C-q? Is the file read-only?
>
>
> Stefan
Sometimes I turn the file into read-only before showing to other people
in case they accidentally type something into it.
--
.: Leo :. [ sdl.web AT gmail.com ] .: I use Emacs :.
www.git-scm.com
git - the one true version control system
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2623: 23.0.91; File is under version-control; use C-x v v to check in/out
2009-03-11 12:04 ` Leo
@ 2009-03-11 14:55 ` Stefan Monnier
2009-03-11 16:06 ` Leo
0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2009-03-11 14:55 UTC (permalink / raw
To: Leo; +Cc: emacs-pretest-bug, bug-gnu-emacs, 2623
>>> File is under version-control; use C-x v v to check in/out
>>> This message is misleading if not wrong as most of the version control
>>> tools do not use read-only to indicate their status.
>> Check in/out used to be bound to C-x C-q (because back then, most of the
>> version control tools did use read-only to indicate their status), so
>> the above message is there to remind people who have C-x C-q hardcoded
>> in their fingers that maybe they really meant to type C-x v v.
> Should this be changed in 21st?
I do not understand what "21st" is referring to.
>> BTW, why did you type C-x C-q? Is the file read-only?
> Sometimes I turn the file into read-only before showing to other people
> in case they accidentally type something into it.
I see, so in this case we could probably avoid the message by being
a bit more clever (e.g. don't show the message if it's not the first
time C-x C-q is used in this buffer).
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2623: 23.0.91; File is under version-control; use C-x v v to check in/out
2009-03-11 14:55 ` Stefan Monnier
@ 2009-03-11 16:06 ` Leo
2009-03-12 0:39 ` Stefan Monnier
0 siblings, 1 reply; 10+ messages in thread
From: Leo @ 2009-03-11 16:06 UTC (permalink / raw
To: emacs-pretest-bug; +Cc: bug-gnu-emacs
On 2009-03-11 14:55 +0000, Stefan Monnier wrote:
>>>> File is under version-control; use C-x v v to check in/out
>>>> This message is misleading if not wrong as most of the version control
>>>> tools do not use read-only to indicate their status.
>>> Check in/out used to be bound to C-x C-q (because back then, most of the
>>> version control tools did use read-only to indicate their status), so
>>> the above message is there to remind people who have C-x C-q hardcoded
>>> in their fingers that maybe they really meant to type C-x v v.
>> Should this be changed in 21st?
>
> I do not understand what "21st" is referring to.
I mean '21st century'.
>>> BTW, why did you type C-x C-q? Is the file read-only?
>> Sometimes I turn the file into read-only before showing to other people
>> in case they accidentally type something into it.
>
> I see, so in this case we could probably avoid the message by being
> a bit more clever (e.g. don't show the message if it's not the first
> time C-x C-q is used in this buffer).
There is difference between turning the buffer into read-only and the
file on disk being read-only. VC backends depend on the latter for their
status based on my experience with RCS. So showing such a message does
not make sense when pressing C-x C-q. It might make sense when opening a
read-only file that is also under version control. But even this point
is mostly irrelevant since 75% of the vc-handled-backends, which
hopefully represent 99.9% users, need not such message.
I just recalled when I was beginning with vc. I did once foolishly
follow that message and wasted myself a few unhappy hours fixing the
consequences.
Just some thoughts.
> Stefan
--
.: Leo :. [ sdl.web AT gmail.com ] .: I use Emacs :.
www.git-scm.com
git - the one true version control system
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2623: 23.0.91; File is under version-control; use C-x v v to check in/out
2009-03-11 16:06 ` Leo
@ 2009-03-12 0:39 ` Stefan Monnier
2009-03-12 18:08 ` Leo
0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2009-03-12 0:39 UTC (permalink / raw
To: Leo; +Cc: emacs-pretest-bug, bug-gnu-emacs, 2623
>>>> BTW, why did you type C-x C-q? Is the file read-only?
>>> Sometimes I turn the file into read-only before showing to other people
>>> in case they accidentally type something into it.
>> I see, so in this case we could probably avoid the message by being
>> a bit more clever (e.g. don't show the message if it's not the first
>> time C-x C-q is used in this buffer).
> There is difference between turning the buffer into read-only and the
> file on disk being read-only. VC backends depend on the latter for their
> status based on my experience with RCS. So showing such a message does
No, actually VC did make buffers read-only based on the backend's status
rather than just based on the file's own read-onlyness. And C-x C-q was
used by many people as the main way to interact with VC (both to check
out and to check back in). I know it all sounds really odd seen from
today's point of view, but it still made sense in Emacs-21, which isn't
that old.
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2623: 23.0.91; File is under version-control; use C-x v v to check in/out
2009-03-12 0:39 ` Stefan Monnier
@ 2009-03-12 18:08 ` Leo
2011-07-11 13:57 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 10+ messages in thread
From: Leo @ 2009-03-12 18:08 UTC (permalink / raw
To: bug-gnu-emacs; +Cc: emacs-pretest-bug
On 2009-03-12 00:39 +0000, Stefan Monnier wrote:
>>>>> BTW, why did you type C-x C-q? Is the file read-only?
>>>> Sometimes I turn the file into read-only before showing to other people
>>>> in case they accidentally type something into it.
>>> I see, so in this case we could probably avoid the message by being
>>> a bit more clever (e.g. don't show the message if it's not the first
>>> time C-x C-q is used in this buffer).
>> There is difference between turning the buffer into read-only and the
>> file on disk being read-only. VC backends depend on the latter for their
>> status based on my experience with RCS. So showing such a message does
>
> No, actually VC did make buffers read-only based on the backend's
> status rather than just based on the file's own read-onlyness. And
> C-x C-q was used by many people as the main way to interact with VC
> (both to check out and to check back in). I know it all sounds really
> odd seen from today's point of view, but it still made sense in
> Emacs-21, which isn't that old.
The message is wrong when the underlying vc backend does not use such a
backward mechanism. However, toggle-read-only unconditionally show this
message.
This situation can be improved by a one line change:
--- /tmp/emacs/share/emacs/23.0.60/lisp/files.el.gz
+++ /tmp/buffer-content-32645B0g
@@ -4429,7 +4429,7 @@
(view-mode-enter))
(t (setq buffer-read-only (not buffer-read-only))
(force-mode-line-update)))
- (if (vc-backend buffer-file-name)
+ (if (memq (vc-backend buffer-file-name) '(RCS SCCS))
(message "%s" (substitute-command-keys
(concat "File is under version-control; "
"use \\[vc-next-action] to check in/out"))))))
Diff finished. Thu Mar 12 17:56:16 2009
I have no idea whether SCCS uses read-only mechanism tho. But it is
better to delete this 'message' from toggle-read-only. It looks out of
place and it is not even documented in the doc string.
I am curious how would C-x C-q have anything to do with vc. Even when
using RCS backend, it never is part of the work flow.
> Stefan
--
.: Leo :. [ sdl.web AT gmail.com ] .: I use Emacs :.
www.git-scm.com
git - the one true version control system
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2623: 23.0.91; File is under version-control; use C-x v v to check in/out
2009-03-12 18:08 ` Leo
@ 2011-07-11 13:57 ` Lars Magne Ingebrigtsen
2011-07-11 14:33 ` Dan Nicolaescu
0 siblings, 1 reply; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-11 13:57 UTC (permalink / raw
To: Leo; +Cc: 2623
Leo <sdl.web@gmail.com> writes:
> This situation can be improved by a one line change:
>
> --- /tmp/emacs/share/emacs/23.0.60/lisp/files.el.gz
> +++ /tmp/buffer-content-32645B0g
> @@ -4429,7 +4429,7 @@
> (view-mode-enter))
> (t (setq buffer-read-only (not buffer-read-only))
> (force-mode-line-update)))
> - (if (vc-backend buffer-file-name)
> + (if (memq (vc-backend buffer-file-name) '(RCS SCCS))
I think this change makes lots of sense, so I've installed it in Emacs
24.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2623: 23.0.91; File is under version-control; use C-x v v to check in/out
2011-07-11 13:57 ` Lars Magne Ingebrigtsen
@ 2011-07-11 14:33 ` Dan Nicolaescu
2011-07-11 14:40 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 10+ messages in thread
From: Dan Nicolaescu @ 2011-07-11 14:33 UTC (permalink / raw
To: Lars Magne Ingebrigtsen; +Cc: 2623, Leo
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> Leo <sdl.web@gmail.com> writes:
>
>> This situation can be improved by a one line change:
>>
>> --- /tmp/emacs/share/emacs/23.0.60/lisp/files.el.gz
>> +++ /tmp/buffer-content-32645B0g
>> @@ -4429,7 +4429,7 @@
>> (view-mode-enter))
>> (t (setq buffer-read-only (not buffer-read-only))
>> (force-mode-line-update)))
>> - (if (vc-backend buffer-file-name)
>> + (if (memq (vc-backend buffer-file-name) '(RCS SCCS))
>
> I think this change makes lots of sense, so I've installed it in Emacs
> 24.
It might be a good idea to used a named variable there instead of '(RCS SCCS)
so that other VC backends could add to it.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2623: 23.0.91; File is under version-control; use C-x v v to check in/out
2011-07-11 14:33 ` Dan Nicolaescu
@ 2011-07-11 14:40 ` Lars Magne Ingebrigtsen
2011-07-11 15:53 ` Dan Nicolaescu
0 siblings, 1 reply; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-11 14:40 UTC (permalink / raw
To: Dan Nicolaescu; +Cc: 2623, Leo
Dan Nicolaescu <dann@gnu.org> writes:
> It might be a good idea to used a named variable there instead of '(RCS SCCS)
> so that other VC backends could add to it.
I think that RCS and SCCS were the only ones where `C-x C-q' were used
to check out/check in (sort of) stuff you were working on. None of the
more modern Unixey VCs had the "check out" concept, as far as I know.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#2623: 23.0.91; File is under version-control; use C-x v v to check in/out
2011-07-11 14:40 ` Lars Magne Ingebrigtsen
@ 2011-07-11 15:53 ` Dan Nicolaescu
0 siblings, 0 replies; 10+ messages in thread
From: Dan Nicolaescu @ 2011-07-11 15:53 UTC (permalink / raw
To: Lars Magne Ingebrigtsen; +Cc: 2623, Leo
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> Dan Nicolaescu <dann@gnu.org> writes:
>
>> It might be a good idea to used a named variable there instead of '(RCS SCCS)
>> so that other VC backends could add to it.
>
> I think that RCS and SCCS were the only ones where `C-x C-q' were used
> to check out/check in (sort of) stuff you were working on. None of the
> more modern Unixey VCs had the "check out" concept, as far as I know.
There are others, not included in Emacs though.
Maybe `vc-checkout-model' can be used as a test here too...
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-07-11 15:53 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <xbaiy6vdsmeg.fsf@cam.ac.uk>
2009-03-10 16:08 ` bug#2623: 23.0.91; File is under version-control; use C-x v v to check in/out Stefan Monnier
2009-03-11 12:04 ` Leo
2009-03-11 14:55 ` Stefan Monnier
2009-03-11 16:06 ` Leo
2009-03-12 0:39 ` Stefan Monnier
2009-03-12 18:08 ` Leo
2011-07-11 13:57 ` Lars Magne Ingebrigtsen
2011-07-11 14:33 ` Dan Nicolaescu
2011-07-11 14:40 ` Lars Magne Ingebrigtsen
2011-07-11 15:53 ` Dan Nicolaescu
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.