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

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Tue, 24 Jan 2017 23:27:02 UTC

Severity: normal

Found in version 26.0.50

Done: Stephen Berman <stephen.berman <at> gmx.net>

Bug is archived. No further changes may be made.

Full log


Message #31 received at 25522 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 25522 <at> debbugs.gnu.org
Subject: Re: bug#25522: 26.0.50;
 (hl-line-maybe-unhighlight): (error "Selecting deleted buffer")
Date: Thu, 26 Jan 2017 20:45:11 +0100
On Thu, 26 Jan 2017 11:15:24 +0100 Michael Heerdegen <michael_heerdegen <at> web.de> wrote:

> Stephen Berman <stephen.berman <at> gmx.net> writes:
>
>> > I just got the same error message after hitting U x in M-x
>> > list-packages.
>>
>> Is this after removing the above sexp?
>
> No, still with hl-line-sticky-flag -> nil.
>
>
>> Did you have hl-line-mode enabled in package-menu-mode, and if so,
>> how?  I added this:
>>
>> (add-hook 'package-menu-mode-hook #'hl-line-mode)
>
> Yes, that's exactly what I use - sorry for my terseness.
>
>
>> -    (when (and (not hl-line-sticky-flag)
>> +    (when (and (buffer-live-p hlob)
>> +               (not hl-line-sticky-flag)
>
> Yeah, that seems to fix the problem (I had already tried that ;-)).  I
> still wonder why you don't see it...but I'm not sure if it's worth to
> investigate (because this will probably take hours).

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?  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.

Steve Berman




This bug report was last modified 8 years and 170 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.