Subject: Re: bug#38592: 27.0.50; org mode insinuates itself into calendar

From: Eli Zaretskii <[email-masked]>
Date: Fri, 13 Dec 2019 16:41:09 +0200

> From: Sam Steingold <[email-masked]>
> Date: Fri, 13 Dec 2019 08:54:08 -0500
> 
> I do not use org.
> Apparently it still slithers into Emacs.
> org-compat.el adds org--setup-calendar-bindings to calendar-mode-hook.
> I have no idea who or why loaded org-compat.
> However, I get this error:
> 
> --8<---------------cut here---------------start------------->8---
> Debugger entered--Lisp error: (void-variable org-agenda-diary-file)
>   org--setup-calendar-bindings()
>   run-hooks(change-major-mode-after-body-hook calendar-mode-hook)
>   apply(run-hooks (change-major-mode-after-body-hook calendar-mode-hook))
>   run-mode-hooks(calendar-mode-hook)
>   calendar-mode()
>   calendar-basic-setup(nil)
>   calendar()
> --8<---------------cut here---------------end--------------->8---

Outside of Org, org-compat appears only in cus-load.el, and I don't
believe what that does can load org-compat.

So I think you should report this to Org developers first, because it
sounds like an Org bug.