emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changes 2009-07-15/16 in branch?


From: Harald Hanche-Olsen
Subject: Re: Changes 2009-07-15/16 in branch?
Date: Thu, 30 Jul 2009 11:37:47 -0500 (CDT)

+ Richard Stallman <address@hidden>:

>     > One question is, do most apps on MacOS have _the same_ Applescript
>     > capability that has been put into Emacs?
> 
>     Having only the level of capability that has been put into Emacs is  
>     considered a disadvantage in most applications.
> 
> Could you name and describe the different levels of capability
> that apps can have, and say which one of them corresponds to Emacs?

I think every app that uses the cocoa framework, as Emacs does, can
respond to some basic applescript commands, such as activate, quit,
open file. This comes with the framework and is there whether we want
it or not. (I am not 100% sure on this.)

In addition, apps can (but Emacs does not) provide more Applescript
commands that other apps can use to control it. These extensions can
vary from a few simple commands to large collections of commands and
data structures that let you control almost every aspect of the app.

When it comes to being able to control other apps via Applescript, I
don't think many apps can do it. Such scripts are generally run using
the script editor, an app that lets you edit and execute scripts as
well as compile them into standalone scripts. Plus there is the
command line driven osascript, to which you can feed any bit of
applescript and have it executed. Example:

; osascript -e 'tell application "Emacs" to open "/etc/passwd"'


Now apart from Applescript and services (covered in a separate
message), applications may respond to other kinds of events. One that
Emacs does well is "open file"; the script above actually triggers
such an event. Another one is a request to handle an URL such as
mailto:address@hidden, which Emacs does not handle at present.
(But I think it should, if someone can figure out how.)

- Harald




reply via email to

[Prev in Thread] Current Thread [Next in Thread]