From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MAMdKLaJ42BBBAAAgWs5BA (envelope-from ) for ; Tue, 06 Jul 2021 00:37:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0LmxI7aJ42AeLwAAbx9fmQ (envelope-from ) for ; Mon, 05 Jul 2021 22:37:42 +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 E93C120906 for ; Tue, 6 Jul 2021 00:37:41 +0200 (CEST) Received: from localhost ([::1]:47750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0XDf-0005W7-Ev for larch@yhetil.org; Mon, 05 Jul 2021 18:37:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0XD1-0005Vj-Md for emacs-orgmode@gnu.org; Mon, 05 Jul 2021 18:36:59 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:45842) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0XCy-0002j3-OR for emacs-orgmode@gnu.org; Mon, 05 Jul 2021 18:36:59 -0400 Received: by mail-pl1-x635.google.com with SMTP id s13so7868560plg.12 for ; Mon, 05 Jul 2021 15:36:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=FjEYAC3O/MimxoPNmQqjeSdjGQWR7RPxynN6wlF67bU=; b=Uac8g4v2GVFmbQoOQiCumduerrXntD8yQ5Yx4AzadZpvVWZj2cqf1JvK6HoqSl2u/t X45Mc82/qqH7s+ZjSGWpMvRzogHZ6bMNz90nVMS58tXE7+JGfghZbKXj1+rXKpEdLWfd STk0obFrui7gp9r5IT0MNPwXr4KHwAzw7PY/AsANJaziNSohsWq9nC2cO1TtOe0oX0tl MVb83fT9DmhtuKEzDA9Mcu8SWt7i+R26oio+/TWAJDvMks9x35AYSPj11KmLo3moqRxK E13YLeSfpjOtxEjyl/Maq5dCy7qwxsiU+4dA2T+RjFckIuoMnHCo62Be6fmPg4QRbseI q8HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=FjEYAC3O/MimxoPNmQqjeSdjGQWR7RPxynN6wlF67bU=; b=BmC3LpbrVb/zMSKS8PAbALtmTgxDmTJSEaOs0Q82FfApbCjGfWfEXd0BR3YHHF8N46 mC2ZP58iBQlVgvcvTJOVkPdt9EEMymjKc6tLy0xrDfe5Tr046sdDu1l9W/GdciZkf5O7 ixGeQoeHbB6Gbof/B1Dd6Xu3o4XhfulYLcOXVLYH/36C5lPSECkPMgEHO27Wo9qOL2sS 11uTeS1PoUBe4wJLPQFetPc2DJWrVc3j9JX0prQnrJQ74miKIsSCDL3RNWaMxwfwx7aJ AV7aVS2qiPskOEjy4DQtlf6lsSXI52NwQ3uGtoKzHB8CbhCJndPCcSeCr9ni3w3GFRv9 LN9A== X-Gm-Message-State: AOAM5308bwf5D+UlhSi/9ZPdscEzqUChX59YSSpetQSslfWRSh1ol9aS gGPMHkazxcWaCH9U3dVjYw== X-Google-Smtp-Source: ABdhPJwGa1HieVQNuAKRrYClSRncjya6eWcutBBAjUkeUCeE14SgktrniZWtdgxtzUEDpHokUv+eXw== X-Received: by 2002:a17:902:7d83:b029:11d:75c2:79a6 with SMTP id a3-20020a1709027d83b029011d75c279a6mr14354354plm.62.1625524615166; Mon, 05 Jul 2021 15:36:55 -0700 (PDT) Received: from smtpclient.apple ([150.109.103.155]) by smtp.gmail.com with ESMTPSA id r26sm8773401pfq.191.2021.07.05.15.36.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jul 2021 15:36:54 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: Re: [PATCH] make org-notify support for macOS desktop notification From: stardiviner In-Reply-To: Date: Tue, 6 Jul 2021 06:36:51 +0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <5B57CD8B-AA91-4C63-A449-A07364083AEE@gmail.com> To: Maxim Nikulin X-Mailer: Apple Mail (2.3654.100.0.2.22) Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=numbchild@gmail.com; helo=mail-pl1-x635.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: , Cc: Org-mode 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=1625524662; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=FjEYAC3O/MimxoPNmQqjeSdjGQWR7RPxynN6wlF67bU=; b=fv2g8rJ4u+skeqFcvYJLYu3OYS2+FBFMbmKRa6p/alM0Rpg1mD79b9l3e89oshj10w7Ud6 DX5cuvyIUskTQ8/XHQT13GvEenjdLk4PcoyujCBCn8u4N7l8x8XqN42GYuua5ZTu9VS7gT KohGsMEMBudCnXQXQqXpIdaCmEaRb78NcIr2b6c2QYjIWXstCQlTUCDont1fGYeiq3EzpW ATmAuqT8FaKzopN9UwEjUZPiylNGo+Vo2Ri1PhQUqIXUkD0J3f5LdOQfS4KO1UdpXODcaK Uk/yizk1diMYpGUVyh4diO9UEWcWdy3ga1Md0L65oOF3d+/9T4wcCHQbQlQdRQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625524662; a=rsa-sha256; cv=none; b=YzxVrviAaBtOaii2C7P3BRgax3D/kxXWpy7gCA4md03K7sI8V3Eh2WSuSHVrcXaCcWbl29 vmWa3O/C+j8xnaBhjXjZNXsxx6u0SO7ZCZVuPrRxOv2YoMerx8C+K2ZvYntt3C72GoM3CH RC42c7FRlrpxnRzn8Tm9VXObZgD72xcGReVmZtpQMpCo89huLxkhC47tvn85CF8kEv/oo9 IZFIE/m3fH5cuSXs0bnzo0mGUcQM8KuEa9R82P8OYD+DxMdIjMDfbVAYf/v5585NhmaGf+ SI8gRStxf4q0TYIpy9l5Kohx+g13S8tQXN0Q8UbwguxRal6x77qJHxNiy+PXsw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Uac8g4v2; 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: -2.61 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Uac8g4v2; 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: E93C120906 X-Spam-Score: -2.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: l1DXLa5ZGK4q > On Jul 5, 2021, at 7:55 PM, Maxim Nikulin wrote: >=20 > 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. >=20 > 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. >=20 > I expect that a simple script "notify-send" may allow to avoid = modification of code. Something like (untested, unsure concerning = "quoted form of ...") >=20 > #!/usr/bin/env osascript > display notification (item 1 of argv) >=20 > 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. >=20 >> - ((fboundp 'notifications-notify) >> + ((and (eq system-type 'gnu/linux) (fboundp = 'notifications-notify)) >=20 > 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. =46rom 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. >=20 >=20 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?=