[OS X Emacs] AppleScript support?

David Reitter david.reitter at gmail.com
Wed Jul 9 17:34:24 EDT 2014


On Jul 9, 2014, at 3:31 PM, Madhusudan Singh <singh.madhusudan at gmail.com> wrote:

> Can lisp capture a mouse gesture (drag and drop) from a browser?

Yes, of course.  If you’re in a LaTeX buffer and drag an image file from the finder, it gets inserted as a LaTeX code reference to the file.  IIRC, I wrote the code that does this in Aquamacs (using Lisp).

Take a look at dnd.el and smart-end.el.  If you do C-h k and then give it a drag&drop event, you can see that this is a normal Lisp event to which you may bind a command.

I just tried to do this from Chrome, and did get the event, but not the desired functionality.  This would require some investigation on your part. 

Apologies for my earlier answer.  I should have paid attention to the words “long-time emacs user”.  Particularly with Aquamacs, we get a lot of questions here from people that use it as an out-of-the-box editor.


--
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!




More information about the MacOSX-Emacs mailing list