fix(org): merge org-loaddefs.el into org-autoloads.el

A chunk of Org's autoloads are siphoned off into a separate autoloads
file due to a file-local value for `generated-autoload-file` in some
org-*.el files. Since Straight (and Doom's profile generator) only
indexed PACKAGE-autoloads.el files, that meant that a bunch of Org
autoloads weren't being autoloaded, including
`org-element-with-disabled-cache` (#7347), so I merge org-loaddefs.el
into org-autoloads.el post-build.

Fix: #7347
This commit is contained in:
Henrik Lissner 2026-02-23 16:49:12 -05:00
parent 16108fd0b9
commit a628ef3466
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -30,7 +30,18 @@
(insert (format "(defun org-release () %S)\n" version)
(format "(defun org-git-version (&rest _) \"%s-??-%s\")\n"
version (cdr (doom-call-process "git" "rev-parse" "--short" "HEAD")))
"(provide 'org-version)\n")))))
"(provide 'org-version)\n"))))
;; HACK: Org is hardcoded (with file-local variables) to spew some of
;; its autoloads into org-loaddefs.el file (that is never loaded or
;; subsumed into Doom's package autoloads), while the rest go into
;; org-autoloads.el, so we have to manually merge them.
;; REVIEW: Fix this upstream?
:post-build
(let ((afile (straight--autoloads-file "org")))
(with-temp-file afile
(insert-file-contents "org-loaddefs.el")
(save-excursion (insert "\n"))
(insert-file-contents afile))))
:pin "89df5bf46ba214db44eea898cc7cacc0b27fd760") ; release_9.8
(package! org-contrib
:recipe (:host github