Re: emacs22 and version control
On 2009-04-28 18:08 +0200, T o n g wrote:
> I upgrade my emacs from emacs21 to emacs22, but the default version
> control for rcs files are not working any more.
Hard to believe.
> According to
> http://www.gnu.org/software/emacs/manual/html_node/emacs/Version-
> Control.html
> "VC is enabled by default in Emacs."
>
> and I never have to do anything before to get emacs and version control
> work for rcs[1]. Do I have to do anything special for emacs22?
No. But please type C-h n and skim through the NEWS file when you have
an hour or two to spare.
> Further, "currently, it [emacs VC] supports ... Subversion", any one
> knows how to utilize it please? How about git?
First you have to create a new repository or check out/clone an existing
one; consult your $VCS manual how to do that. After that, Emacs
supports subversion, git and a bunch of other VCS out of the box.
> [1]. As per http://www.linux.org/docs/ldp/howto/RCS-8.html
Hint: random Internet documentation is often outdated. The official
manual is a much better choice.
> "When editing a file with emacs(1) which is registered with RCS, the
> command vc-toggle-read-only (bound to C-x C-q by default) will check a
> file in to the emacs's Version Control, and then into RCS. Emacs will
> open a buffer where you can type a log message to be included in the RCS
> log. . . "
>
> but all I get is
>
> File is under version-control; use C-x v v to check in/out [2 times]
Well, did you try C-x v v then?
> without getting into the vc log message buffer.
Here's the relevant entry from the NEWS file:
,----
| *** The key C-x C-q only changes the read-only state of the buffer
| (toggle-read-only). It no longer checks files in or out.
|
| We made this change because we held a poll and found that many users
| were unhappy with the previous behavior. If you do prefer this
| behavior, you can bind `vc-toggle-read-only' to C-x C-q in your
| `.emacs' file:
|
| (global-set-key "\C-x\C-q" 'vc-toggle-read-only)
|
| The function `vc-toggle-read-only' will continue to exist.
`----
Note that vc-toggle-read-only is not really useful with anything more
modern than RCS. You're best off unlearning the C-x C-q command and
stick to C-x v v, which will DTRT most of the time regardless of the VC
backend.
Sven
Reply to: