bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How am I supposed to make a buffer read-only?


From: Alan Mackenzie
Subject: How am I supposed to make a buffer read-only?
Date: 1 Jun 2002 17:19:13 +0200
Date: Sat, 1 Jun 2002 14:50:13 +0000
User-agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686))

Gnu Emacs 21.1

I just tried C-x C-q, and got the error message back: "/my/path/foo.el is
up-to-date" in the minibuffer.  [foo.el is a CVSed file.]

Bug:  The buffer remained writable.
[Possibly relevant:  the cvs server is at the other end of a modem
connection which wasn't up at the time, thankfully.]

A quick C-h k revealed that the normal, simple, sane, sensible binding
has been overridden by vc-toggle-read-only, a mis-named function if ever
there were one.  It seems to regard checking a file in as a perfectly
sensible "method" of making it's buffer read-only.  Ye Gods!

Is there really some semantic identity between changing the read-only
status of a buffer, and checking it's file about?  Damned if I can see
it.  Particularly when the version control system is CVS.  I thought it
was only commercial version control systems that were lazy/fascistic
enough to (ab)use files' read-only status to mark their check-outedness.

Checking a file in/out is one thing.  Changing the read-only status of a
buffer is something completely different.  Surely?  Somebody please tell
me I'm having a bad dream, and I'll wake up soon.

Do I really have to type M-x toggle-read-only for evermore, so as to
avoid the risk of accidentally checking a file in/out? 

Suggestion:  C-x C-q should be reserved for toggle-read-only, and
something else (C-x v v, presumably) for checking files in/out.

-- 
Alan Mackenzie (Munich, Germany)
Email: address@hidden; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").




reply via email to

[Prev in Thread] Current Thread [Next in Thread]