From 34148bdc9e5fa51a5ca510700fd8002b7a0d66ee Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Mon, 11 Sep 2023 11:59:16 +0400 Subject: [PATCH] rde: compile: Don't notify if buffer is visible. --- src/rde/features/shellutils.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rde/features/shellutils.scm b/src/rde/features/shellutils.scm index 74e03e69..30036602 100644 --- a/src/rde/features/shellutils.scm +++ b/src/rde/features/shellutils.scm @@ -84,6 +84,12 @@ ;; TODO: Don't send notification on interrupt (when (and rde-compile-notify-on-finish-p (not (string= desc "interrupt\n")) ; it is in user focus rn + ;; frame in the focus and buffer is visible + (not + ;; comparing to t make sense because return value can be + ;; not only nil, but also 'unknown + (and (equal t (frame-focus-state (selected-frame))) + (get-buffer-window buffer))) (not (member buffer rde-compile-buffers-to-ignore))) (require 'notifications) (notifications-notify -- 2.45.2