mirror of
https://https.git.savannah.gnu.org/git/guix.git/
synced 2025-07-13 10:30:43 +02:00
* gnu/packages/emacs-xyz.scm (emacs-gnus-desktop-notify): New variable. * gnu/packages/patches/emacs-gnus-desktop-notify-fix-notifications.patch: New file. * gnu/packages/patches/emacs-gnus-desktop-notify-rescan.patch: Likewise. * gnu/local.mk (dist_patch_DATA): Register them. Change-Id: I7f25870949411f8f1326871d67bdbdbe59feef6b Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
76 lines
2.7 KiB
Diff
76 lines
2.7 KiB
Diff
Upstream status: https://gitlab.com/wavexx/gnus-desktop-notify.el/-/merge_requests/15
|
|
|
|
From 905e7ea41560783ec723aa0167911ba050f91789 Mon Sep 17 00:00:00 2001
|
|
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
|
Date: Mon, 16 Jun 2025 09:24:07 +0900
|
|
Subject: [PATCH] Revert to use the notifications library by default.
|
|
|
|
The alert library project itself mentions that:
|
|
|
|
For desktop notifications, the notifications package that is
|
|
installed with emacs, provides a probably better alternative for
|
|
most users.
|
|
|
|
and it appears true, as by default `alert' simply print notification
|
|
messages to the `*Messages*' buffer, which is not exactly a desktop
|
|
notification.
|
|
|
|
* gnus-desktop-notify.el (require): Require notifications first,
|
|
falling back to alert.
|
|
(gnus-desktop-notify-function): Test for the notifications feature
|
|
first. Mention `notifications' is the default in its doc.
|
|
---
|
|
gnus-desktop-notify.el | 15 ++++++++++-----
|
|
1 file changed, 10 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/gnus-desktop-notify.el b/gnus-desktop-notify.el
|
|
index 97e65f3..a12e444 100644
|
|
--- a/gnus-desktop-notify.el
|
|
+++ b/gnus-desktop-notify.el
|
|
@@ -26,6 +26,11 @@
|
|
|
|
;;; Change Log:
|
|
|
|
+;; 1.5:
|
|
+;; * Revert to use the `notifications' library by default if
|
|
+;; available. The `alert' library doesn't do anything useful in its
|
|
+;; default configuration.
|
|
+;;
|
|
;; 1.4:
|
|
;; * Use `alert' package by default if available (`gnus-desktop-notify-alert').
|
|
;;
|
|
@@ -83,8 +88,8 @@
|
|
(require 'format-spec)
|
|
(require 'gnus-group)
|
|
|
|
-(unless (require 'alert nil t)
|
|
- (require 'notifications nil t))
|
|
+(unless (require 'notifications nil t)
|
|
+ (require 'alert nil t))
|
|
|
|
(declare-function alert "alert")
|
|
(declare-function notifications-notify "notifications")
|
|
@@ -96,8 +101,8 @@
|
|
:group 'gnus)
|
|
|
|
(defcustom gnus-desktop-notify-function
|
|
- (cond ((featurep 'alert) 'gnus-desktop-notify-alert)
|
|
- ((featurep 'notifications) 'gnus-desktop-notify-dbus)
|
|
+ (cond ((featurep 'notifications) 'gnus-desktop-notify-dbus)
|
|
+ ((featurep 'alert) 'gnus-desktop-notify-alert)
|
|
(t 'gnus-desktop-notify-send))
|
|
"Notification backend used when a group receives new messages.
|
|
The backend is passed the notification content as a single,
|
|
@@ -109,8 +114,8 @@ or fallback to the generic `gnus-desktop-notify-send' otherwise.
|
|
|
|
The following functions are available (whose documentation see):
|
|
|
|
+`gnus-desktop-notify-dbus': Use the `notifications' library (default).
|
|
`gnus-desktop-notify-alert': Use the `alert' library.
|
|
-`gnus-desktop-notify-dbus': Use the `notifications' library.
|
|
`gnus-desktop-notify-send': Call the `notify-send' program.
|
|
`gnus-desktop-notify-exec': Call a customizable program."
|
|
:type 'function)
|
|
--
|
|
GitLab
|
|
|