From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KPRvAA7H5mBPLgAAgWs5BA (envelope-from ) for ; Thu, 08 Jul 2021 11:36:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id ELymNw3H5mD0OwAAbx9fmQ (envelope-from ) for ; Thu, 08 Jul 2021 09:36:13 +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 0894B255DB for ; Thu, 8 Jul 2021 11:36:13 +0200 (CEST) Received: from localhost ([::1]:40206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1QS4-0005Q8-2M for larch@yhetil.org; Thu, 08 Jul 2021 05:36:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1QRP-0005Q0-35 for emacs-orgmode@gnu.org; Thu, 08 Jul 2021 05:35:31 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:45995) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1QRJ-0007Zz-CO for emacs-orgmode@gnu.org; Thu, 08 Jul 2021 05:35:30 -0400 Received: by mail-pg1-x529.google.com with SMTP id y17so5319872pgf.12 for ; Thu, 08 Jul 2021 02:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=QToOK9frGqrCyh7Jk3rBSUGk8y5yxuAdWvO3ky3jxOE=; b=crJu9s7wwz/Yg1NGGE+1TuZ3ws4HVvMdFOGQY0wnsU0OegyVR6Vtx5edyu/Qpf5Dvy l5rs/wQ3BfpyRsp3EMCcXAbp+PN/C8edsE+nVQ6yj2y8Lh4yj9By1aB9AO/fC2kBSrEu VsrIj+OPTHROlnstKcsPQEMXO9NYEGGj0StEllGX4Dy/FFXOVWKxIAyCQJVT56D3rdrz BW43W/OTUHrVbbBMf67RnUSCHF3YoNHqWg0isG7vJrbk6WvXNm07sejLVif+KehL9jAW Kfot30zRNtpWEqH2i88Blu9FEuby5OqyLMifjo5T5uJduwh180BIQ/WrjSdLp7RiOp2w GcDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=QToOK9frGqrCyh7Jk3rBSUGk8y5yxuAdWvO3ky3jxOE=; b=rkFzkMRXW/gtHiC1R21Tzs18O+zkAwCMg86Q/hDzgB1TwzYhTeXpboNivCDYA5tSRV djV8pGcl1T02PyoXTgReUOBryWNWvCHu57qQudFKN8YYU9PEZoYx7ahXZx6Y1rPYZijC yctpe87nJrPn4OEx6lP6YAEUfC3g78m0wgsVzwDYfirIX9y7/JSK4sRgjn6kd8+TbrOi l4qu0hj2Sq0aUKQbqyZb+Drgg7weFulZMpmsIy2ckGp0LAhiZFER5KuyJViC6gKUOdH2 fqzfGyBAhbgJNI7HVWC2oWaAy6WRhY3inj8F5HedGeoW5XCWzZ1dU9aSWXe9y92yRlii d0bA== X-Gm-Message-State: AOAM532M7aB4QYS5mIgPu7R8dbs1Ws6R5xOhIUp4UBRNlFMrSvsnfnj4 fkutvcphLr5qNA+xncT4VA== X-Google-Smtp-Source: ABdhPJwZcqZ63H6nuFooQctut26khJK+yLWYuYHzq3uR04Dqoz5Ah0QImcWmDWBrlfytgis4MHlBeg== X-Received: by 2002:a05:6a00:1903:b029:31d:f720:133f with SMTP id y3-20020a056a001903b029031df720133fmr22373701pfi.46.1625736924102; Thu, 08 Jul 2021 02:35:24 -0700 (PDT) Received: from smtpclient.apple ([150.109.103.155]) by smtp.gmail.com with ESMTPSA id 10sm2101419pjc.41.2021.07.08.02.35.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Jul 2021 02:35:23 -0700 (PDT) From: stardiviner Message-Id: <080251C2-96F5-447A-82A3-7D036A6AA73B@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_6820BCCF-876C-4935-BFF2-A389EA0C84C7" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: STOP this patch for now. Date: Thu, 8 Jul 2021 17:35:20 +0800 In-Reply-To: <42F783E1-86BF-4980-AD50-3673DC98D12B@chopps.org> To: Christian Hopps 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> X-Mailer: Apple Mail (2.3654.100.0.2.22) Received-SPF: pass client-ip=2607:f8b0:4864:20::529; envelope-from=numbchild@gmail.com; helo=mail-pg1-x529.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, HTML_MESSAGE=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: Tim Cross , 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=1625736973; 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:dkim-signature; bh=QToOK9frGqrCyh7Jk3rBSUGk8y5yxuAdWvO3ky3jxOE=; b=nFvq6uKJNX2P5a5voPTI/CR1cKH340cdDv/XeiqIm6RRYHk9VBLOMc+R/+24rAvcuoaH0O NPC4vVmlql8SvR4MlwjQsQ3KqeB6KRDY+E9CkNDDu4vgyPV1bnaX5+ka0MEuus2quufsAg qdmwcMta3h39lsNF7jLNhy5eSFTZi1QimyKqNLI+e6e+dhuqGSLXdrhB4NETvoxCjggb6A gxjzEXAZW4+ddb7faR9D/qan0HzV9AR6iA+IEqe1tSWmPxqAi+2xJg+aRo1DFlImzg8AvM vS5iH+drAjsUuHJIen9Mij/d7UMaKPzjyoML15vQOaHShtNEqyB+5xOAs+T3Hw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625736973; a=rsa-sha256; cv=none; b=i8uDF8U23mRSSPoczS6nlle8exb1/zCqyc53zi7ZRSIGgC+/Vyw8w29VWVR2HebaF6FqoK kOlAv4xJjoS2BgkJsAg8eacf6WakhPGJxlTTQQPfs7PQ3tTlITL7/dwF24jJv4s1SKGPuJ 2Xktn34ysM0nkmS93JqBsOXjdWIkVizNyqunTcUXL9E/2cgg+Q+kqTl4VJUKyBpiBehSUH j8Rsqv46fSTaDmaFsMX73JD5txDSjRaKpCN9DKZx/ay3Gl2j/qV6P7QKIAdldzkXH0ORZO peijIUG7SsQtxkklYcROLq1apr/VzRGBAf75F62nbzOYiXmyn8gzT07JNhXNuw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=crJu9s7w; 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=crJu9s7w; 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: 0894B255DB X-Spam-Score: -2.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: EiK6ceaCgLen --Apple-Mail=_6820BCCF-876C-4935-BFF2-A389EA0C84C7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jul 8, 2021, at 4:59 PM, Christian Hopps wrote: >=20 > 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 hard 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. >=20 > 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. >=20 > 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. >=20 > If this patch is going to be accepted I would ask that it >=20 > 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. >=20 > That way people that have already developed solutions for this won=E2=80= =99t have them broken. >=20 > Thanks, > Chris. >=20 >> On Jul 7, 2021, at 8:00 PM, stardiviner > wrote: >>=20 >> 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. >>=20 >>> On Jul 7, 2021, at 2:23 AM, Christian Hopps > wrote: >>>=20 >>> 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. >>>=20 >>> Thanks, >>> Chris. >>>=20 >>>> On Jul 6, 2021, at 11:30 AM, stardiviner > wrote: >>>>=20 >>>> 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. >>>>=20 >>>>> On Jul 6, 2021, at 12:21 PM, Christian Hopps > wrote: >>>>>=20 >>>>> Hi, >>>>>=20 >>>>> 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". >>>>>=20 >>>>> Info can be found here: >>>>>=20 >>>>> https://github.com/choppsv1/homebrew-emacsmacport = >>>>>=20 >>>>> Thanks, >>>>> Chris. >>>>>=20 >>>>> stardiviner > = writes: >>>>>=20 >>>>>> Here is the new patch which invokes notifications though Emacs = built-in API `ns-do-applescript`. >>>>>>=20 >>>>>> [2. text/x-patch; = 0001-org-clock.el-Make-org-notify-support-macOS-notificat.patch]... >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>>> On Jul 6, 2021, at 8:06 AM, Tim Cross > wrote: >>>>>>>=20 >>>>>>>=20 >>>>>>> stardiviner > = writes: >>>>>>>=20 >>>>>>>>> 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? >>>>>>>=20 >>>>>>> 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. >>>>>>>=20 >>>>>>> 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. >>>>>>>=20 >>>>>>> -- >>>>>>> Tim Cross >>>>>>>=20 >>>>>=20 >>>>=20 >>>=20 >>=20 >=20 --Apple-Mail=_6820BCCF-876C-4935-BFF2-A389EA0C84C7 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Jul 8, 2021, at 4:59 PM, Christian Hopps <chopps@chopps.org> = 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 hard 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=99= t 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.


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 <numbchild@gmail.com> 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 <numbchild@gmail.com> 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-notificat.patch]...



On Jul 6, 2021, at 8:06 AM, Tim Cross <theophilusx@gmail.com> wrote:


stardiviner <numbchild@gmail.com>= writes:

On Jul 5, 2021, at 7:55 = PM, Maxim Nikulin <manikulin@gmail.com> 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. =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.


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







= --Apple-Mail=_6820BCCF-876C-4935-BFF2-A389EA0C84C7--