Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run git rebase -i I get the absolutely horrible Rebase mode in emacs.

This only accepts some pre defined commads like

c -> Pick

r -> Reword

etc...

Even if I change to text mode emacs auto-magically makes the git-rebase-todo file read-only. How can I disable it?

The only solution I have found is to use vim as editor (something I don't want, I like emacs in general)

share|improve this question
    
I know sometimes it's frustrating, but try to keep questions and answers here objective – Raystafarian Jul 18 '13 at 9:32
    
@Raystafarian Yes, you are right. Thanks for editing the question! – Erik Jul 18 '13 at 11:22

The rebase-mode automatic activation is triggered by the auto-mode-alist variable. You can try disabling it to edit git-rebase-todo files in fundamental mode (no special shortcut, no automatic read-only flag, ...) :

(setq auto-mode-alist (delete '("git-rebase-todo" . rebase-mode)
                              auto-mode-alist))

On another note, you might want to use magit to realize your git operation directly from within emacs.

share|improve this answer
    
When using magit, something of note / related. I was gettingBuffer is read-only: #<buffer git-rebase-todo>, and C-x C-q wasn't helping (was getting strange errors). Turns out the latest magit handles keyboard shortcuts within the rebase buffer (s for "squash", f for "fixup", etc). You don't type in the buffer, you interact with it. – lefnire Jun 16 '15 at 16:19
    
This solution appears to have no effect. I have those lines in my .emacs file, and I still get the rebase mode. This is with emacs 24.5.1. – Ian Hinder May 8 at 10:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.