GNU bug report logs -
#71235
Failing test on macOS: tramp-test17-dired-with-wildcards
Previous Next
Reported by: Stefan Kangas <stefankangas <at> gmail.com>
Date: Mon, 27 May 2024 21:34:02 UTC
Severity: normal
Fixed in version 30.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Stefan Kangas <stefankangas <at> gmail.com> writes:
> Michael Albinus <michael.albinus <at> gmx.de> writes:
>
>>> (executable-find "gls")
>>> => "/opt/homebrew/bin/gls"
>>
>> Hmm. Should we add "/opt/homebrew/bin" to the default
>> tramp-remote-path? It looks very special, even on macOS.
>>
>> OTOH, we have directories like "/local/freeware/bin", "/local/gnu/bin",
>> "/usr/freeware/bin", "/usr/pkg/bin", "/usr/contrib/bin", "/opt/bin",
>> "/opt/sbin" and "/opt/local/bin" there, which are also special.
>
> AFAIK, this is the default location where Homebrew (https://brew.sh/)
> puts binaries, at least on new installations. (The Homebrew directory
> structure has changed slightly over the years, but I don't know if this
> is one of them since I only noticed it those changes passing.)
>
> I think it might make sense to add it to `tramp-remote-path`, but I'm
> not familiar enough with Tramp to understand all the implications of
> doing so. I'm copying in Mattias and Gerd, who I believe are using
> macOS, in case they have anything to add.
Homebrew uses different directories depending on if it's on a mac with
x64 or arm64. I have both, and find the easiest thing to do is to use
the brew shellenv command in my .zshenv to set up things. (I have a
common dotfles setup for my machines.)
/Users/gerd % brew shellenv
export HOMEBREW_PREFIX="/opt/homebrew";
export HOMEBREW_CELLAR="/opt/homebrew/Cellar";
export HOMEBREW_REPOSITORY="/opt/homebrew";
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}";
export MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:";
export INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}";
Then, I'm using exec-path-from-shell in my init.el to get the shell
environment into Emacs, even when started from Emacs.app. Starting an
.app bundle doesn't involve the shell, so one has to do something.
Works like a charm with everything I use, including things like Magit
over tramp, and so on.
(If you are using zsh from Homebrew and not the one from macOS, you
might want to call connection-local-set-profile-variables or something
to get the right zsh.)
This bug report was last modified 1 year and 39 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.