From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jay Kamat Subject: [PATCH] Allow :urgency flags for org-notify Date: Sat, 13 Jan 2018 19:13:40 -0500 Message-ID: <87mv1h1emj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eaVvn-0006fN-4J for emacs-orgmode@gnu.org; Sat, 13 Jan 2018 19:13:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eaVvj-0005z9-4H for emacs-orgmode@gnu.org; Sat, 13 Jan 2018 19:13:47 -0500 Received: from mail-yb0-x236.google.com ([2607:f8b0:4002:c09::236]:44527) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eaVvi-0005yw-UO for emacs-orgmode@gnu.org; Sat, 13 Jan 2018 19:13:43 -0500 Received: by mail-yb0-x236.google.com with SMTP id h62so3031834ybi.11 for ; Sat, 13 Jan 2018 16:13:42 -0800 (PST) Received: from laythe (res380d-128-61-81-32.res.gatech.edu. [128.61.81.32]) by smtp.gmail.com with ESMTPSA id l37sm10665064ywa.5.2018.01.13.16.13.40 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 13 Jan 2018 16:13:40 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org Mode --=-=-= Content-Type: text/plain Hi, I recently began using the org-notify package, and I would like to pass the :urgency flag to `notifications-notify' occasionally. This small patch passes the :urgency key from the org-notify configuration on to `notitifications-notify'. For example, after this patch, you can: (org-notify-add 'test-notifications '(:time "10m" :period "1m" :actions -notify/window :urgency critical)) And get notifications labeled as critical in that way. Eventually, I would like to write an alert (https://github.com/jwiegley/alert) backend for org-notify, would that be suitable for inclusion in the core package? Thanks, -Jay --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Respect-urgency-tags-for-org-notify-windows.patch >From dc8d8917720985e7006e75100ccc9f32c0e27b06 Mon Sep 17 00:00:00 2001 From: Jay Kamat Date: Sat, 13 Jan 2018 19:03:07 -0500 Subject: [PATCH] Respect :urgency tags for org-notify windows * contrib/lisp/org-notify.el (org-notify-action-notify): pass :urgency to notifications-notify. --- contrib/lisp/org-notify.el | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/lisp/org-notify.el b/contrib/lisp/org-notify.el index 5f64d3162b..96e7d4ee27 100644 --- a/contrib/lisp/org-notify.el +++ b/contrib/lisp/org-notify.el @@ -373,6 +373,7 @@ org-notify window. Mostly copied from `appt-select-lowest-window'." :title (plist-get plist :heading) :body (org-notify-body-text plist) :timeout (if duration (* duration 1000)) + :urgency (plist-get plist :urgency) :actions org-notify-actions :on-action 'org-notify-on-action-notify))) (setq org-notify-on-action-map -- 2.11.0 --=-=-=--