Files
nix-doom-emacs/advice.el
László Vaskó 7add1505c0 Ensure that doom's customizations to straight.el take effect
`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
2020-03-16 19:15:20 +01:00

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)))