After a while running emacs (typically days) all comint buffers start to behave strangely (shell, python, SQL). The ones I have already opened and the new ones that I open.
When I am after prompt, C-a moves tho the beginning of the line, as opposed to right after the prompt. More irritating is the fact that in this state C-up (comint-previous-input
) moves to the beggining of the line before inserting the previous input, leaving the line broken (the text is before the prompt).
A workaround for the second problem is to do (setq comint-use-prompt-regexp t)
, but the first problem remains.
That was happening with emacs 24.3 in GNU Linux (cassou ppa for Ubuntu 12.04) and happens also now with emacs 24.4 (compiled by myself).
I debugged the shipped comint.el and tracked the issue to the built-in function line-beginning-position
; in freshly started emacs sessions that function works fine in comint mode. After a while this function just returns the point at the beggining of line (just like comint-mode were not enabled).
I suspect it has something to do with my setup, since google did not came up with any help. However, binary search is not an option since I would need to spend days with a half functional emacs while waiting for the problem to happen.
Any ideas about how to narrow the suspects or further debug the problem?
inhibit-field-text-motion
?