Questions tagged [version-control]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
48 views

Find a version controlled project's root?

Trying to deduce a project root, using vc I'm getting errors, involving strange non-ASCII characters. I.e. invoking (vc-find-root (expand-file-name (buffer-file-name (get-buffer "fname")))) I get ...
1
vote
1answer
44 views

Emacs vs subversion with passtype gpg-agent

I'm currently setting up a new Ubuntu box for myself at work. I generally have my work related stuff under subversion. The default method for subversion to store passwords in Ubuntu seems to be ...
1
vote
1answer
38 views

How to detect programmatically if content under org-mode headline is encrypted or not before a save or commit?

org-mode allows users to encrypt the contents under a headline by adding the crypt tag with C-c C-q crypt and then calling M-x org-encrypt-entry. Below is an example using this feature: * Headline ...
3
votes
1answer
65 views

How to execute a function in all files in the git working tree?

How to invoke a function on all files in the git working tree, while opening the ones which have had no opened buffers beforehand? A potential use case: Check and fix spelling in all project files ...
0
votes
1answer
95 views

Track org-mode headlines separately with version control

I want to setup a personal wiki in Emacs org-mode. And I want to put this under version control, so that I can see the history of each article, as it evolves. If I use a single file for my wiki, with ...
5
votes
1answer
145 views

Is there a way to revert only certain lines from a diff hunk?

I use the builtin VC package and it's very nice that when I do a diff of changes in the current file then I can revert any hunk in the diff quickly with C-a But sometimes I don't want to revert the ...
1
vote
1answer
120 views

Managing source code annotations and version control

I would like to be able to annotate source code files with my own personal notes, strip these notes out before committing to version control, and merge changes back in from version control without ...
5
votes
2answers
314 views

Merge specific files with magit

Is there a way to merge single files in magit like you would do from this question or something equivalent. Namely: $ git checkout source_branch -- <paths>...
0
votes
1answer
250 views

Is there a way for ediff to compare SVN changes in the head to my local copy?

My company uses SVN, and one of the things I often want to do is compare the differences that someone else checked in without doing an update. For example, if I see someone has committed a new ...
4
votes
1answer
275 views

How do I stop Emacs micro-stuttering and high CPU utilization caused by background calls to git?

Using Emacs on Windows, I experiences issues due to background invocations of git.exe. The same issues might apply on Linux, though the more light-weight process calling might make them unnoticable. ...
2
votes
1answer
98 views

VC status behavior in ibuffer-vc

I use ibuffer-vc, a replacement for list-buffer that displays the VC status of the listed files. I noted that the VC status stays as "edited" even after I push my changes. That is, the VC status does ...
0
votes
1answer
89 views

Strategy for proper version control of “auto-filled” text files

I like auto-fill-mode a lot because it makes text fit into my screen even when I have two buffers side-by-side. My problem is that a small wording change may trigger auto-fill to reformat a whole ...
3
votes
1answer
110 views

Is there a way to add a new VC mode for a different tool?

I'm new to this forum and using VC in emacs so if this question has been answered or is just very basic, I apologize. At my employer we use a Version Control system that is not one of the systems ...
1
vote
0answers
69 views

Is there a package to search in history of changes?

While editing files, time to time I regret deleting some redundant parts which afterwards become necessary. Let's say you are writing a letter and first you explained your thoughts with redundantly ...
0
votes
2answers
321 views

Is there a package for tracking local history of files like in IntelliJ or Eclipse?

Local History is a feature in IntelliJ and Eclipse, which for every file keeps a history of its changes: IntelliJ Local History Eclipse Local History It is not a replacement for revision control ...
0
votes
1answer
184 views

Version control using emacs

I'm looking for a simple version control system. I'm the only programmer in my team and I would be the only one who is making changes to files. It gets complicated when the inputs change and I ...
3
votes
1answer
59 views

Version control: how to inhibit opening email buffer upon breaking lock

My work uses GNU RCS for our version control system, but I don't think the specific VCS is relevant here. (I know RCS isn't the most modern system but it suits our needs fine and has the advantage of ...
1
vote
2answers
169 views

undo vc-annotate-revision-previous-to-line

When I've launched vc-annotate and then type a (vc-annotate-revision-previous-to-line), emacs will show me the revision before the one on the current line. From the docs: a Annotate the ...
1
vote
0answers
12 views

Customize vc-next-action to open a URL

Is there a way to customize vc-next-action C-x v v so that it opens a URL on success? I am using SVN and after each commit, I have to open manually a trac URL with the rev number. For example: http://...
3
votes
4answers
392 views

Predicate function to test if file is under version control?

What is the predicate function to determine if a given file is under version control? (I'm using git.)
4
votes
1answer
180 views

Version control information out of sync with certain modes

Sometimes, though seemingly not in a consistent way, some modes that use version control information do not get updated correctly after git commands are run (e.g.,diff-hl-mode or git-gutter-mode ...
1
vote
2answers
237 views

How to “svn revert <file>” with Emacs Version Control?

How can I do a svn revert <file> from Emacs Version Control? I've read many parts of the manual, but can't find it. I would like to do it over a file after opening it with vc-directory C-x v d, ...
3
votes
1answer
378 views

Auto-indent without creating indentation in empty lines

Is there a way to use auto-indentation in Emacs without creating indentation on empty lines? For an example from C, if I have if (true) { printf("word"); } and then insert a newline after the ...
1
vote
1answer
390 views

Org mode M-RET not working with new builds

Since the build of org mode of the end of august (now I use elpa/org-20150907), the M-RET does not start a new entry, and gives the error "Symbol's value as variable is void: org-planning-line-re". ...
6
votes
1answer
279 views

version control using the usual backup system of Emacs

This question is inspired by https://emacs.stackexchange.com/a/7831/ and the below settings borrowed from that answer : (setq backup-directory-alist '(("." . "~/emacs-backups")) version-control ...
5
votes
1answer
241 views

How to abbreviate version control information in the mode line?

Q: how can I abbreviate the version control information in the mode line? Buffers visiting a file under version control display branch information in the mode line as VCtype-branch. That's fine, but ...
5
votes
2answers
592 views

Anatomy of ~/.emacs.d [duplicate]

I'm brand-new to Emacs and I want to put my ~/.emacs.d under version control, much like I've done in the past with my vim setup. I installed a couple packages before initializing a git repo, and now I'...
3
votes
1answer
343 views

Why does magit give so many “reverting buffer” messages?

I am still very much a beginner when it comes to version control, and am using magit. It seems like committing changes (frequently but not always?) triggers "reverting buffer" messages, one for ...
3
votes
1answer
110 views

Get unique, permanant revision name in vc

I am writing some Elisp for a package. I was using vc-working-revision to identify the current revision. But it only returns the branch name, not the hash that name points to. Therefore, this ...
0
votes
1answer
71 views

Is there a way to customize 'vc-update'?

Currently, running vc-update in my Emacs runs git pull. Is there a way to customize it so that it runs something different like git pull --prune? Is it even advisable to do that?
28
votes
7answers
2k views

Is there a simplified version control system appropriate for non-coders writing in Emacs?

I an academic and I love to do as much of my writing as possible in Emacs. A key thing that is missing for me is the ability to easily review the changes I have made to a text file over time. The ...
2
votes
2answers
532 views

How to use ediff with (hg) changesets?

I have not found a good way to use ediff with Mercurial changsets. What I want is basically the functionality of vc-dir, but for committed changesets. The input should be a changeset identifier, and I ...
29
votes
3answers
5k views

Is there an Emacs mode which highlights differences from the committed version?

One feature that Xcode has which I think is pretty neat is a "Comparison" mode, which continually shows differences between the current buffer and the most recent commit. Is there anything like this ...
0
votes
1answer
161 views

git-stage the current file-visiting buffer?

I've never really used vc but it looks like it only supports add or commit actions. I reckon magit must have some of the machinery to achieve this, but browsing its codebase didn't reveal anything ...
8
votes
2answers
440 views

Why does my *vc-log* buffer start with “Summary:” in Emacs 24.4?

I just upgraded to Emacs 24.4 (from 24.3). Now, whenever I run vc-next-action on a modified file, the *vc-log* buffer that comes up starts with the word "Summary:" in log-edit-header face, followed ...
5
votes
1answer
146 views

Insert and strip helpful comments from vc commit message buffer

When I run hg commit (or git commit, same difference...) from the command line without supplying a commit message it pops up an emacs buffer with the following contents: . . HG: Enter commit message. ...
8
votes
2answers
2k views

How do I ediff a buffer against a revision?

I want to run ediff to compare my current version of a file (in git) with a version of the file on a different branch. I run M-x ediff-revision from within an open buffer for the file in question. I ...
56
votes
12answers
6k views

Synchronize packages between different machines

I use emacs in different places and I want to have a similar setup and packages installed everywhere. I guess I can use a version control repository for the setup files. Since I use Prelude, that ...
15
votes
2answers
598 views

Only doing whitespace-cleanup on the lines touched

For most projects I work on I use a before-save-hook to run whitespace-cleanup. This is fine when everybody on the team cleanups up their spaces but sometimes I am involved in already running ...
63
votes
8answers
4k views

What should/shouldn't I do when keeping .emacs and .emacs.d in version control?

Like many people, I manage a lot of my dotfiles via a version control repository (Mercurial on Bitbucket, private, in my case). This is handy when setting up a new machine or propagating ...