[OS X Emacs] AppleScript support?

Ken Mankoff mankoff at gmail.com
Wed Jul 9 14:30:37 EDT 2014


I'm tempted not to reply more, for fear of what the reply-to-reply might
be, but if you want to do this in pure Lisp, even in regular emacs, not
just Aquamacs, see the smart-dnd package.

  -k.


On 2014-07-09 at 14:27, Ken Mankoff wrote:
> Wow. 
>
> BTW, lisp can do this.
>
>   -k.
>
> On 2014-07-09 at 14:15, Madhusudan Singh wrote:
>> Yes, I do need to use a solution other than just lisp. I asked an
>> AppleScript-specific question because the specific task I have in
>> mind involves some other applications on Mac that need to be part of
>> the workflow. For instance, the ability to "drag and drop" an image
>> from a browser (say Chrome or Safari) to LaTeX code in the emacs
>> buffer (which results in the insertion of a code block at the
>> insertion point to include the image). Lisp cannot do that. It takes
>> an OS and app aware script.
>>
>> So, my original question was posed after dismissing lisp as a
>> potential solution, and I would appreciate returning to it if you do
>> not mind?
>>
>>
>>
>> On Wed, Jul 9, 2014 at 11:09 PM, David Reitter <david.reitter at gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> Aquamacs is very scriptable, although AppleScript would not be powerful
>>> enough.  The syntax is a bit different.
>>>
>>> Try this
>>>
>>> (insert “Hello World”)
>>>
>>> place the cursor at the end of the line, then press C-x C-e.  This
>>> executes the last bracketed expression as code, and it will insert this
>>> into the current buffer.
>>>
>>> Aquamacs comes with the Emacs Reference Manual, which documents scripting.
>>>
>>> (Do you have a particular need to talk to Aquamacs via an AppleScript
>>> interface?)
>>>
>>> - David
>>>
>>>
>>>
>>> --
>>> http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
>>> http://aquamacs.org/donate -- Could we help you? Return the favor and
>>> support the Aquamacs Project!
>>>
>>>
>>>
>>>
>>>
>>> On Jul 9, 2014, at 1:10 PM, Madhusudan Singh <singh.madhusudan at gmail.com>
>>> wrote:
>>>
>>> > Hello:
>>> >
>>> > I am a long term emacs user (mostly on Linux) but am looking at Aquamacs.
>>> >
>>> > Are there any docs for how to script Aquamacs? Say I wish to insert a
>>> certain text in the current emacs buffer programatically. How do I do that?
>>> >
>>> > Thanks.
>>> >
>>> > _____________________________________________________________
>>> > MacOSX-Emacs mailing list
>>> > MacOSX-Emacs at email.esm.psu.edu
>>> > https://email.esm.psu.edu/mailman/listinfo/macosx-emacs
>>> > List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx
>>>
>>>
>>> _____________________________________________________________
>>> MacOSX-Emacs mailing list
>>> MacOSX-Emacs at email.esm.psu.edu
>>> https://email.esm.psu.edu/mailman/listinfo/macosx-emacs
>>> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx
>>>
>>
>> _____________________________________________________________
>> MacOSX-Emacs mailing list
>> MacOSX-Emacs at email.esm.psu.edu
>> https://email.esm.psu.edu/mailman/listinfo/macosx-emacs
>> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx



More information about the MacOSX-Emacs mailing list