From 5d825446ccf785af52bf61c9350ff8713f9b7077 Mon Sep 17 00:00:00 2001 From: Ade Attwood Date: Sat, 9 Apr 2022 07:50:34 +0100 Subject: [PATCH] feat(emacs): add status icons to compilation notification When the compilation notification displays it will now show an icon with the result of the compilation. --- site-modules/core/files/emacs/src/development.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/site-modules/core/files/emacs/src/development.el b/site-modules/core/files/emacs/src/development.el index a6491ba..7bf46ce 100644 --- a/site-modules/core/files/emacs/src/development.el +++ b/site-modules/core/files/emacs/src/development.el @@ -139,13 +139,17 @@ (global-aa-tab-mode) ;; https://people.gnome.org/~federico/blog/compilation-notifications-in-emacs.html +;; (setq compilation-finish-functions +;; (append compilation-finish-functions +;; '(fmq-compilation-finish))) + (setq compilation-finish-functions - (append compilation-finish-functions - '(fmq-compilation-finish))) + '(fmq-compilation-finish)) (defun fmq-compilation-finish (buffer status) + (print status) (call-process "notify-send" nil nil nil "-t" "30000" ;; Display notification for 30 seconds - "-i" "emacs" + "-i" (if (string-match "^finished" status) "dialog-ok" "dialog-no") "Compilation finished in Emacs" status))