[wingide-users] double-clicking on mac to open file

Geoffrey S. Knauth geoff at knauth.org
Mon Mar 5 10:02:41 MST 2012


Sometimes, on a Mac, I have a Python file

/that/is/buried/in/some/deeply/nested/path/filename.py

I might be in Emacs looking at that file, and I wish I could open it with:  open -a wingide

Or, alternately, I wish I could double-click on the file and have it open in Wing IDE.  In Emacs dired mode, I have a silly function od that opens the current directory in the Mac Finder, which is how I'd get to something deeply nested quickly in order to double-click on it.

(defun od ()
  "Open current directory (Mac)"
  (interactive)
  (shell-command "open ."))

I find that if I use any of these techniques, or the command-line scripts I found in:

/Applications/WingIDE.app/Contents/MacOS{,/bin}

WingIDE will start up, but the file I want to look at hasn't been opened, requiring me to go digging for it.  I was wondering if someone has found an elegant way of doing this.

The only other thing I can think of is copying the value of (buffer-file-name) in Emacs to the pasteboard so that (hopefully) WingIDE can pick it up in an open-file dialog as a paste.

Geoff



More information about the wingide-users mailing list