From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sKZFIpHz4mBFVAAAgWs5BA (envelope-from ) for ; Mon, 05 Jul 2021 13:57:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id IIf+HZHz4mDNRAAA1q6Kng (envelope-from ) for ; Mon, 05 Jul 2021 11:57:05 +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 96677E0FD for ; Mon, 5 Jul 2021 13:57:04 +0200 (CEST) Received: from localhost ([::1]:58328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0NDj-0007Gs-E1 for larch@yhetil.org; Mon, 05 Jul 2021 07:57:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0NCJ-0005ic-Dz for emacs-orgmode@gnu.org; Mon, 05 Jul 2021 07:55:35 -0400 Received: from ciao.gmane.io ([116.202.254.214]:45918) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0NCH-0006k3-Gz for emacs-orgmode@gnu.org; Mon, 05 Jul 2021 07:55:34 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1m0NCE-00055U-5B for emacs-orgmode@gnu.org; Mon, 05 Jul 2021 13:55:30 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Maxim Nikulin Subject: Re: [PATCH] make org-notify support for macOS desktop notification Date: Mon, 5 Jul 2021 18:55:24 +0700 Message-ID: References: <5B57CD8B-AA91-4C63-A449-A07364083AEE@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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=1625486224; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=7YYBAy9baHTCRIj6HzbdqV+oVAAumUDFnlnp54K5UPM=; b=bd26ZARgH6ZpYLabgiEklZiH+EVc3ZahLSoPf+qifn7kvaGM3kT3urPwEkf5+2qw+RU4N/ lqEoaaMuq48p9nmw16HGWFOrOSIcvAhJ+ERFuRccdFWLtHMwe3Zr5mvLlDuqRV5tCw7Hs1 GmiIGuqQUIMC3Z9P6KCkTrjDiNuXJWWciPRS4OQmUGlZAruHjMwG7yESVr7I6GBXCBFmaK +0uNWVhS8BgzEp3p3pWd8cJeMDu1DHXuRX7DSP+ZroddGy/msXxjf9R/ZY8JgkgBz8DT+i QfFL/q1ayK7t+aAM0ocIUMt+lIBRSYQBS1NVjZ/0qHJcF/h5T1aoYAhtR2Fq6g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625486224; a=rsa-sha256; cv=none; b=o0csCLr4HXVXphcrZkMtRnc+L1QTn+FdClTITHWhliU/lKt9Od+WKuB0LVNpPhIZA0ZFIf BNBVzee5An+NXg01btVjeh2io9YLaP/4JyMuH/Rv6UbBnHTE7dAfdi7Exgr70O27JRAw9f En8DiyG4itfjPn97AyX64lMfnsp9ESPcdymoY8z4nSj44ePl0jG1V5EFUW2nWYwlpsJbg0 xogawq7AhDzwDCOv1UaAtarj68EcX8WJ5HW6+Lit86cxKS6GdsU3j7Xn++wZ0sFysjPIWj SuOCInJTk5UJ5/HmejC4KCoc0C8JEaIC3qeuWiiW3lXtIfbBzs2Qk24a3guKgg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: -1.81 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: 96677E0FD X-Spam-Score: -1.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: P8g00VOnIWYG 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.