From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kGXOMXHr5mD5agAAgWs5BA (envelope-from ) for ; Thu, 08 Jul 2021 14:11:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4QFmLXHr5mA4cwAA1q6Kng (envelope-from ) for ; Thu, 08 Jul 2021 12:11:29 +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 00EAC30898 for ; Thu, 8 Jul 2021 14:11:29 +0200 (CEST) Received: from localhost ([::1]:36320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1SsI-0002PN-PU for larch@yhetil.org; Thu, 08 Jul 2021 08:11:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1Sml-0005W2-GG for emacs-orgmode@gnu.org; Thu, 08 Jul 2021 08:05:43 -0400 Received: from smtp.chopps.org ([54.88.81.56]:54542) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1Smf-0004qb-HO for emacs-orgmode@gnu.org; Thu, 08 Jul 2021 08:05:43 -0400 Received: from ja.int.chopps.org.chopps.org (047-026-251-217.res.spectrum.com [47.26.251.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by smtp.chopps.org (Postfix) with ESMTPSA id ACC3980E88; Thu, 8 Jul 2021 12:05:36 +0000 (UTC) References: <5B57CD8B-AA91-4C63-A449-A07364083AEE@gmail.com> <87im1ol2lb.fsf@gmail.com> <7318E1D0-613A-4301-8097-779D3FEF1105@gmail.com> <1CCC83B2-3EFB-4221-9543-03A7BA935C70@gmail.com> <89A2389D-0283-4C12-B80D-831730ABB2A2@chopps.org> <10EF755E-7DA3-454D-88D7-80C0A8D0E566@gmail.com> <42F783E1-86BF-4980-AD50-3673DC98D12B@chopps.org> <080251C2-96F5-447A-82A3-7D036A6AA73B@gmail.com> User-agent: mu4e 1.5.13; emacs 27.2 From: Christian Hopps To: stardiviner Subject: Re: STOP this patch for now. Date: Thu, 08 Jul 2021 08:02:19 -0400 In-reply-to: <080251C2-96F5-447A-82A3-7D036A6AA73B@gmail.com> Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: none client-ip=54.88.81.56; envelope-from=chopps@chopps.org; helo=smtp.chopps.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_SBL_A=0.1 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: , Cc: Tim Cross , Christian Hopps , 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=1625746289; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=aBTO9g++pXbR8Ka6Glkf2e/X45TBknVfARF4ilTJm7o=; b=KNY2CZeaaMk6hXetEQzW+VlRRQlqFHS7GHdWZuV8b0bm1PfhroJz4haZ1v0IZpRlXokchi 94In5zLlkB13bCRNsVocIdn97NPs8wsfc6ScHhr5sXFlXpLgx0REK7o5hSBngkJug6it+O e7qqJcqWC/YMplUNGg5e9R9mqeZKp13MuU4kPxdRsFckQ2FJ3JKElAVVTNjHMkeZneA6D+ zrreUeUuwnOBO7hLSuCxjbckGfWHtHsrw6tCHRBh61+oZyBNQqXMsKnmgiWsuuVezbKAhQ wP3M/TUm2DxCbmuQhUJlIejq/+3W1PrGUpQspeHAUHIKNB62lmHOIvleP8Qx3g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625746289; a=rsa-sha256; cv=none; b=W6eLVIm43dJ3n7RIbxsa3eSyleb85GaaPQ+DF0mde4xwQsIt2LGvCh1Jee9f+kleKYECGQ pYZBs4Whu6NuH+EKapCiigmLnk0gRwSvzrPHn8/5i8h6bGoP1zVt2wEJ6uJGaHaANUdy52 17JmTlsQrPG5f+XmW+/I1gLzG/zQGC4VT1Kky03w8hsZ5Osto3WbLSYZdTmUzYvxwZDyRR MTc+lgLPCcn+P1WQQrpt3QzmjcNgtfcigIgzkV+6M4DEMy6poybAcHJkHujnd59d1RiYDO R/xpKEtkAZq6nMS+TzY79rOI06E20DlgDRsG/d7gt1CqudKMhNK8gp605wHMZw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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: -4.51 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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: 00EAC30898 X-Spam-Score: -4.51 X-Migadu-Scanner: scn1.migadu.com X-TUID: cAnLSYhAWFTw --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable stardiviner writes: > On Jul 8, 2021, at 4:59 PM, Christian Hopps > wrote: > > It may eventually be incorporated into the very popular emacs-mac > port (railwaycat tap in homebrew); however, it will probably not > be incorporated into the nextstep/emacs main code. I started > looking at doing a version for the mainline code, but it=E2=80=99s ha= rd > to get motivated b/c using that version of emacs on OS X is a > pretty sub-par experience. > > > Thanks for your work on this support. I found upstream is less > active. Don=E2=80=99t know when will be merged. > > > > I only commented on this b/c I think you might are disabling > notifications-notify which work great with my code changes, and > using something else if you see Darwin OS, and that will break my > native =E2=80=9CJust Works=E2=80=9D support for notifications, which = again may > end up on many peoples machines. I would ask that the patch be > modified in a way that didn=E2=80=99t break native support if present > before it was accepted. > > Also as you can see by the multiple patches you=E2=80=99ve submitted > there=E2=80=99s really no good answer for an external notifier, so > whatever you pick is probably going to be wrong for someone I > guess. > > > Yes, this troubled my too. Currently no good solution. I will stop > this patch for now. Wait for upstream emacs-mac port support. Hope it > will be arrived in at leas half of year. You could add a comment to the pull-request in support of merging. :) https://bitbucket.org/mituharu/emacs-mac/pull-requests/10 FWIW, if you are currently using the railwaycat tap in homebrew you can jus= t switch to my tap and you'll get the support right now. It should be just = as easy to install. Thanks, Chris. > > > > If this patch is going to be accepted I would ask that it > > 1) be conditional (disable-able with a variable) > 2) do the check for the custom installed external notifier and if > not present then fallback to using the emacs supplied > notifications-notify > 3) not restrict notifications-notify to gnu/linux only. > > That way people that have already developed solutions for this > won=E2=80=99t have them broken. > > Thanks, > Chris. > > > On Jul 7, 2021, at 8:00 PM, stardiviner > wrote: > > Hi Chris, thanks for your work. I have a question, will your > patch of notification code be merged to upstream? > If yes, I think my patch will be not necessary. If no, then I > think add a my workaround for macOS is considerable. > > > On Jul 7, 2021, at 2:23 AM, Christian Hopps < > chopps@chopps.org> wrote: > > It supports imagemagick (specify =E2=80=94with-imagemagick), = and > it includes svg by default, I simply forked the > railwaycat version and added the native notification > code. > > Thanks, > Chris. > > > On Jul 6, 2021, at 11:30 AM, stardiviner < > numbchild@gmail.com> wrote: > > Thanks for your suggestion. Does your Emacs build > supports imagemagick image view and svg feature > support? Because company-mode now have built-in icons > support. This is the reason that I switch from https: > //emacsformacosx.com/ to Homebrew cask Emacs version. > > > On Jul 6, 2021, at 12:21 PM, Christian Hopps < > chopps@chopps.org> wrote: > > Hi, > > Please consider: I added full native notification > support to the popular OS X Emacs build available > in homebrew. This supports rewrites > notifications-notify defun to use the native code > rather than dbus, and so everything "Just Works". > > Info can be found here: > > https://github.com/choppsv1/homebrew-emacsmacport > > Thanks, > Chris. > > stardiviner writes: > > > Here is the new patch which invokes > notifications though Emacs built-in API > `ns-do-applescript`. > > [2. text/x-patch; > 0001-org-clock.el-Make-org-notify-support-macOS-n= otificat.patch]... > > > > > On Jul 6, 2021, at 8:06 AM, Tim Cross < > theophilusx@gmail.com> wrote: > > > 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 > > > > > > > > > > > --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEm56yH/NF+m1FHa6lLh2DDte4MCUFAmDm6gwACgkQLh2DDte4 MCWeLw//eWVA4DK42HQw5ljTNy/CBPRlb0ukazba1/KlTfZs/7xGr0p+xWORDJP1 uOV5f5iIH83Qz2JRkHRV72vDSNDm8aXUl1od656Gz7PzlgDCyo2E6eSy9J04HLM6 O484/D4awfTo4tbaayBBdzN+RmlPmegRHSgMDETou/08JmSPobTfLagiCS/5xWd8 HbLPhFX0r0ABmhXch5aFkVGzxfXTJES4cIDpdiZPd/hLWPsaOsI+v6fYNYqCXzos /gNQD//hT8/C0QliaenZphKKtw+YzS+Iaa+LQYT2BmKDucD2JuObg2otouuKfEkY QoCP4Tbo+q1AFUVJwU4feRJ0SrveOOd9LBETyB8/GK2QwkG/Ud9MEGpGps728A0S IVryaNYbMxpmKGysxc0EPzKf0UbkHf0EfHu2ABrD2JQhD6ZwIMS3nPHqHHrirsdx Q+W9PVzJmb36qxgWydZlqtPkvIIxjnIL8IdiZaLI6jPxEeOsxBzMNcz6lL8/5nP7 HbvJ508QP3xeihTUO8ojJjakM0gtETSWII1OLMeVGaZB8/fUQPXqix+0plHpQSfo p0EUGm9Tz4qUsVrxvTqp/cFggaEVGtVupVW+g+N70b/VnQedXDg0lqTSkoLpy/Ly PQAyOkvnvlKlkoWLsCnhxttSO3K8n3dcHxfNQqlEyNiatEFztcc= =Sgp/ -----END PGP SIGNATURE----- --=-=-=--