how to invoke emacsclient

Tomas Volf ~ at wolfsden.cz
Fri Oct 18 16:11:11 UTC 2024


Bill Cole <macportsusers-20171215 at billmail.scconsult.com> writes:

> On 2024-10-17 at 13:04:54 UTC-0400 (Thu, 17 Oct 2024 10:04:54 -0700)
> Alan Bram <alan.bram at cornell.edu>
> 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.

I personally just installed both `emacs' and `emacs-app'.  The
`emacsclient' in the path (from `emacs') package seems to work fine with
the running emacs daemon from `emacs-app' package.

Have a nice day,
Tomas Volf

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 853 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20241018/9bb8c93e/attachment.sig>


More information about the macports-users mailing list