Fix No such file org-version.el errors #2010

We generate an org-version.el file, rendering our old org-release hacks
unnecessary. This may cause breakages for uses who do deep clones of
org-plus-contrib; needs testing.
This commit is contained in:
Henrik Lissner 2019-11-19 20:25:54 -05:00
parent 304506edcc
commit 30f72da02a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 18 additions and 32 deletions

View file

@ -6,7 +6,23 @@
(when-let (orglib (locate-library "org" nil doom--initial-load-path))
(setq load-path (delete (substring (file-name-directory orglib) 0 -1)
load-path)))
(package! org-plus-contrib) ; install cutting-edge version of org-mode
;; HACK A necessary hack because org requires a compilation step after being
;; cloned, and during that compilation a org-version.el is generated with
;; these two functions, which return the output of a 'git describe ...'
;; call in the repo's root. Of course, this command won't work in a sparse
;; clone, and more than that, initiating these compilation step is a
;; hassle, so...
(setq straight-fix-org nil)
(add-hook! 'straight-use-package-pre-build-functions
(defun +org-fix-package-h (package &rest _)
(when (member package '("org" "org-plus-contrib"))
(with-temp-file (expand-file-name "org-version.el" (straight--repos-dir "org"))
(insert "(fset 'org-release (lambda () \"9.3\"))\n"
"(fset 'org-git-version #'ignore)\n"
"(provide 'org-version)\n")))))
(package! org-plus-contrib) ; install cutting-edge version of org-mode
(package! htmlize)
(package! org-bullets :recipe (:host github :repo "Kaligule/org-bullets"))