* Re: Re: ns-do-applescript
@ 2022-05-26 11:01 Pedro Andres Aranda Gutierrez
0 siblings, 0 replies; 3+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2022-05-26 11:01 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1360 bytes --]
> Message: 18
> Date: Tue, 24 May 2022 16:11:00 -0400
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> To: Daniel Martín <mardani29@yahoo.es>
> Cc: Po Lu <luangruo@yahoo.com>, emacs-devel@gnu.org
> Subject: Re: ns-do-applescript
> Message-ID: <jwv7d6an136.fsf-monnier+emacs@gnu.org>
> Content-Type: text/plain; charset=iso-8859-1
> Daniel Martín [2022-05-24 22:00:12] wrote:
> > I don't object delegating to osascript as a subprocess, but there are
> > probably lots of packages and user customizations already calling
> > ns-do-applescript. We should deprecate the API before removing it, and
> > the deprecation message should tell people how they can call osascript
> > in an equivalent way.
> Can we re-implement `ns-do-applescript` as an ELisp function that runs
`osascript`?
>
>
> Stefan
hi
you mean something like:
;; (ns-do-applescript "tell application \"Emacs\" to activate"))
(call-process "osascript" nil nil nil "-e" "tell application \"Emacs\" to
activate")
Isn't it easier to explain than to actually write a function? ;-)
Best, /PA
--
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler
Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet
[-- Attachment #2: Type: text/html, Size: 2766 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Re: ns-do-applescript
@ 2022-05-31 6:34 Pedro Andres Aranda Gutierrez
2022-05-31 23:08 ` ns-do-applescript Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2022-05-31 6:34 UTC (permalink / raw)
To: emacs-devel, Po Lu
[-- Attachment #1: Type: text/plain, Size: 2210 bytes --]
Message: 15
Date: Mon, 30 May 2022 10:50:10 +0800
From: Po Lu <luangruo@yahoo.com>
> To: Jon Snader <jcs@irreal.org>
> Cc: emacs-devel@gnu.org
> Subject: Re: Fwd: Re: ns-do-applescript
> Message-ID: <871qwbd999.fsf@yahoo.com>
> Content-Type: text/plain
> Jon Snader <jcs@irreal.org> writes:
...
>>> The ns-do-applescript call is (or could be considered) simply a call
>>> to an OS specific interface routine. It's useful for many things
>>> besides getting contacts and its presence in *in the macOS Emacs
>>> build* hurts no one, whereas its removal is sure to cause lots of
>>> inconvenience for Mac users and those writing packages for the
>>> platform.
> We don't want to make things convenient for Mac users, when those things
> are not possible on a free system. Just as Emacs doesn't provide
> "OS-specific interface routines" to perform tasks on non-free operating
> systems that are not possible on free ones.
<flagelante>
Yes, I repent, I confess... I use Emacs on a macOS...
</flagelante>
as I write shell scripts (bash/zsh), gawk, Inkscape, GIMP, LaTEX, etc.
Exactly the same way I do this on my Linux system(s) and on the VMs I
create and share.
And while I'm using DBus in Linux for forward/backward searching between
*TeX and PDF, I do use ns-do-applescript for some of that magic on macOS.
Same goes for bringing the Emacs window to the top of the desktop and for
other functions.
I think all the traffic started because someone asked whether a pure elisp
alternative to ns-do-applescript could be found and call-process to
osascript was proposed. Humbly yours showed how to do such a thing (at
least on my very rudimentary use of osascript).
So, yes, you can write it in ELisp, but I can't tell you whether it makes
sense to scare people away from Emacs by not providing functionality
(IMvvHO that would be a pity). The argument "now you see what you could be
doing in Linux" has already given some fruits in my experience.
Best, /PA
--
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler
Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet
[-- Attachment #2: Type: text/html, Size: 3112 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ns-do-applescript
2022-05-31 6:34 Re: ns-do-applescript Pedro Andres Aranda Gutierrez
@ 2022-05-31 23:08 ` Stefan Monnier
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2022-05-31 23:08 UTC (permalink / raw)
To: Pedro Andres Aranda Gutierrez; +Cc: emacs-devel, Po Lu
> <flagelante>
> Yes, I repent, I confess... I use Emacs on a macOS...
> </flagelante>
I know this discussion sounds like some of us want to punish macOS users
for their sins, but that's not what this is about. From the FSF's point
of view, using a proprietary system like Windows or macOS is causing
self-harm rather than harm to others (to some extent it might also harm
others because of the network effect, but that's a secondary concern).
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-31 23:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-31 6:34 Re: ns-do-applescript Pedro Andres Aranda Gutierrez
2022-05-31 23:08 ` ns-do-applescript Stefan Monnier
-- strict thread matches above, loose matches on Subject: below --
2022-05-26 11:01 ns-do-applescript Pedro Andres Aranda Gutierrez
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).