When I open commit buffer (pressing c c), the pointer is shown in random locations instead of showing point at beginning of buffer. This is quite annoying as I have to manually move point every time.
I also checked this FAQ in magit and added these to init file
(setq session-name-disable-regexp "\\(?:\\`'\\.git/[A-Z_]+\\'\\)") (with-eval-after-load 'pointback (lambda () (when (or git-commit-mode git-rebase-mode) (pointback-mode -1))))
But still point is not getting restored. I even tried this
(defun restore-point () (interactive) (when (string-match ".git/COMMIT_EDITMSG" buffer-file-name) (goto-char (point-min)))) (add-hook 'git-commit-mode-hook 'restore-point)
Still its not restoring. Any idea what might be going wrong here?