So I've been using my custom config for a while now and no problems whatsoever, recently however there's a lag while loading emacs. It hangs at loading /home/<user>/.emacs.d/git_config.el (source) for about 5mins before going through.

I'm not entirely sure what the problem is. I tried loading it in --debug-mode but to no avail. I can get over the hang by clicking C-g. I tried commenting out git_config.el but then it hangs in helm.el.

In git_config.el it seems that it hangs at (require 'git-commit).

Any idea on how to go about debugging this?

  • 2
    When you say it seems that it hangs at (require 'git-commit), is that a given -- i.e., did you verify that hypothesis by commenting out the line of code and seeing if your problem with lag-time disappeared? If so, then you have your answer -- go through git-commit.el and recursively bisect the file (commenting stuff out in bulk) until you find out which offending code is causing the lag-time. [You'll need to restart Emacs several times while recursively bisecting.] You may need to delete the byte-compiled file while doing your testing and then re-byte-compile when you fix it.
    – lawlist
    Jul 11, 2016 at 14:15
  • @lawlist I did do that (i.e comment out parts of it) if you saw the source I linked, the file only contains two lines, and the problem is (require `git-commit). But the weird part is even if I comment it out it hangs at helm.el and projectile.el, so I'm wondering if the issue might be external, because I never had this problem before with the same config. Jul 11, 2016 at 17:06

1 Answer 1


I found the problem after hours of debugging, it seems to be an issue with TRAMP as stated here.

As the answer sums it up, the problem is fixed by adding (setq tramp-ssh-controlmaster-options "") to the start of the emacs config.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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