mirror of
https://github.com/nix-community/nix-doom-emacs
synced 2025-08-09 12:57:26 -05:00
`nix-straight.el` used to require `straight.el` on its own before `doom` itself was loaded. This had an unfortunate side-effect that `straight-fix-org` was set to nil after it has been loaded so `org-version` and `org-git-version` functions were already overloaded. This was no problem for `org-mode` itself as it has its own overload of the above mentioned functions, but other libraries such as `elfeed` may also use these which causes problems. `nix-straight.el` is updated to a version where it does not preload `straight` and an advice is provided to `doom` so it loads our version of `straight` when it supposed to. References: https://github.com/vlaci/nix-doom-emacs/issues/5
24 lines
1.1 KiB
EmacsLisp
24 lines
1.1 KiB
EmacsLisp
;;; -*- lexical-binding: t; -*-
|
|
(advice-add 'nix-straight-get-used-packages
|
|
:before (lambda (&rest r)
|
|
(message "[nix-doom-emacs] Advising doom installer to gather packages to install...")
|
|
(advice-add 'doom-cli-reload-autoloads
|
|
:override (lambda (&optional file force-p)
|
|
(message "[nix-doom-emacs] Skipping generating autoloads...")))
|
|
(advice-add 'doom--format-print
|
|
:override (lambda (output)
|
|
(message output)))))
|
|
|
|
(advice-add 'y-or-n-p
|
|
:override (lambda (q)
|
|
(message "%s \n[nix-doom-emacs] --> answering NO" q)
|
|
nil))
|
|
|
|
;;; org is not installed from git, so no fixup is needed
|
|
(advice-add '+org-fix-package-h
|
|
:override (lambda (&rest r)))
|
|
|
|
;; just use straight provided by nix
|
|
(advice-add 'doom-ensure-straight
|
|
:override (lambda (&rest r) (require 'straight)))
|