Closed clwgg closed 4 years ago
I'm seeing the expected behavior in both Linux and Windows.
SPC s p
doesn't add the string under the cursor.SPC s P
adds the string under the cursor.With this test.org
file:
* abc
def
* ghi
jkl
In a directory that has been (ma)git initialized SPC g i
:
#### System Info :computer: - OS: gnu/linux - Emacs: 26.1 - Spacemacs: 0.300.0 - Spacemacs branch: develop (rev. fdd38eec9) - Graphic display: t - Distribution: spacemacs - Editing style: vim - Completion: helm - Layers: ```elisp (auto-completion emacs-lisp dart git helm (lsp :variables lsp-dart-analysis-sdk-dir "~/development/flutter/bin/cache/dart-sdk") multiple-cursors org treemacs version-control) ``` - System configuration features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LIBSYSTEMD LCMS2
#### System Info :computer: - OS: windows-nt - Emacs: 26.3 - Spacemacs: 0.300.0 - Spacemacs branch: develop (rev. fdd38eec9) - Graphic display: t - Distribution: spacemacs - Editing style: vim - Completion: helm - Layers: ```elisp (autohotkey auto-completion (dart :variables dart-server-sdk-path "c:/src/flutter/bin/cache/dart-sdk/" dart-server-enable-analysis-server t) emacs-lisp ess git helm html (lsp :variables lsp-clients-dart-server-command "~/AppData/Roaming/Pub/Cache/bin/dart_language_server" lsp-dart-analysis-sdk-dir "c:/src/flutter/bin/cache/dart-sdk/") multiple-cursors org php spell-checking syntax-checking treemacs version-control vinegar) ``` - System configuration features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2
hmm, that's strange. I just double-checked again, and I still see the behavior I report. Are these bindings / functions only controlled through spacemacs directly, or is there any other package I should look into / reinstall? Do you have any other pointers on how to go about debugging this?
Thanks a lot for your help!
I might have found the source.
The default search-tools list in .spacemacs
on the develop
branch is:
dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep")
This means that the first installed search tool is used. I have both of these search tools installed:
and the expected behavior is observed with both of them.
But I don't have pt
installed, and when I remove rg
and ag
from the search tools list:
dotspacemacs-search-tools '("pt" "ack" "grep")
Then both SPC s p
and SPC s P
behave the same:
A HELM grep buffer opens with the word under the cursor pre populated at the prompt.
Great find, thanks a lot for this! Installing rg
or ag
did indeed solve the reported problem.
However, something new has surfaced: When I searched projects with helm-grep
, I used a .projectile
file in my project folder to exclude certain paths from searching. Now, using helm-ag
, these filters seem to be getting ignored. Do you, by chance, have any pointers on that too?
Many thanks!
This thread seems to have some suggestions for using a .agignore
file and enabling a
helm-ag-use-agignore
variable.
https://www.reddit.com/r/emacs/comments/3wynaj/spacemacs_helmag_is_not_ignoring_files/
I don't know if a .projectile
file can be used for filtering results.
The .agignore
didn't seem to work, but according to this I tried a .ignore
file, which works great!
Thanks for you help! Feel free to close this from my end, unless you'd like to keep it open if the helm-grep
behavior should be followed up upon.
In case someone else wonders if the .agignore
file can be made to work.
The next comment on that silver searcher page says:
.agignore The .agignore file was removed in favor of .ignore as part of the 2.0.0 release.
https://github.com/ggreer/the_silver_searcher/wiki/Advanced-Usage#agignore
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!
Description :octocat:
Both
spacemacs/helm-project-smart-do-search
andspacemacs/helm-project-smart-do-search-region-or-symbol
insert the string under the cursor when searching a project in orgmodeReproduction guide :beetle:
SPC s p
orSPC s P
to start searching the projectObserved behaviour: :eyes: :broken_heart: both
SPC s p
andSPC s P
insert the string under the cursor into helm searchExpected behaviour: :heart: :smile:
SPC s p
should only open helm to search the project, whileSPC s P
should insert the string under the cursor into the searchSystem Info :computer:
Backtrace :paw_prints: