diff --git a/modules/lang/org/autoload/org.el b/modules/lang/org/autoload/org.el index 0b26b94ac..a06a19259 100644 --- a/modules/lang/org/autoload/org.el +++ b/modules/lang/org/autoload/org.el @@ -1,5 +1,19 @@ ;;; lang/org/autoload/org.el -*- lexical-binding: t; -*- +;; 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... +;;;###autoload (defun +org--release-a () "9.3") +;;;###autoload (fset 'org-release #'+org--release-a) +;;;###autoload (fset 'org-git-version #'ignore) + +;; Org itself may override the above if it's loaded too early by packages that +;; depend on it, so we have to advise it once again: +;;;###autoload (advice-add #'org-release :override #'+org--release-a) +;;;###autoload (advice-add #'org-git-version :override #'ignore) + ;; ;;; Helpers diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 8a3f0c0f9..d768c8b54 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -898,12 +898,3 @@ compelling reason, so..." (org-clock-load)) :config (add-hook 'kill-emacs-hook #'org-clock-save))) - - -;; 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... -(defun org-release () "9.3") -(fset 'org-git-version #'ignore) diff --git a/modules/tools/magit/autoload.el b/modules/tools/magit/autoload.el index d42de7b0e..efd64f771 100644 --- a/modules/tools/magit/autoload.el +++ b/modules/tools/magit/autoload.el @@ -1,5 +1,10 @@ ;;; tools/magit/autoload.el -*- lexical-binding: t; -*- +;; HACK Magit complains loudly when it can't determine its own version, which is +;; the case when magit is built through straight. The warning is harmless, +;; however, so we just need it to shut up. +;;;###autoload (advice-add #'magit-version :around #'ignore) + ;;;###autoload (defun +magit-display-buffer-fn (buffer) "Same as `magit-display-buffer-traditional', except... diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index cb8fc3e5e..28d7bd0b6 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -17,11 +17,6 @@ It is passed a user and repository name.") (setq transient-levels-file (concat doom-etc-dir "transient/levels") transient-values-file (concat doom-etc-dir "transient/values") transient-history-file (concat doom-etc-dir "transient/history")) - - ;; HACK Magit complains loudly when it can't determine its own version, which - ;; is the case when magit is built through straight. The warning is - ;; harmless, however, so we just need it to shut up. - (advice-add #'magit-version :around #'ignore) :config (setq transient-default-level 5 magit-revision-show-gravatars '("^Author: " . "^Commit: ")