diff options
author | Adrian Kummerlaender | 2020-08-29 10:28:08 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2020-08-29 10:28:08 +0200 |
commit | c4a114a5b30a3bace11e27345d15fc9a922701fc (patch) | |
tree | 1cf1f2b1ada954f9289e9e971e39cf5ffc29ede9 | |
parent | 199b699e089ff00460ead86eeaa625c6bfa10f3d (diff) | |
download | nixos_home-c4a114a5b30a3bace11e27345d15fc9a922701fc.tar nixos_home-c4a114a5b30a3bace11e27345d15fc9a922701fc.tar.gz nixos_home-c4a114a5b30a3bace11e27345d15fc9a922701fc.tar.bz2 nixos_home-c4a114a5b30a3bace11e27345d15fc9a922701fc.tar.lz nixos_home-c4a114a5b30a3bace11e27345d15fc9a922701fc.tar.xz nixos_home-c4a114a5b30a3bace11e27345d15fc9a922701fc.tar.zst nixos_home-c4a114a5b30a3bace11e27345d15fc9a922701fc.zip |
Force usage of more up-to-date external org version
This is almost certainly not the simplest way of doing this but as
the derivation builds Emacs anyway it doesn't cost anything to remove
the builtin version of org.
-rw-r--r-- | gui/conf/init.el | 4 | ||||
-rw-r--r-- | gui/emacs.nix | 20 | ||||
-rw-r--r-- | gui/patch/optional-org-gnus.patch | 15 |
3 files changed, 34 insertions, 5 deletions
diff --git a/gui/conf/init.el b/gui/conf/init.el index 5f857df..c8cfe70 100644 --- a/gui/conf/init.el +++ b/gui/conf/init.el @@ -4,6 +4,9 @@ (require 'package) (package-initialize) +(eval-when-compile + (require 'use-package)) + (setq backup-directory-alist `((".*" . "~/.emacs.d/backup"))) (setq custom-file "~/.emacs.d/custom.el") @@ -146,6 +149,7 @@ :ensure t) (use-package org + :ensure t :custom (org-adapt-indentation nil) (org-startup-indented t) diff --git a/gui/emacs.nix b/gui/emacs.nix index a0cd3bd..37c135b 100644 --- a/gui/emacs.nix +++ b/gui/emacs.nix @@ -32,8 +32,8 @@ in { (add-to-list 'exec-path "${tex}/bin") (add-to-list 'exec-path "${pkgs.graphviz}/bin") (add-to-list 'exec-path "${pkgs.sqlite}/bin") - - (setq counsel-etags-update-tags-backend (lambda (src-dir) (shell-command "${pkgs.universal-ctags}/bin/ctags -e -R"))) + (add-to-list 'exec-path "${pkgs.universal-ctags}/bin") + (add-to-list 'exec-path "${pkgs.global}/bin") ''; }; @@ -51,11 +51,21 @@ in { package = pkgs-unstable.emacsWithPackagesFromUsePackage { config = ./conf/init.el; - package = pkgs-unstable.emacsGcc; - extraEmacsPackages = epkgs: with epkgs.melpaPackages; [ + # remove builtin org as in https://github.com/chrisbarrett/.emacs.d/blob/6efd82c8e328e677dbef84331ed54763b89667a3/default.nix + # this is a workaround until I find a better way to force usage of a non-builtin up-to-date org version + package = pkgs-unstable.emacsGcc.overrideAttrs (old: { + patches = old.patches ++ [ + ./patch/optional-org-gnus.patch + ]; + postPatch = '' + ${old.postPatch} + rm -r test/lisp/org lisp/org etc/org etc/ORG-NEWS doc/misc/org.texi + ''; + }); + extraEmacsPackages = epkgs: (with epkgs.melpaPackages; [ pdf-tools mu4e-alert - ] ++ [ + ]) ++ [ akr-color-theme custom-runtime-env pkgs.mu diff --git a/gui/patch/optional-org-gnus.patch b/gui/patch/optional-org-gnus.patch new file mode 100644 index 0000000..b4329dd --- /dev/null +++ b/gui/patch/optional-org-gnus.patch @@ -0,0 +1,15 @@ +diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el +index ee556a3..5ac1d78 100644 +--- a/lisp/gnus/gnus-icalendar.el ++++ b/lisp/gnus/gnus-icalendar.el +@@ -358,8 +358,8 @@ on the IDENTITIES list." + ;; TODO: this is an optional feature, and it's only available with org-mode + ;; 7+, so will need to properly handle emacsen with no/outdated org-mode + +-(require 'org) +-(require 'org-capture) ++(require 'org nil t) ++(require 'org-capture nil t) + + (defgroup gnus-icalendar-org nil + "Settings for Calendar Event gnus/org integration." |