Subject: Re: bug#25209: 25.1; can't delete *Shell Command Output*

From: Francesco Potortì <[email-masked]>
Date: Mon, 19 Dec 2016 15:41:44 +0100

>On Dez 19 2016, Andreas Schwab <[email-masked]> wrote:
>
>> On Dez 15 2016, Francesco Potortì <[email-masked]> wrote:
>>
>>> On a long-running multi-tty Emacs, at one point the *Shell Command
>>> Output* buffer refuses to go away.
>>>
>>> If I try to kill it, nothing happens, whether the current buffer is that
>>> one or any other one.  The contents of the *Shell Command Output* buffer
>>> are always visible in the minibuffer.  So, to make it unobtrusive, I
>>> need to issue an
>>>  M-! echo -n RET
>>> every time the *Shell Command Output* buffer is dirtied.
>>
>> Did you perhaps quit while the output of a shell-command was being
>> displayed, because it took too long?  In that situation Emacs can end up
>> in a state where (minibuffer-window) points to the *Shell Command
>> Output* buffer, and kill-buffer will refuse to kill the buffer.
>
>I think the problem is that vertical-motion (as called by
>display-message-or-buffer via count-screen-lines) is not properly
>protecting against quit when it temporarily modifies the window's
>buffer.

I happen to use view-line-mode, if that can be of relevance.