Skip to Content
Learning GNU Emacs, Second Edition
book

Learning GNU Emacs, Second Edition

by Debra Cameron, Bill Rosenblatt, Eric S. Raymond
September 1996
Beginner to intermediate
568 pages
20h 31m
English
O'Reilly Media, Inc.
Content preview from Learning GNU Emacs, Second Edition

How VC Helps with Basic Operations

Historically, you had to know three or four different shell commands to do the basic operations of version control (registration, check in, check out, and revert), and you had to do each one outside your editor (or at best in a subshell of your editor). This procedure was complicated and annoying, and a lot of people simply didn’t bother.

VC’s interface is much simpler. The simplicity comes from noticing that whatever state your version-controlled file is in, there is normally just one logical thing to do next. Here are the rules:

  • If your file isn’t under version control, the next logical thing to do is register it and check out a modifiable copy for you.

  • If it’s registered, but not checked out by anyone, the next thing you generally want to do is check it out so you can edit it.

  • If you have it checked out, the next logical thing is to check it back in.

  • If someone else has it checked out, you may want to steal the lock (notifying the lock owner that you’ve done so).

Indeed, there is just one basic command in VC mode: C-x v v (for vc-next-action), which you can think of as “do the next logical thing to this file” or, more precisely: “take the currently visited file to the next normal version control state.” It follows the arrows in Figure 15-1, which describes the normal version control cycle. [90]This command is available in every Emacs 19; when you invoke it, it automatically fetches the rest of VC and does its job.

Figure 16-1. The normal version ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Learning GNU Emacs, 3rd Edition

Learning GNU Emacs, 3rd Edition

Debra Cameron, James Elliott, Marc Loy, Eric S. Raymond, Bill Rosenblatt
Vim Masterclass

Vim Masterclass

Jason Cannon

Publisher Resources

ISBN: 1565921526Catalog PageErrata