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

From: Michael Heerdegen <[email-masked]>
Date: Thu, 26 Jan 2017 02:14:51 +0100

Stephen Berman <[email-masked]> writes:

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

> > FWIW this is my setup:
> >
> > #+begin_src emacs-lisp
> > (add-hook 'gnus-summary-mode-hook #'hl-line-mode)
> > (add-hook 'gnus-group-mode-hook #'hl-line-mode)
> > (add-hook 'gnus-server-mode-hook #'hl-line-mode)
> > #+end_src
>
> I updated my build to current master, started emacs -Q, evaluated the
> above sexps in *scratch*, started Gnus, saw that the current line in the
> *Summary* buffer was highlighted, then exited Gnus without getting an
> error.  Same thing by making ~/.emacs contain only the above sexps.

Finding a recipe is not easy because I have to find the offending pieces
in my setup.  I tried M-x debug-on-entry hl-line-maybe-unhighlight,
also edebug, but the error magically disappeared.

But I found that I had concealed a related setting in my .emacs:

  (setq-default hl-line-sticky-flag nil)

If you still can't reproduce with that, I will probably have to create a
new user on my system to be able to bisect my setup without messing up
my Gnus.

Regards,

Michael.