Fork me on GitHub
#emacs
<
2017-11-30
>
vemv14:11:55

$ open -a /usr/local/Cellar/emacs-mac/emacs-25.3-mac-6.8/Emacs.app /Users/vemv/gpm/src/horizon/src/horizon/controls/widgets/grid/header.cljs +0:66
> The file /Users/vemv/gpm/src/horizon/+0:66 does not exist.

vemv14:11:21

anyone got "open at specific line" working? GUI OSX emacs

gonewest81814:11:04

Try —args +0:66 so the line:col specification is passed through to emacs.

vemv15:11:12

--args seems to be picked up! but doesn't jump to line/col

vemv15:11:37

maybe an issue with my setup. if anyone can confirm it works, appreciated

gonewest81817:11:18

… I’m getting LSOpenURLsWithRole() failed for the application /usr/local/Cellar/emacs/25.3/bin/emacs-25.3 with error -10810

gonewest81817:11:17

for whatever reason, the open command isn’t working for me, but here’s a note from the emacs manual:

'+linenum:columnnum file'
Visit file using find-file, then go to line number linenum and put point at column number columnnum. 
so your issue is, you need to pass the filename to emacs after the “+0:66”.

gonewest81817:11:17

in a terminal you should be able to navigate inside Emacs.app and see the actual binary, e.g. it’ll be something like /usr/local/Cellar/emacs-mac/emacs-25.3-mac-6.8/Emacs.app/Contents/MacOS/bin/emacs. Once you know that, you should be able to invoke it directly: /usr/local/Cellar/emacs-mac/emacs-25.3-mac-6.8/Emacs.app/Contents/MacOS/bin/emacs +0:66 widgets/grid/header.cljs

vemv20:11:18

@gonewest818 didn't work for me sadly!

vemv20:11:48

tried with both emacsforosx and railwaycat-emacs, and no .emacs.d

vemv20:11:28

betting this would be solved with emacs-server. not worth the hassle for me at the moment (another way would be if one could send arbitrary text messages to an existing Emacs process... don't know if that's possible though)

gonewest81821:11:38

was there an error?

vemv21:11:39

stock emacs opened the file, but at line/col 0

gonewest81821:11:44

well, it’s the classic “works for me” situation. Both of these work on my macbook.

$ emacs --version
GNU Emacs 25.3.1
Copyright (C) 2017 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
$ emacs +4:5 foo.txt 
$ emacsclient +4:5 foo.txt
Waiting for Emacs...
$ 

vemv21:11:01

@gonewest818 interestingly, plain emacs (terminal) works. but non-GUI emacs is useless for me

vemv21:11:26

GUI emacsclient might work, must try out one day

gonewest81821:11:24

for me that’s homebrew emacs (/usr/local/bin/emacs) … not the ancient apple one (/usr/bin/emacs)

vemv21:11:46

thanks for all the hints!