-
Notifications
You must be signed in to change notification settings - Fork 8
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
Getting "grep searching error" for all page #1
Comments
@dnordgren Thanks for using
Do you mean the same thing as below?
There might be some unexpected behaviors on MacOS compared to other systems. I don't have one, so I cannot check it for you. |
I think I've found it! I've changed these lines: Lines 82 to 83 in feba4fd
to ('page "grep -niR \"^#+\\(TITLE\\): *%s\" %s --exclude-dir=.git")
('id "grep -niR \":id: *%s\" %s --exclude-dir=.git")) (removing it's working great locally now! Could be macOS specific. -- This package is great, thank you for your contribution! |
Hi @dnordgren, So happy that you solved the problem. Then this should be a space-escape issue. I will fix it in the next version. But I wonder that space is not permitted in the macOS file path? Since if any space exists in the path, the path should be quoted, or it will be treated as multiple arguments by grep. |
This should be fixed by the following code. Could you please give it a try? Lines 83 to 86 in b5cdf8b
|
I had tested the code on my Mac. And the line 86 would probably be changed to |
Summary
Hi! Found this via the https://github.com/logseq/awesome-logseq -- the functionality seems like it'd be great, thanks for building this! However, after setting it up, I'm having some issues:
When using
C-c C-o
on a page or ID link, clicking the link in the Emacs UI or usingM-x org-logseq-open-link
I'm gettinggrep searching error
.My Steps
org-logseq-dir
variable (which I've verified to be correct via Emacs variable explorerC-h v
)M-x org-logseq-mode
in the current bufferEnvironment info:
Error
grep searching error
in status bar.Debugging
I see the page query here:
org-logseq/org-logseq.el
Line 82 in feba4fd
If I run the following grep command from my
org-logseq-dir
in zsh(manually created based on that query), I'm seeing the grep result:
journals/2021_04_04.org:1:#+TITLE: Apr 4th, 2021
So it seems like the base grep query works. However, when I add in the
"%s"
part of the query, it causesgrep: Apr 4th, 2021: No such file or directory
, which looks like it could be triggering the error line I'm seeing:org-logseq/org-logseq.el
Line 105 in feba4fd
Why is that extra part of the query necessary? Apologies, as I'm not too experienced with grep.
The text was updated successfully, but these errors were encountered: