From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Schumacher Subject: Re: org-show-notification of org-clock.el broken on MS Windows Date: Sun, 26 Jan 2020 12:19:44 +0100 Message-ID: <85ftg2mpm7.wl-tim@datenknoten.me> References: <85sgk52pck.wl-tim@datenknoten.me> <87eevmk553.fsf@gnu.org> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: multipart/mixed; boundary="Multipart_Sun_Jan_26_12:19:44_2020-1" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:43318) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivfxO-000815-3L for emacs-orgmode@gnu.org; Sun, 26 Jan 2020 06:19:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ivfxM-0002xC-G9 for emacs-orgmode@gnu.org; Sun, 26 Jan 2020 06:19:57 -0500 Received: from mx.datenknoten.me ([144.76.154.114]:39035) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ivfxL-0002pn-UU for emacs-orgmode@gnu.org; Sun, 26 Jan 2020 06:19:56 -0500 Received: from DESKTOP-S2MHPM8.datenknoten.me (p200300E3673FC20011443111EB445A03.dip0.t-ipconnect.de [IPv6:2003:e3:673f:c200:1144:3111:eb44:5a03]) by mx.datenknoten.me (Postfix) with ESMTPSA id 91E371015B8 for ; Sun, 26 Jan 2020 12:19:48 +0100 (CET) In-Reply-To: <87eevmk553.fsf@gnu.org> 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --Multipart_Sun_Jan_26_12:19:44_2020-1 Content-Type: text/plain; charset=US-ASCII Hi Bastien, On Sun, 26 Jan 2020 10:12:40 +0100, Bastien wrote: > > * The function org-show-notification should be more robust. It should not fail > > if it can't fire a notification for whatever reason. > > Please send a patch if needed for this. I tried my best, check the attachedd patch. > > * On MS Windows the function w32-notification-notify should be used. > > I just fixed this one: > https://code.orgmode.org/bzg/org-mode/commit/8dd2984a This actualy does not work, because the notification will be closed instantly and it will never appear. I'm currently in the process of writing a patch[1] to change that. The problem is, that emacs give the notification a static id and if there is a notification from your application with the same id windows wont spawn another notification, because you can update the notification. My plan is, to genrate a GUID and use that as its id, so that you can have multiple notifications and don't have to close the notification. But this does not work yet, since my C skills are not as good as it used to be. Thanks for your work! Tim [1] https://github.com/emacs-mirror/emacs/compare/master...enko:feature/notification-guid --Multipart_Sun_Jan_26_12:19:44_2020-1 Content-Type: application/octet-stream; type=patch; name="0001-org-clock.el-Check-if-dbus-is-available-for-notifica.patch" Content-Disposition: attachment; filename="0001-org-clock.el-Check-if-dbus-is-available-for-notifica.patch" Content-Transfer-Encoding: base64 RnJvbSBkZmNlYzY5YzdmOWY4OWNiYjM0ZWQzZjA3Y2Q1MzYyOTYxZDgwYzUzIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBUaW0gU2NodW1hY2hlciA8dGltQGRhdGVua25vdGVuLm1lPgpE YXRlOiBTdW4sIDI2IEphbiAyMDIwIDEyOjE0OjI2ICswMTAwClN1YmplY3Q6IFtQQVRDSF0gb3Jn LWNsb2NrLmVsOiBDaGVjayBpZiBkYnVzIGlzIGF2YWlsYWJsZSBmb3IKIG5vdGlmaWNhdGlvbnMt bm90aWZ5CgotLS0KIGxpc3Avb3JnLWNsb2NrLmVsIHwgMiArLQogMSBmaWxlIGNoYW5nZWQsIDEg aW5zZXJ0aW9uKCspLCAxIGRlbGV0aW9uKC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9vcmctY2xvY2su ZWwgYi9saXNwL29yZy1jbG9jay5lbAppbmRleCA3ZmI5N2YwMjEuLjE1N2Q1NTUwOSAxMDA2NDQK LS0tIGEvbGlzcC9vcmctY2xvY2su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