Closed thraxil closed 4 years ago
The error ‘recenter’ing a window that does not display current-buffer.
is being raised by some emacs-lisp code. I don't think that code is part of Emacs or Magit. Please search your additional installed packages for the phrase "a window that does not display current-buffer" using for example rgrep
on the elpa directory.
That error is from Emacs' recenter
C code: https://github.com/emacs-mirror/emacs/blob/emacs-26.3/src/window.c#L5927-L5931
Thanks. My init.el
has the following:
; keep point centered vertically
(add-hook 'post-command-hook
(lambda ()
(unless (eq major-mode 'eshell-mode)
(recenter '("don't redraw")))))
commenting that out makes magit work. However, the vertical centering isn't something that I want to get rid of. I've used this exact config for years and it only recently broke when I upgraded magit. I've tried adding an exclusion for magit-mode
like I already have for eshell-mode
but that doesn't help. I'm not sure how to figure out which mode/buffer is triggering the problem so that I could exclude it and still use the vertical centering everywhere else.
You could translate the error message into code that detects that situation, something like:
(eq (current-buffer) (window-buffer (selected-window))
Attempting to commit with magit generates the error:
GitError! There was a problem with the editor '/usr/bin/emacsclient.emacs --socket-name=/tmp/emacs1000/server'. [Type '$' for details]
Hitting
$
gives me:M-x magit-version
:This is on Ubuntu 19.10.
output of
M-x with-editor-debug
: