Doom-emacs: [BUG] +ivy/project-search doesn't work on one machine

Created on 20 Sep 2019  路  7Comments  路  Source: hlissner/doom-emacs

Doing a project-search yields no results with rg, git-grep returns an error code 1

I've hit a very weird problem that occurs only on one of my machines.
When I try to do a project-search nothing is found when rg is installed, and if I remove it then git-grep returns code 1 (even though I have ag and pt available).

This happens only on one machine, other laptops work great w/ same dotfiles.

How to debug rg's command line?

禄 which rg && rg --version
/usr/bin/rg
ripgrep 11.0.2
-SIMD -AVX (compiled)
+SIMD -AVX (runtime)

位 ~
禄 ls .ripgreprc
ls: cannot access '.ripgreprc': No such file or directory

emacs   version    26.3
        features   XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD LCMS2
        build      Aug 29, 2019
        buildopts  (--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now)
        windowsys  x
        daemonp    server-running
doom    version    2.0.9
        build      HEAD -> develop, origin/develop, origin/HEAD f03eb6731 2019-09-20 01:23:58 -0400
system  type       gnu/linux
        config     x86_64-pc-linux-gnu
        shell      /bin/zsh
        uname      Linux 5.2.13-arch1-1-ARCH #1 SMP PREEMPT Fri Sep 6 17:52:33 UTC 2019 x86_64
        path       (~/.bin ~/go/bin /usr/local/bin /usr/local/sbin ~/.bin ~/go/bin /usr/local/bin /usr/local/sbin /usr/local/bin /usr/bin /bin /usr/local/sbin /usr/lib/jvm/default/bin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl /usr/lib/emacs/26.3/x86_64-pc-linux-gnu/)
config  envfile    envvar-file
        elc-files  0
        modules    (:completion company (ivy +childframe +fuzzy) :ui doom fill-column hl-todo modeline nav-flash ophints (popup +all +defaults) (pretty-code +fira) treemacs vc-gutter vi-tilde-fringe window-select workspaces :editor evil file-templates fold (format +onsave) multiple-cursors rotate-text snippets word-wrap :emacs dired electric vc :term term :tools debugger editorconfig eval flycheck (lookup +docsets) lsp magit make pass pdf :lang data emacs-lisp ess go latex markdown (org +dragndrop +present) plantuml rest sh :email mu4e :app calendar (write +wordnut) :config default)
        packages   (n/a)
        elpa       (n/a)

:completion ivy bug external resolved

All 7 comments

Do you still have this issue? And if so, does M- x counsel-rg work on this machine?

Yep - and yes, counsel-rg displays results properly

same problem and results here !

I have no clue why this is and am no closer to understanding why it happens, sorry to say. I can only imagine this is issue with your systems or shell configs.

Try regenerating your envvar files with doom env to see if it has to do with an outdated environment, otherwise, I'll need to count on you guys to figure out the difference between the machine(s) that work and the ones that don't.

Hmm, it's funny - I've just updated to latest develop and it now works for me on the same PC. Weird

since my env was regenerated - maybe the problem is because of it indeed? @uelei try cleaning (not deleting) your .emacs/.local/env, and if search now works then it's because of some variable in your shell

Hi, I got same error, even after running doom env and doom upgrade..

I run doom doctor and it tells that I don't have direnv installed .. not sure if this related but I see some comments mentioned it. So I installed it from (Arch AUR) and that was about 125 MiB :/ (becuse it depend on go-2 package) ..

counsel-projectile-grep works fine ..


Here is some debug infos that I collect if anyone need it:

I try to eval (call-interactively #'+ivy/project-search) and produce the same error, I read the +ivy/project-search code and I see it call +ivy-file-search which calls counsel-rg, I try to call it and it didn't work too, with similar behavior of +ivy/project-search.

not sure but it seems counsel-rg call counsel-ag which require ag command.

I installed ag with pacman -S the_silver_searcher, counsel-ag was not working just like counsel-rg but after I install ag it works as epxected. But counsel-rg still doesn't work.

counsel-ag works while counsel-rg doesn't, counsel-rg call counsel-ag internally .. seems that the problem in counsel-rg.

note: when I call +ivy/project-search while I have active region so that region passed as query I got error in the *Messages* buffer says counsel-git-grep-action: Wrong type argument: stringp, nil

note: that rg is installed in my machine.

note: +default/search-cwd, +default/search-project have the same issue.

I just know the basic of ELisp for my config files, sorry if that did help much.

Sorry for the long wait, but I _think_ I've zeroed in on the cause of this issue in b51c4fc and ea1a1805b. Let me know if that isn't the case and I'll reopen the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ptival picture Ptival  路  3Comments

pieterdd picture pieterdd  路  3Comments

luisenrike picture luisenrike  路  3Comments

gilbertw1 picture gilbertw1  路  3Comments

governorgoat picture governorgoat  路  3Comments