about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-12-04 02:03:47 +0000
committerAlyssa Ross <hi@alyssa.is>2020-12-04 17:15:57 +0000
commit3aa6f04b9f689cf06df7fe08f172e2f225b13034 (patch)
tree2304b65b4b2decbfebf1b2963677b5fc2034adc6
parent165b2e77ad00cad1cd878e410063dc306cb4b002 (diff)
downloadnixlib-3aa6f04b9f689cf06df7fe08f172e2f225b13034.tar
nixlib-3aa6f04b9f689cf06df7fe08f172e2f225b13034.tar.gz
nixlib-3aa6f04b9f689cf06df7fe08f172e2f225b13034.tar.bz2
nixlib-3aa6f04b9f689cf06df7fe08f172e2f225b13034.tar.lz
nixlib-3aa6f04b9f689cf06df7fe08f172e2f225b13034.tar.xz
nixlib-3aa6f04b9f689cf06df7fe08f172e2f225b13034.tar.zst
nixlib-3aa6f04b9f689cf06df7fe08f172e2f225b13034.zip
patches/emacs: async-shell-command comint terminfo
-rw-r--r--modules/workstation/emacs/init.el6
-rw-r--r--overlays/patches/default.nix4
-rw-r--r--overlays/patches/emacs/default.nix17
3 files changed, 22 insertions, 5 deletions
diff --git a/modules/workstation/emacs/init.el b/modules/workstation/emacs/init.el
index a61ebccd50fb..d77585482e43 100644
--- a/modules/workstation/emacs/init.el
+++ b/modules/workstation/emacs/init.el
@@ -47,10 +47,8 @@
   (add-to-list 'c-default-style '(other . "linux")))
 
 ;;; Comint ;;;
-(defun enable-comint-ansi-color ()
-  (when ansi-color-for-comint-mode
-    (enable-ansi-color)))
-(add-hook 'comint-mode-hook #'enable-comint-ansi-color)
+;; This relies on an Emacs patch to apply to async-shell-command.
+(setq comint-terminfo-terminal "dumb-emacs-ansi")
 
 ;;; Dired ;;;
 (with-eval-after-load 'dired
diff --git a/overlays/patches/default.nix b/overlays/patches/default.nix
index 7463f95c4b41..23a2b465bc34 100644
--- a/overlays/patches/default.nix
+++ b/overlays/patches/default.nix
@@ -3,7 +3,9 @@ self: super: {
 
   dino = self.callPackage ./dino { inherit (super) dino; };
 
-  inherit (self.waylandPkgs) emacs-pgtk;
+  emacs-pgtk = self.callPackage ./emacs {
+    emacs = self.waylandPkgs.emacs-pgtk;
+  };
 
   emacsPackagesFor = emacs: self.callPackage ./emacs/packages.nix {
     emacsPackages = super.emacsPackagesFor emacs;
diff --git a/overlays/patches/emacs/default.nix b/overlays/patches/emacs/default.nix
new file mode 100644
index 000000000000..b4c499209e90
--- /dev/null
+++ b/overlays/patches/emacs/default.nix
@@ -0,0 +1,17 @@
+{ emacs, fetchpatch, ... } @ args:
+
+let
+  inherit (builtins) removeAttrs;
+in
+
+(emacs.override (removeAttrs args [ "emacs" "fetchpatch" ])).overrideAttrs (
+  { patches ? [], ... }:
+  {
+    patches = patches ++ [
+      (fetchpatch {
+        url = "https://git.savannah.gnu.org/cgit/emacs.git/patch/?id=cbfce827ace4c410a2eed50c8d8c763721925b7e";
+        sha256 = "0gy5vzcrrz7bba2y6xg6v67z625v6zbsia3i3ki0nk2ksayn9h9c";
+      })
+    ];
+  }
+)