views:

43

answers:

1

When using Carbon Emacs (v22) from an external application (ex. Unity 3D) files sent to Carbon Emacs would jump to the line number requested by the external application (ie. double click on an error message editor selected in preferences is started with file at error line number). For some reason the new Cocoa Emacs (v23) no longer does this. Instead it simply opens the file, but does not jump to the line number requested by the external application.

+2  A: 

Not sure what command line Unity 3D was using to fire up Carbon Emacs correctly for you, but it looks like you can open a file at a given position in Emacs 23 using the following:

emacsclient -c +4:3 FILE1

where 4 is the line number, and 3 is the column number. Note that the emacsclient you execute should be the one matching your emacs; under OS X, you'll find a /usr/bin/emacsclient, but you should really be executing /Applications/Emacs.app/Contents/MacOS/bin/emacsclient instead.

You can also use a small helper application to make Emacs respond to emacs:// URLs containing line and column args. I wrote about it here.

sanityinc
+1 - this helped me out, thanks.
slomojo