-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fix path with space in command for Aquamacs #24
base: master
Are you sure you want to change the base?
Conversation
@@ -46,7 +46,9 @@ | |||
;;; variables | |||
|
|||
(defvar vr--command-python-default | |||
(format "python %s" (expand-file-name "regexp.py" (file-name-directory load-file-name)))) | |||
(format "python %s" | |||
(shell-quote-argument (expand-file-name "regexp.py" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the right place to put shell-quote-argument
. You should rather call it when the process is called:
(vr--get-command) |
and
(vr--get-command) |
(like the other arguments that are quoted).
Tip: you can git amend your commit and force push it to the same branch to update an existing pull request. This way, you don't have to open a new PR for every iteration.
Please also drop "for Aquaemacs" from the commit title, as this fix is not about Aquaemacs. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, those are the wrong places. shell-quote-argument
needs to be done before vr--get-command
(and vr/command-python
) is constructed otherwise you get something like:
(shell-quote-argument (vr--get-command))
"python\\ /Users/nega/Library/Preferences/Aquamacs\\ Emacs/Packages/elpa/visual-regexp-steroids-20170222.253/regexp.py"
which is obviously incorrect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check out my comments on the PR from November:
@@ -297,7 +297,9 @@ and the message line." | |||
(format "%s matches --regexp %s %s %s" | |||
(vr--get-command) | |||
(shell-quote-argument regexp-string) | |||
(when feedback-limit (format "--feedback-limit %s" feedback-limit)) | |||
(if feedback-limit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
use
shell-quote-argument
instead.