From: Leo <sdl.web@gmail.com>
To: bug-gnu-emacs@gnu.org
Cc: emacs-pretest-bug@gnu.org
Subject: bug#2623: 23.0.91; File is under version-control; use C-x v v to check in/out
Date: Thu, 12 Mar 2009 18:08:22 +0000 [thread overview]
Message-ID: <xbai7i2usjft.fsf@cam.ac.uk> (raw)
In-Reply-To: jwvk56vlgta.fsf-monnier+emacsbugreports@gnu.org
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
next prev parent reply other threads:[~2009-03-12 18:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
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
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=xbai7i2usjft.fsf@cam.ac.uk \
--to=sdl.web@gmail.com \
--cc=2623@emacsbugs.donarmstrong.com \
--cc=bug-gnu-emacs@gnu.org \
--cc=emacs-pretest-bug@gnu.org \
/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.