Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rg failing in daemon mode on Mac OS despite being on PATH #184

Open
jsperger opened this issue Feb 18, 2025 · 0 comments
Open

rg failing in daemon mode on Mac OS despite being on PATH #184

jsperger opened this issue Feb 18, 2025 · 0 comments

Comments

@jsperger
Copy link

Problem

Rg fails when running emacs as a daemon on Mac despite the rg binary being in the environment PATH. I think there might be an issue with 'rg-find-executable' because it returns nil, but rg works fine in eshell launched from a daemon:

Welcome to the Emacs shell

~/.emacs.d/etc/scratch $ which rg
/opt/homebrew/bin/rg

Config Solution

Configuring the executable path directly works

(use-package rg
  :config
  (when (and IS-MAC (daemonp))
    (setopt rg-executable "/opt/homebrew/bin/rg"))
  )

Environment Dumps

Successful Run Environment Dump

--------- RG environment ---------
emacs-version: GNU Emacs 30.0.93 (build 2, aarch64-apple-darwin24.2.0, NS appkit-2575.30 Version 15.2 (Build 24C101))
system: darwin
ripgrep-version: ripgrep 14.1.1
compilation-filter-hook: nil
compilation-filter-advised: nil
rg-header-max-search-string-length: nil
rg-use-transient-menu: t
rg-show-columns: nil
rg-group-result: t
rg-show-header: t
rg-hide-command: t
rg-align-position-numbers: t
rg-align-line-number-field-length: 4
rg-align-column-number-field-length: 3
rg-align-line-column-separator: " "
rg-align-position-content-separator: " "
rg-custom-type-aliases: nil
rg-prioritized-type-aliases: nil
rg-executable: "/opt/homebrew/bin/rg"
rg-executable-per-connection: t
rg-command-line-flags: nil
rg-ignore-case: case-fold-search
rg-keymap-prefix: "�s"
rg-default-alias-fallback: "everything"
rg-buffer-name: "rg"
rg-ignore-ripgreprc: t
rg-w32-unicode: nil
rg-w32-ripgrep-proxy: "/Users/jsperger/.emacs.d/rg-w32-ripgrep-proxy.bat"
------------------ END ------------------

Failure Dump

Disabling my fix yielded

(rg-print-environment)
*** Eval error ***  No ’rg’ executable found in host localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant