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
helm-find-files
with point close to "duckduckgo.com" attempts SSHing into DDG
#648
Comments
Vasilij Schneidermann notifications@github.com writes:
It is not an url.
It does so on any input not matching ffap-url-regexp.
Tramp fault, the regexp used is very basic.
No just move point outside such things before C-x C-f, having urls at Thierry |
BTW I wonder if your helm copy is up to date, as I can't reproduce this. Thierry |
Yes, I've made sure by removing helm and installing it from the git repository. When starting Here's the full traceback:
Here's my value of '(("\\(?:\\.dz\\|\\.xz\\|\\.lzma\\|\\.lz\\|\\.g?z\\|\\.\\(?:tgz\\|svgz\\|sifz\\)\\|\\.tbz2?\\|\\.bz2\\|\\.Z\\)\\(?:~\\|\\.~[-[:alnum:]:#@^._]+\\(?:~[[:digit:]]+\\)?~\\)?\\'" . jka-compr-handler)
("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" . epa-file-handler)
("\\`/[^/]*\\'" . tramp-completion-file-name-handler)
("\\`/\\([^[/|:]+\\|[^/|]+]\\):" . tramp-file-name-handler)
("\\`/:" . file-name-non-special)) I'm still using Emacs 24.3 on Arch Linux. |
Vasilij Schneidermann notifications@github.com writes:
I can't reproduce.
Looks a tramp error, I guess if you run find-file-at-point instead of
If it comes from your init file (not the default) it is not used by
On 24.3, I have a strange thing happening though, but when the point is On 24.4 and 24.5, nothing happen, only helm starting with Probably arch linux use a package with a different tramp version? I suggest you try with emacs-24 branch. Thierry |
I've compiled both trunk and the emacs-24 branch for Emacs (which reports itself as "GNU Emacs 24.3.94.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2) of 2014-10-06 on odonien") and could still reproduce the error from
The handler list changed slightly: '(("\\(?:\\.dz\\|\\.txz\\|\\.xz\\|\\.lzma\\|\\.lz\\|\\.g?z\\|\\.\\(?:tgz\\|svgz\\|sifz\\)\\|\\.tbz2?\\|\\.bz2\\|\\.Z\\)\\(?:~\\|\\.~[-[:alnum:]:#@^._]+\\(?:~[[:digit:]]+\\)?~\\)?\\'" . jka-compr-handler)
("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" . epa-file-handler)
("\\`/[^/]*\\'" . tramp-completion-file-name-handler)
("\\`/[^/|:][^/|]*:" . tramp-file-name-handler)
("\\`/:" . file-name-non-special)) |
I see exactly the same. @thierryvolpiatto be sure to start with the same situation as wasamasa. Especially be sure you start with the same string as shown in the screenshot: the "" is necessary to reproduce. Without it, you get only a ping (which is annoying enough). |
Michael Heerdegen notifications@github.com writes:
Sorry but I can't reproduce: launch ./emacs-helm.sh paste in scratch buffer: "ddg fix put the point on the "p" of "Space" C-x C-f => /home/me/.emacs.d and I have no ping, nothing, if I start in any other part of the string Anyway it looks more a tramp bug than a helm bug. Thierry |
Ah! I finally get it, I pasted the wrong string, a ":" instead of a "=", Thierry |
Do we need Tramp in this situation? I'm not convinced this is Tramp's fault. We are requesting to expand a dir on a remote host. |
Michael Heerdegen notifications@github.com writes:
No, the problem is how to determinate the situation.
Tramp or ffap, try M-x find-file-at-point Thierry |
(helm-find-files-input): Bind non-essential and don't try to input remote files. (helm-find-files-1): Use file-remote-p on TAP.
Thanks, I've checked out the exp branch for helm and that fix works for me. Feel free to close this once it's merged and tested properly. |
FWIW, i still get a freeze when i put the cursor at the first d of "duckduckgo" in set passkeys:duckduckgo.com: (yes, with two colons this time) and hit C-x C-f. The echo area shows "Pinging duckduckgo.com (Commercial)...", and nothing more happens. |
Michael Heerdegen notifications@github.com writes:
Yes, this is an ffap problem, apart not relaying on it I can't fix this, Thierry |
Thierry Volpiatto notifications@github.com writes:
Is the default ffap behavior suitable for us? We could bind
I see it in 25.0
Yes. |
Michael Heerdegen notifications@github.com writes:
Done, didn't know of this var, great thanks.
Me too, but not in 24.4 Thierry |
Since it's not obvious, this helps: |
Having this on by default is highly problematic from a security and privacy standpoint, as it risks having outgoing traffic that could potentially reveal sensitive data (passwords, names, etc.). It also seems to be causing issues for users, see e.g. emacs-helm/helm#648 * lisp/ffap.el (ffap-machine-p-known): Change default to 'accept'.
This is probably the most bizarre bug I've ever encountered in my entire Emacs usage.
As you can see in the screenshot above, I've placed point on a word that's next to the DuckDuckGo URL. If I invoke
M-x helm-find-files
, I get to see a SSH popup by TRAMP that asks me whether I want to continue connecting to DuckDuckGo. No matter whether I tell it to do so or not, I cannot proceed to select a file.I've looked at the sources and it looks like
helm-find-files-input
eventually usesexpand-file-name
on the context around point. Sinceexpand-file-name
looks upfile-name-handler-alist
which contains TRAMP file handlers, they try doing something useful with their input and presumably lock up.I'd like to know whether this behaviour is rather TRAMP's or helm's fault. In any case any suggestions on how to entirely disable guessing sensible defaults that include URLs would be very welcome.
The text was updated successfully, but these errors were encountered: