From 85af884fcb70cda42acd4cb1610411dcacac82b9 Mon Sep 17 00:00:00 2001 Message-Id: <85af884fcb70cda42acd4cb1610411dcacac82b9.1654948539.git.yantar92@gmail.com> From: Ihor Radchenko Date: Sat, 11 Jun 2022 19:53:37 +0800 Subject: [PATCH] org-mode: Make local variables effective during Org startup * lisp/org.el (org-mode): Call `hack-local-variables' early during Org mode startup. This way, Org startup options will regard local variable settings. Fixes https://list.orgmode.org/587be554-906c-5370-2cf2-f08b14fa58ff@gmail.com/T/#u --- lisp/org.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index 080962cdb..2b8a6cd10 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4606,6 +4606,10 @@ (define-derived-mode org-mode outline-mode "Org" \\{org-mode-map}" (setq-local org-mode-loading t) + ;; Apply file-local and directory-local variables, so that Org + ;; startup respects them. See + ;; https://list.orgmode.org/587be554-906c-5370-2cf2-f08b14fa58ff@gmail.com/T/#u + (hack-local-variables 'ignore-mode-settings) (org-load-modules-maybe) (org-install-agenda-files-menu) (when (and org-link-descriptive -- 2.35.1