On 2024-10-17 at 13:04:54 UTC-0400 (Thu, 17 Oct 2024 10:04:54 -0700)
Alan Bram <[email protected]>
is rumored to have said:
I have installed the emacs-app port. I see that it puts all of its
content
under the /Applications/MacPorts/Emacs.app/Contents folder, including
the
"emacsclient" and other command-line utilities under
/Applications/MacPorts/Emacs.app/Contents/MacOS/bin/.
If I want to use emacsclient as my EDITOR environment variable, should
I
add that (long) bin directory to my $PATH setting? or maybe put the
entire
long path to the utility as the value of the EDITOR variable?
Should the installation of the emacs-app port automatically add that
directory to my $PATH?
Naively, it seems a little strange to me that I should have to mess
with
such detail.
To launch any GUI app in macOS, you need to execute the binary at
/path/to/app/AppName.app/Contents/MacOS/AppName OR use "open
/path/to/app/AppName.app". Both mechanisms only work if the caller is
part of the same LaunchD "domain" as the current console user.
So yes, if you want to launch an app from the command line, the whole
path to the binary inside the app bundle
(AppName.app/Contents/MacOS/AppName) is required. If there are many
useful binaries in that directory, you may find it convenient to add the
directory to your PATH environment variable, OR you could add ~/bin/ to
your $PATH and populate ~/bin/ with symlinks to the app binaries from
wherever that you frequently want to use from the command line.
--
Bill Cole
[email protected] or [email protected]
(AKA @[email protected] and many *@billmail.scconsult.com
addresses)
Not Currently Available For Hire