Subject: bug#25522: closed (Re: bug#25522: 26.0.50; (hl-line-maybe-unhighlight): (error "Selecting deleted buffer"))

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 28 Jan 2017 20:20:02 +0000

Your bug report

#25522: 26.0.50; (hl-line-maybe-unhighlight): (error "Selecting deleted buffer")

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
25522: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25522
GNU Bug Tracking System
Contact [email-masked] with problems

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

Subject: 26.0.50; (hl-line-maybe-unhighlight): (error "Selecting deleted buffer")
From: Michael Heerdegen <[email-masked]>
To: [email-masked]
Cc: Stephen Berman <[email-masked]>
Date: Wed, 25 Jan 2017 00:26:39 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

this is on master.  When exiting Gnus, I always get

  Error in post-command-hook (hl-line-maybe-unhighlight): (error "Selecting deleted buffer")

Seems that the new definition of `hl-line-maybe-unhighlight' in commit

  16be3e9054 hl-line.el: Fix flickering of highlighted line (bug#23510)

(by Stephen Berman whom I CC'd)

should test whether the `hl-line-overlay-buffer' is alive before trying
to switch to it?

Please tell me if you need a recipe.

Thanks,

Michael.

In GNU Emacs 26.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.6)
 of 2017-01-24 built on drachen
Repository revision: 201dfe311868932d10da146808fcdd681948ba53
Windowing system distributor 'The X.Org Foundation', version 11.0.11900000
System Description:	Debian GNU/Linux 9.0 (stretch)