From 3aa6f04b9f689cf06df7fe08f172e2f225b13034 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Fri, 4 Dec 2020 02:03:47 +0000 Subject: patches/emacs: async-shell-command comint terminfo --- modules/workstation/emacs/init.el | 6 ++---- overlays/patches/default.nix | 4 +++- overlays/patches/emacs/default.nix | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 overlays/patches/emacs/default.nix 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"; + }) + ]; + } +) -- cgit 1.4.1