Subject: Re: bug#78180: 31.0.50; Since ab71699e5f2, global value of post-command-hook is useless

From: Eli Zaretskii <[email-masked]>
Date: Fri, 02 May 2025 09:04:22 +0300

> From: Ihor Radchenko <[email-masked]>
> Cc: [email-masked]
> Date: Thu, 01 May 2025 18:23:49 +0000
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > May I suggest that you first describe the actual problem you bumped
> > into?
> 
> The problem is rather simple - some of Org's tests make an assumption
> that the value of `post-command-hook' is its global value in Org
> buffers. It is no longer the case after ab71699e5f2.

Isn't that a wrong assumption?  A global minor mode can legitimately
invalidate it, right?

Stefan, am I missing something here?

> What else _might_ be a problem (but I am a bit lost in how things work
> here) is direct invocations of (run-hooks 'post-command-hook) from
> Elisp: in ert-x.el, gnus-msg.el, org-mouse.el. AFAIU, such calls will
> only execute buffer-local post-comman-hook, not global. Maybe I miss
> something.

See Michael's response, I think he answered this.