diff options
| author | Vaino Kauppila <vaino@vke.fi> | 2026-09-10 16:18:54 +0300 |
|---|---|---|
| committer | Vaino Kauppila <vaino@vke.fi> | 2026-09-10 16:18:54 +0300 |
| commit | c53ead9f2f30a6d64907e06472d43d447588b4b2 (patch) | |
| tree | 54b5c97fcc10942f6fb22bd4a56ce068d5d04ceb | |
| parent | 74b9de6292b8638348a7595b843a7f22a6064890 (diff) | |
| download | emacs_setup-main.tar.gz emacs_setup-main.zip | |
Quitting Emacs (C-x C-c / frame close) during startup could randomly
fail with 'void-function org-clock-kill-emacs-query'. Cause: Org 9.8's
defcustom org-clock-ask-before-exiting has a :set that hooks the
function onto kill-emacs-query-functions while (require 'org-clock) is
still mid-file -- ~2800 lines before its defun. A quit landing in that
window calls the not-yet-defined function.
Fix: pre-define a permissive stub (returns t) before the require; the
real definition overwrites it when the require completes. Traced via
advice on add-hook during config load.
| -rw-r--r-- | emacs.el | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -405,6 +405,14 @@ ;; Custom org-dblock for weekly time tracking (require 'cl-lib) +;; QUIRK (Org 9.8 / Emacs 31): while (require 'org-clock) evaluates its +;; defcustoms, the :set of org-clock-ask-before-exiting adds +;; org-clock-kill-emacs-query to kill-emacs-query-functions ~2800 lines +;; BEFORE the defun that defines it. Quitting inside that window +;; (e.g. C-x C-c during startup) hits a void-function error. Pre-define +;; a permissive stub; Org's real definition replaces it once loaded. +(unless (fboundp 'org-clock-kill-emacs-query) + (defun org-clock-kill-emacs-query () t)) (require 'org-clock) (defun org-dblock-write:weekly (params) |
