>>> Michael, please check whether it fixes your >>> use case. > > That seems to be the case, yes. Probably good to know. Meanwhile, please try the attached patch which should "cure" the underlying problem (it's the same as for Bug#34138). It does not cure another problem I found this way based on your scenario: With emacs -Q do M-x shell, C-x 5 2, and M-: (message "A\nB"). Here with emacs 25 this grows the minibuffer window and displays the two lines A B in it. With emacs 26 it shortly resizes the minibuffer window and then displays "A\nB" in it. With patched master it displays Eval: (message "A\nB") with the cursor at the beginning of the minibuffer. I have no idea yet what's causing these behaviors but so far the presence of an external procees or shell looks like a necessary prerequisite. Ideas welcome. Thanks, martin