I have a very strange problem that I cannot work out. Emacs opens if I run some git commands such as git log, git branch, git show. Some git commands behave normally and do not open emacs, such as git status, git commit, git add. I recently wrote a python script using Fire, which also opens emacs when run.
When emacs opens, the only available buffers are scratch and messages. Emacs opens in the way you would expect from simply typing $ emacs. If I run $ git log > log.txt, I see a normal git log output in log.txt, once I have closed emacs of course.
I have no weird bash aliases that could be responsible and my .emacs is stock. Emacs version 25.2.1 on Ubuntu 18.04.
Any help will be much appreciated.
env | grep emacs
to see if you have any environment variables that specify emacs as an editor/pager/what have you ( as @db48x points out in his comment/answer,PAGER
is one suspect but there may be others). Forgit
, you might also want to checkgit config -l
, although any settings there are not going to affect other programs.