From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CNhzF9Gg42CzMgAAgWs5BA (envelope-from ) for ; Tue, 06 Jul 2021 02:16:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0DeGEtGg42C6cQAAbx9fmQ (envelope-from ) for ; Tue, 06 Jul 2021 00:16:17 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C3F0D186A2 for ; Tue, 6 Jul 2021 02:16:16 +0200 (CEST) Received: from localhost ([::1]:55678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0Yl5-0001qK-4r for larch@yhetil.org; Mon, 05 Jul 2021 20:16:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0YkT-0001qA-Fu for emacs-orgmode@gnu.org; Mon, 05 Jul 2021 20:15:37 -0400 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:54914) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0YkR-0004wr-Q1 for emacs-orgmode@gnu.org; Mon, 05 Jul 2021 20:15:37 -0400 Received: by mail-pj1-x1030.google.com with SMTP id g24so12547104pji.4 for ; Mon, 05 Jul 2021 17:15:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:date:in-reply-to:message-id :mime-version; bh=pKBSKk9nx/39DtxTRztWj0gH9jlp95WSV0Dy+9TJeB4=; b=AJo/oyBGuLO0nh2ic+c1chAMQiVNKr+J/qlfhTApqBGe6/fGUafaY0kAMFecgwju9s 8gFRK1dgh71fUsa7n8da04uFstbYKkaiBksSeWLv731DSHv8fgpw9EelfiUwqW63GByI 1xz1L35YT99VcJg5AgWH2y7nYfJvZ3jJMTGQKY3ZBbejthT5NUCUQ+XVrucG1jveTI7o Q+0y/a4bCCwpSaqZccspGi6nKjiXQDK2s9kcJvP2AJDvWTvL8gGkP3HcVxB2o6iXFXZm TT2UUQTB30fR/Fq5eiSJ0fO1oXJydVZlQntjr0eJQdmjjSNukXwdw4duaguJ85s2FMIP Wziw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject:date :in-reply-to:message-id:mime-version; bh=pKBSKk9nx/39DtxTRztWj0gH9jlp95WSV0Dy+9TJeB4=; b=DwQSenGZkcIQ3a0oJDft4wC9KBZXvQJlIuXo7lsZ7UNfQqhmfYqX3TV38a43pu0i70 K8QAGOz61Ngg1yjCLN9m9T+n6+h3yFGR/pH7goGv+G/T4Jygqteb+3Wwtl1LPaSPAfYS s5EpsL4kSowudRiChFwYtglANnk9IxlbYPZWdAitDtmlak+07qmzSeQrf9Wlp43/iFrI dukau7t4rJAz1wvI5i8PdpxpHb9tCntejYseREiym11p8g1Hk0QHsFucJz27U2knvYT2 SyRM/vVRMN9qVCePr9KlnbL4MS8j5wDjFlImZPq2hstiTju0wTPKHa1i23JtGdf46/VJ oSeQ== X-Gm-Message-State: AOAM532nCiLn4obEZJXgQ+e62bJF4Bt1cgwxpsOlt9b/6HJzkmeugVNq b8cSr7hFPMCFue/xmBhtWdYgu2TAThU= X-Google-Smtp-Source: ABdhPJzNbRXcGhOuWIX2Y62HY6DaCvsWyrgs+4sHBhIHyLD6M0wfiNbxnyNKgGh1jeBjPn5qphtC4w== X-Received: by 2002:a17:90a:fb56:: with SMTP id iq22mr1504449pjb.35.1625530532838; Mon, 05 Jul 2021 17:15:32 -0700 (PDT) Received: from tim-desktop (220-235-1-69.dyn.iinet.net.au. [220.235.1.69]) by smtp.gmail.com with ESMTPSA id s63sm13764844pfb.195.2021.07.05.17.15.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 17:15:32 -0700 (PDT) References: <5B57CD8B-AA91-4C63-A449-A07364083AEE@gmail.com> User-agent: mu4e 1.5.13; emacs 28.0.50 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: [PATCH] make org-notify support for macOS desktop notification Date: Tue, 06 Jul 2021 10:06:29 +1000 In-reply-to: Message-ID: <87im1ol2lb.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=theophilusx@gmail.com; helo=mail-pj1-x1030.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625530577; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=pKBSKk9nx/39DtxTRztWj0gH9jlp95WSV0Dy+9TJeB4=; b=AKTFA4NYQcYe8635slaKcGQdsy2glOtIZME6JNPs/hDvhPfHtJM3Z40eZQIyV5cTwfrOm/ e371RlOzGcVwVVaxQemF/dXnvgJ0rYKkqvmUIC2oVO3xFznQvy3mxcL+JNSiHx/sDaOWkb jRjGSl/BHkz4+VppNkCSbG8QHR+RfJRjzeh9bKNEQBQInynfBvzJ5VmUnMmvEjI80/MKz0 4qEm/IkrzhsPT3l2uNOPhdeFp//ONbD4Qzug83DtAJi/GvsAn88ZUC2VwdLN0RUsOkxkxT 8/RP9jDE2fTg84Rxgz/OsA25S/erttXtWK2xQw3+FfFhzQgXd2rSWfFIScZ9Gw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625530577; a=rsa-sha256; cv=none; b=jDEmDaTtd5AuPYyxMbrA1nQZS2q0sqnJh5vto0aVGCKF8zctLb74mPnSf6pZnQHPO4W8vs ZzjPb1GZaXlLlUTrMciD2lW1434LiVdzbi/cQiScdUJqKzhdBwclpnIW/uRXCldMhUOUOq zPqwsmQJUUg6aFFfxAaZrbZB59Vv/Iyjc8ouJ8bCwCdzGUHeUSu2mmy1riEsV17Uk/kF/6 btTHSR6GacFuNm6tFVWC8xk1+Q2TUHfQFz8EkUA8UaTmwvxURCo1TFJgow2zeQSSL4/9c0 KbifnN06HM86Ia0ufncNGSZiY4WHYQ0XQgAhiH0wGSKYiMIgC/8udrh9JWWd+Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="AJo/oyBG"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="AJo/oyBG"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: C3F0D186A2 X-Spam-Score: -3.11 X-Migadu-Scanner: scn1.migadu.com X-TUID: BeRPlKoG/juY stardiviner writes: >> On Jul 5, 2021, at 7:55 PM, Maxim Nikulin wrote: >> >> On 05/07/2021 10:50, stardiviner wrote: >>> I updated the patch, I found the package `osx-lib` contains solution. >>> So I removed the directly osascript process invocation. >> >> I have no objections any more. On the other hand I have no access to macOS, so >> I have not tested this patch. Feel free to ignore comments from this message, >> they are mostly matter of taste. >> >> I expect that a simple script "notify-send" may allow to avoid modification of >> code. Something like (untested, unsure concerning "quoted form of ...") >> >> #!/usr/bin/env osascript >> display notification (item 1 of argv) >> >> However if osx-lib in is installed automatically, it may be more convenient. >> Unsure if some of currently supported linux distributions have notify-send >> that can not handle title as the first argument. >> >>> - ((fboundp 'notifications-notify) >>> + ((and (eq system-type 'gnu/linux) (fboundp 'notifications-notify)) >> >> Does it mean that `notifications-notify' is bound but it does not work on >> macOS? If so, maybe it is better to put new clause for 'darwin above and to >> drop 'gnu/linux here. From my point of view, it is preferable to avoid >> additional requirement for `notifications-notify'. If someone will create a >> feature request for `notifications-notify' for macOS, it will just work >> without installing of additional packages as soon as such feature is >> implemented. >> >> > I indeed tried `notifications-notify`. And it does not work, reports error that > it needs dbus. PS. I used the Homebrew formulae version Emacs. > I considered the order of conditions. Because notifications and notify-send etc > requires dbus. So I guess only Linux supports that. So add system-type detection > will be better. WDYT? I think you can add dbus support to macOS using homebrew and that might resolve the issue. At the very least, this will need to be investigated because otherwise, adding this patch may break configurations for users who have added dbus support via homebrew and have notifications working, but have not installed the osx-lib package. My only small concern with your proposed changes is that it will add a dependency on a new package osx-lib, which I think is only available in melpa. At the very least, this will need to be documented somewhere. However, I'm not sure what the situation is wrt adding code which depends on an external package which is not available in either elpa or nongnuELPA? As org mode is a part of GNU Emacs, I suspect that any code which 'encourages' the use of melpa packages will not be acceptable. -- Tim Cross