Emacs tramp, version control and toggle-read-only

0

When using emacs 24 w/tramp on remotely RCS-controlled files, the toggle-read-only function (^X^Q) does not issue the usual "This file is under version control, blah, blah".

Instead it flips the read-only permissions without checking out the file. This is catastrophic, as the next checkout will overwrite changes etc.

How do I get the standard behavour?

I tried

(global-set-key "\C-x\C-q" 'vc-toggle-read-only)

which does not really address the issue.

To clarify: I want to have the version control warning when editing remote files - I currently get nothing.

Cheers, alf

Alien Life Form

Posted 2014-01-09T15:52:33.160

Reputation: 142

Answers

0

I pulled a copy of vc-toogle-readonly, from Emacs 23, renamed it to avoid clashes, dropped it into site-lisp, byte compiled it, and loaded it from .emacs: (load-library "old-toggle-readonly") (global-set-key "\C-x\C-q" 'old-toggle-read-only)

Works a charm.

Alien Life Form

Posted 2014-01-09T15:52:33.160

Reputation: 142