I am trying to understand how the shell is interpreting
Emacs, and where it finds the application.
I can launch emacs by running
bash emacs &
in the terminal, and it looks to me like it is the same application (which is not the emacs shipped with the OS, which is at
/usr/bin/emacs, but another one which I have installed, almost certainly with
emacsformacosx though I am not sure how to verify this information).
$ echo "$PATH" /Users/antoine/.gem/ruby/2.6.0/bin:/usr/local/opt/ruby/bin:/anaconda3/condabin:/Users/antoine/.pyenv/shims:/Users/antoine/.local/bin:/Applications/Emacs.app/Contents/MacOS:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
Now if I look into the folder
/Applications/Emacs.app/Contents/MacOS/, I only see
Emacs but no
$ ls -1d /Applications/Emacs.app/Contents/MacOS/[eE]* /Applications/Emacs.app/Contents/MacOS/Emacs /Applications/Emacs.app/Contents/MacOS/Emacs-i386-10_5 /Applications/Emacs.app/Contents/MacOS/Emacs-x86_64-10_10 /Applications/Emacs.app/Contents/MacOS/Emacs-x86_64-10_5 /Applications/Emacs.app/Contents/MacOS/Emacs-x86_64-10_7 /Applications/Emacs.app/Contents/MacOS/Emacs-x86_64-10_9
On the other hand, if I use
find, I get a result
emacs, but I don't understand where it comes from:
$ find /Applications/Emacs.app/Contents/MacOS/ emacs | grep emacs /Applications/Emacs.app/Contents/MacOS//bin-x86_64-10_7/emacsclient /Applications/Emacs.app/Contents/MacOS//bin-x86_64-10_9/emacsclient /Applications/Emacs.app/Contents/MacOS//bin-i386-10_5/emacsclient /Applications/Emacs.app/Contents/MacOS//bin-x86_64-10_5/emacsclient /Applications/Emacs.app/Contents/MacOS//bin-x86_64-10_10/emacsclient emacs
but I don't see this last
emacs in the folder, so where should I be looking?
(In addition, I don't understand exactly what
find does, as it returns outputs without the string "emacs" in it, so I filtered them with
One last remark.
Previously I had a typo in my PATH (which I set in my
.profile): I had
(note the lower case "s" in "MacOs" at the end) instead of
But I did not get any error, not did it seem to make any difference to correct this type. Namely, even with the type,
which emacs happily returned
/Applications/Emacs.app/Contents/MacOs/emacs (with the typo) and
which Emacs just as happily returned
/Applications/Emacs.app/Contents/MacOs/Emacs (again with the type).
So this suggests that
Emacs are found somewhere else.