mirror of
https://https.git.savannah.gnu.org/git/guix.git/
synced 2025-07-13 10:30:43 +02:00
gnu: Add emacs-gnus-desktop-notify.
* 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>
This commit is contained in:
parent
f1f419b90f
commit
8d419976b2
4 changed files with 152 additions and 0 deletions
|
@ -1230,6 +1230,8 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/emacs-eglot-x-fix-apply-text-edits.patch \
|
%D%/packages/patches/emacs-eglot-x-fix-apply-text-edits.patch \
|
||||||
%D%/packages/patches/emacs-exec-path.patch \
|
%D%/packages/patches/emacs-exec-path.patch \
|
||||||
%D%/packages/patches/emacs-fix-scheme-indent-function.patch \
|
%D%/packages/patches/emacs-fix-scheme-indent-function.patch \
|
||||||
|
%D%/packages/patches/emacs-gnus-desktop-notify-fix-notifications.patch \
|
||||||
|
%D%/packages/patches/emacs-gnus-desktop-notify-rescan.patch \
|
||||||
%D%/packages/patches/emacs-helpful-fix-signature.patch \
|
%D%/packages/patches/emacs-helpful-fix-signature.patch \
|
||||||
%D%/packages/patches/emacs-helpful-fix-tests.patch \
|
%D%/packages/patches/emacs-helpful-fix-tests.patch \
|
||||||
%D%/packages/patches/emacs-highlight-stages-add-gexp.patch \
|
%D%/packages/patches/emacs-highlight-stages-add-gexp.patch \
|
||||||
|
|
|
@ -37736,6 +37736,43 @@ message.
|
||||||
@end itemize")
|
@end itemize")
|
||||||
(license license:gpl2+)))
|
(license license:gpl2+)))
|
||||||
|
|
||||||
|
(define-public emacs-gnus-desktop-notify
|
||||||
|
(package
|
||||||
|
(name "emacs-gnus-desktop-notify")
|
||||||
|
(version "20180623.1538")
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://gitlab.com/wavexx/gnus-desktop-notify.el.git")
|
||||||
|
(commit "24588a3e024b204d930480fdc8bca31426f4e846")))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32 "06gxqlhfrc9ykq8v7qhxsr4w8hwyv1jkrifpp0kqjhf7idv96010"))
|
||||||
|
(patches
|
||||||
|
(search-patches
|
||||||
|
"emacs-gnus-desktop-notify-fix-notifications.patch"
|
||||||
|
"emacs-gnus-desktop-notify-rescan.patch"))))
|
||||||
|
(build-system emacs-build-system)
|
||||||
|
(home-page
|
||||||
|
"http://www.thregr.org/~wavexx/software/gnus-desktop-notify.el/")
|
||||||
|
(synopsis "Gnus desktop notification global minor mode")
|
||||||
|
(description
|
||||||
|
"@code{gnus-desktop-notify} provides a simple mechanism to notify the
|
||||||
|
user when new messages are received. To get started, place the following
|
||||||
|
configuration snippet in your @file{~/.gnus.el} configuration file:
|
||||||
|
@lisp
|
||||||
|
(require 'gnus-desktop-notify)
|
||||||
|
(gnus-desktop-notify-mode)
|
||||||
|
(gnus-demon-add-rescan)
|
||||||
|
;; Alternatively, configure the period and idle times specifically, e.g.:
|
||||||
|
;; (gnus-demon-add-handler 'gnus-demon-scan-news 10 1)
|
||||||
|
@end lisp
|
||||||
|
The above causes Gnus to scan all configured groups every two 2 hours when
|
||||||
|
Emacs has been idle for 1 hour, with desktop notifications emitted for new
|
||||||
|
messages received.")
|
||||||
|
(license license:gpl3+)))
|
||||||
|
|
||||||
(define-public emacs-ox-epub
|
(define-public emacs-ox-epub
|
||||||
(package
|
(package
|
||||||
(name "emacs-ox-epub")
|
(name "emacs-ox-epub")
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
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
|
||||||
|
|
37
gnu/packages/patches/emacs-gnus-desktop-notify-rescan.patch
Normal file
37
gnu/packages/patches/emacs-gnus-desktop-notify-rescan.patch
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
Upstream-status: https://gitlab.com/wavexx/gnus-desktop-notify.el/-/merge_requests/16
|
||||||
|
|
||||||
|
diff --git a/README.rst b/README.rst
|
||||||
|
index 4cacdcb..150a2c2 100644
|
||||||
|
--- a/README.rst
|
||||||
|
+++ b/README.rst
|
||||||
|
@@ -18,7 +18,7 @@ new messages are received. For basic usage, to be used in conjunction with
|
||||||
|
|
||||||
|
(require 'gnus-desktop-notify)
|
||||||
|
(gnus-desktop-notify-mode)
|
||||||
|
- (gnus-demon-add-scanmail)
|
||||||
|
+ (gnus-demon-add-rescan)
|
||||||
|
|
||||||
|
into your ``.gnus`` file. The default is to use alert_ if available, which
|
||||||
|
works on every operating system and allows the user to customize the
|
||||||
|
@@ -52,7 +52,7 @@ follows:
|
||||||
|
(setq gnus-desktop-notify-function 'gnus-desktop-notify-exec
|
||||||
|
gnus-desktop-notify-exec-program "growlnotify -a Emacs.app -m")
|
||||||
|
(gnus-desktop-notify-mode)
|
||||||
|
- (gnus-demon-add-scanmail)
|
||||||
|
+ (gnus-demon-add-rescan)
|
||||||
|
|
||||||
|
|
||||||
|
Advanced setup
|
||||||
|
diff --git a/gnus-desktop-notify.el b/gnus-desktop-notify.el
|
||||||
|
index 97e65f3..3153807 100644
|
||||||
|
--- a/gnus-desktop-notify.el
|
||||||
|
+++ b/gnus-desktop-notify.el
|
||||||
|
@@ -50,7 +50,7 @@
|
||||||
|
;;
|
||||||
|
;; (require 'gnus-desktop-notify)
|
||||||
|
;; (gnus-desktop-notify-mode)
|
||||||
|
-;; (gnus-demon-add-scanmail)
|
||||||
|
+;; (gnus-demon-add-rescan)
|
||||||
|
;;
|
||||||
|
;; into your ``.gnus`` file. The default is to use `alert' if available, which
|
||||||
|
;; works on every operating system and allows the user to customize the
|
Loading…
Add table
Add a link
Reference in a new issue