-
Notifications
You must be signed in to change notification settings - Fork 48
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
Windows issues #29
Comments
I guess it's because of using Windows, the command |
Please let me know if using the |
I've just pushed a commit which rewrites some of the scanner-related code and removes |
Tried with
So at least it finds rg and executes it. Maybe it's the path issue (again). Is it possible to print the actual command to Thanks and sorry for the late reply. |
I don't know why that doesn't work. I guess whoever built the rg package
you installed didn't do something correctly. What about the other
scanners?
I don't know what you mean by a *magit-todos* buffer, because there isn't
one.
To see the command, you will have to macroexpand the scanner definition,
evaluate the function definition with edebug, and then step through it. Or
you could modify the command form to print a message with the command .
…On Jul 17, 2018 11:11 PM, "Yiufung Cheong" ***@***.***> wrote:
Tried with rg with nice enabled, and see this error message.
Error parsing regex near '^(*+)[[' at character offset 2: Missing expression for repetition operator.
(Hint: Try the --fixed-strings flag to search for a literal string.)
So at least it finds rg and executes it. Maybe it's the path issue
(again). Is it possible to rint the actual command to *magit-todos*
buffer so I can experiment with it?
Thanks and sorry for the late reply.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#29 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAktFbVpTjYjLA6V17NomXcbDtmUYt_Rks5uHrV1gaJpZM4VE2Ts>
.
|
By So I add a nice -n5 rg --no-heading ^(\*+)[[:blank:]]+(\?\?\?|DONT|F(?:AIL|IXME)|H(?:ACK|OLD)|KLUDGE|NEXT|OKAY|PROG|T(?:HEM|ODO)|XXXX?)[[:space:]]+(.+)|(^|[[:blank:]]+)(\?\?\?|DONT|F(?:AIL|IXME)|H(?:ACK|OLD)|KLUDGE|NEXT|OKAY|PROG|T(?:HEM|ODO)|XXXX?):(?:[[:blank:]]+(.+))? ./ Then I paste the command to cmd and run it and indeed it fails. And the reason seems to be that it doesn't quote nice -n5 rg --no-heading "^(\*+)[[:blank:]]+(\?\?\?|DONT|F(?:AIL|IXME)|H(?:ACK|OLD)|KLUDGE|NEXT|OKAY|PROG|T(?:HEM|ODO)|XXXX?)[[:space:]]+(.+)|(^|[[:blank:]]+)(\?\?\?|DONT|F(?:AIL|IXME)|H(?:ACK|OLD)|KLUDGE|NEXT|OKAY|PROG|T(?:HEM|ODO)|XXXX?):(?:[[:blank:]]+(.+))?" ./ So I tried to My elisp ability stops me from here. Guess I will take some time to learn edebug before I can dig into it again. Anyway would like to see if this helps, or happens to anyone under Windows |
That shouldn't be the case, because we're not running it as a shell command, but with
That's because, when you paste the command into a shell manually, you do need to quote it, because you're running it as a shell command. Have you tried disabling Which Windows are you using? What environment are you running it in? Cygwin? WSL?
I'm guessing that there are some Windows users among those who have downloaded the package, but I can't say for sure. |
Ah, a big misconception here.
Yes, I tried disable nice with
Native Windows 10, and native-build GNU Emacs.
I suppose so, maybe it's on my end. I tried again with below steps:
|
Where are you seeing that error message?
And where does your Also, please try the other scanners and let me know if they work. |
As mentioned before,
No, tried them all, no one works |
I'm sorry, I don't have a Windows 10 system to test on, so I don't know if there's much I can do about it myself. If you're able to debug it and find a solution, I'll be happy to fix it. You might also try using Cygwin Emacs, although that may not perform as well as the native build. I see that there are two different kinds of official releases of |
I've tried on my Windows 7 machine and have some issues: Using
I removed a lot of info regarding I also tried with Using |
Hi Erik, Thanks for the report and backtrace, but the |
Hi again! Sorry, when I restarted Emacs I get no errors, but using |
If there aren't any errors, I'm guessing there are no hits in that repo. Try running something like |
Running |
That is interesting. To debug it further would probably require using |
@alphapapa The problem seems to be in the function
The passed
Now When I run |
It appears that the line number is missing from
I'm using rg 0.8.1 on Linux. |
BTW, you may find this helpful for debugging regexps. It shows how I converted the regexp you pasted to an ;; TODO: Better failure info?
(setq argh-re "\\(?:^\\(?8:[^:]+\\):\\(?2:[[:digit:]]+\\):\\(?:\\(?1:\\*+\\)[[:blank:]]+\\(?4:\\(?:\\?\\?\\?\\|DONT\\|F\\(?:AIL\\|IXME\\)\\|H\\(?:ACK\\|OLD\\)\\|KLUDGE\\|NEXT\\|OKAY\\|PROG\\|T\\(?:EMP\\|HEM\\|ODO\\)\\|XXXX?\\)\\)[[:blank:]]+\\(?5:.+\\)\\|\\(?:.+\\)?\\(?4:\\(?:\\?\\?\\?\\|DONT\\|F\\(?:AIL\\|IXME\\)\\|H\\(?:ACK\\|OLD\\)\\|KLUDGE\\|NEXT\\|OKAY\\|PROG\\|T\\(?:EMP\\|HEM\\|ODO\\)\\|XXXX?\\)\\)\\(?6:\\(?:([^)]+)\\)?:\\)?\\(?:[[:blank:]]+\\)?\\(?5:.+\\)?\\)\\)")
(rxt-elisp-to-rx argh-re)
;;=>
;; (seq bol
;; (submatch-n 8 (+ (not (any 58)))) ":"
;; (submatch-n 2 (+ digit)) ":"
;; (or (seq (submatch-n 1 (+ "*")) (+ blank)
;; (submatch-n 4 (or "???" "DONT"
;; (seq "F" (or "AIL" "IXME"))
;; (seq "H" (or "ACK" "OLD"))
;; "KLUDGE" "NEXT" "OKAY" "PROG"
;; (seq "T" (or "EMP" "HEM" "ODO"))
;; (seq "XXX" (32 "X"))))
;; (+ blank)
;; (submatch-n 5 (+ nonl)))
;; (seq (32 (+ nonl))
;; (submatch-n 4 (or "???" "DONT"
;; (seq "F" (or "AIL" "IXME"))
;; (seq "H" (or "ACK" "OLD"))
;; "KLUDGE" "NEXT" "OKAY" "PROG"
;; (seq "T" (or "EMP" "HEM" "ODO"))
;; (seq "XXX" (32 "X"))))
;; (32 (submatch-n 6 (seq (32 (seq "(" (+ (not (any 41))) ")")) ":")))
;; (32 (+ blank))
;; (32 (submatch-n 5 (+ nonl)))))) |
I've been trying to debug this problem as well on Win7. Here's what my user-config looks like (using spacemacs):
I haven't been able to get the todos to show up at all. It does seem that |
I don't think you can set the keywords list to a keyword with a suffix like that unless you also disable the suffix option. Other than that, you'll need to provide information such as Git version, ripgrep version, etc. Finally, generally, you should not be setting any options with |
Ahh sorry I didn't realize. Copied the
Git: 2.14.1.windows.1
Ok, how should I be setting the correct scanner and scanner parameters? This was my only lead on why the todos were not showing up which is why I had added them in there. Thanks for the help! |
That's not necessarily an error, it just indicates a conflict in an existing keymap, depending on your config.
They should be set automatically, depending on what tools are installed on your system. If that doesn't work automatically, it's a bug. If you need to set them, use the customization UI: |
@alphapapa
The todos show up with these settings after Having just issues making it enabled on program start. If the
I didn't understand this description in the
Also, I wasn't able to get it to work with In any case, glad to having things working with |
Glad you were able to get it working. I'm afraid I can't help you with Spacemacs. Maybe if you file an issue on their repo they can help you. The |
For future reference:If you are here because you are having a problem on Windows, and you can't find a solution or workaround here, please file a new issue that clearly describes the specific problem you're having, and include all relevant information, i.e. relevant software versions, etc. Please do not reuse this issue to report yet another Windows-related problem. Since there is not a clearly defined problem here to be solved, I'm closing this issue. If you already reported a problem here that remains unsolved, please file a separate report about that specific problem so it can be addressed. Thanks. |
Configuration
Symptom
No TODOs section shown on magit status.
Debug trials
Check mode,
magit-todos-mode
enabled. No errors on*Backtrace*/*Compile-Log*/*Messages*
, but a special buffer*magit-todos--ag-scan-async*
gives/usr/bin/nice: 'ag': No such file or directory
.executable-find ag
returns"c:/msys64/mingw64/bin/ag.exe"
.System info
Any suggestions to hunt down where goes wrong?
The text was updated successfully, but these errors were encountered: