Subject: bug#6462: `disabled-command-function' corrupts the `help-xref-stack'

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 03 Jun 2021 10:43:15 +0200

MON KEY <[email-masked]> writes:

> A recipe to reproduce the offending behavior:
>
> (progn
>   (when (get-buffer "*Help*")
>     (kill-buffer (get-buffer "*Help*")))
>   (unless (get 'set-goal-column 'disabled)
>     (put 'set-goal-column 'disabled t))
>   (describe-function  'enable-command)
>   (with-current-buffer (get-buffer "*Help*")
>     (describe-function  'disabled-command-function)
>     (help-go-back))
>   (pop-to-buffer (get-buffer "*Help*")))
>
> Tickle the command-loop to trigger on `set-goal-column' by typing:
>
>  "C-x C-n"
>
> Tell the `disabled-command-function' to get f*cked by typing:
>
>  "n"
>
> Remap `set-goal-column' to something irrelevant:
>
>  (define-key ctl-x-map [remap set-goal-column]  'ignore)
>
> Now navigate through the `help-xref-stack' with either:
>  "C-c C-b" `help-go-back'
>  "C-C C-f" `help-go-forward'
>
> You should eventually run into the "*Disabled Command*" buffer.

(I'm going through old bug reports that unfortunately got no response at
the time.)

I'm trying to follow the recipe, but you lost me here -- I just get "no
previous help buffer".

Are you still seeing this problem in more recent Emacs versions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no