How to make git fixed in Emacs buffers

The usual way to work is to have a small eshell buffer and a large buffer for the code I'm working on. I use the eshell buffer for compilation and simple tests.

If I want to execute git, then when I launch it this way, I always open a new Emacs window.

How can I make a commit just open a new buffer in the current Emacs session?

+6
source share
3 answers

I assume that your $ EDITOR environment variable is declared as emacs. Since you are not starting Emacs as a daemon, it starts a new instance of it. To fix this, you have two options:

  1. configure your $ EDITOR to use Emacsclient

  2. use egg or magit , the external Git interfaces for Emacs.
    The egg holds his hand a little, as you can see the shortcuts, but Magit is more actively developing.

+8
source

I like that all my compilation and git / magit messages appear in the same window in the same frame that caused the message.

Look at the same-window-regexps vars and the same-window-buffer-names, as I think you can search.

Here is the setting I'm using:

(setq same-window-regexps (quote ("\ * vc \ -. + \ *" "\ * magit. + \ *" "grep" "\ * compilation \ * \ (\ | <[0 -9] + > \) "" \ * Help \ * \ (\ | <[0-9] +> \) "" \ * Shell command output \ * \ (\ | <[0-9] +> \) "" \ * dictem. * ")))

Hope this helps.

Damon

+2
source

You are bananas, if you use Emacs, use git, but do not use magit. Bananas, I say!

0
source

Source: https://habr.com/ru/post/915941/


All Articles