Subject: Re: bug#25522: 26.0.50; (hl-line-maybe-unhighlight): (error "Selecting deleted buffer")
From: Stephen Berman <[email-masked]>
To: Michael Heerdegen <[email-masked]>
Cc: [email-masked]
Date: Sat, 28 Jan 2017 20:52:56 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

On Fri, 27 Jan 2017 10:29:07 +0100 Michael Heerdegen <[email-masked]> wrote:

> Stephen Berman <[email-masked]> writes:
>
>> I think I found out what triggers the error: when you kill a buffer in
>> whose mode hl-line-mode is enabled and the mode of the next (now
>> current) buffer does not have hl-line-mode enabled, and then you change
>> (or Emacs changes) to another buffer in whose mode hl-line-mode is
>> enabled -- that raises the error.  Can you confirm this?
>
> Could be.  In my posted recipes, when I turn off hl-line-mode in the
> buffer I end up in, there is indeed no error.  An experiment with three
> buffers as you described and switching manually to the third also
> confirms your assumption.
>
>> Just out of curiosity, because I think the above fix is good enough
>> and it's simple, so unless someone sees a problem with it, I'll commit
>> it to master.
>
> Yes, it's obvious that it isn't harmful.
>
>
> Thanks,
>
> Michael

Pushed as commit d12e1dd and closing the bug.

Steve Berman