- 使用
open
命令的--args
参数,无法重复打开不同的文件。
open -a /usr/local/opt/emacs-mac/Emacs.app --args +10:1 /file_name
这样打开是可以实现跳转到那一行那一个字符的,但是如果再次执行
open -a /usr/local/opt/emacs-mac/Emacs.app --args +10:1 /another_file_name
这样仅仅是切换到 Emacs 窗口,没有跳转到另一个文件,更没有跳到那一行。
- 不使用
--args
参数,不知道怎么指定行号。
open -a /usr/local/opt/emacs-mac/Emacs.app +12:2 /file
The file +12:2 does not exist
认为是要打开两个文件,把 +12:2
当做文件名了。