Skip to content
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

Closed
wasamasa opened this issue Oct 5, 2014 · 16 comments
Closed

Comments

@wasamasa
Copy link

wasamasa commented Oct 5, 2014

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 uses expand-file-name on the context around point. Since expand-file-name looks up file-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.

@thierryvolpiatto
Copy link
Member

Vasilij Schneidermann notifications@github.com writes:

This is probably the most bizarre bug I've ever encountered in my entire Emacs usage.

[687474]

As you can see in the screenshot above, I've placed point on a word
that's next to the DuckDuckGo URL.

It is not an url.
helm-find-files is using internally ffap and ffap is doing strange
things indeed (pinging in some strange and unknown server sometimes)

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 uses expand-file-name on the context around point.

It does so on any input not matching ffap-url-regexp.

Since expand-file-name looks up file-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.

Tramp fault, the regexp used is very basic.

In any case any suggestions on how to entirely disable guessing
sensible defaults that include URLs would be very welcome.

No just move point outside such things before C-x C-f, having urls at
point is really useful.
Maybe though I could disable tramp on the initial computation of what we
have at point, not sure it is possible, I will have a look.

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

@thierryvolpiatto
Copy link
Member

BTW I wonder if your helm copy is up to date, as I can't reproduce this.
IIRC I made a fix for something similar some months ago.

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

@wasamasa
Copy link
Author

wasamasa commented Oct 5, 2014

Yes, I've made sure by removing helm and installing it from the git repository. When starting emacs-helm.sh from helm's directory, I get exactly the same error.

Here's the full traceback:

Debugger entered--Lisp error: (file-error "Process died")
  signal(file-error ("Process died"))
  tramp-error(["scp" nil "duckduckgo.com" "<Space" nil] file-error "Process died")
  apply(tramp-error ["scp" nil "duckduckgo.com" "<Space" nil] file-error "Process died" nil)
  tramp-process-actions(#<process *tramp/scp duckduckgo.com*> ["scp" nil "duckduckgo.com" "<Space" nil] 1 ((tramp-login-prompt-regexp tramp-action-login) (tramp-password-prompt-regexp tramp-action-password) (tramp-wrong-passwd-regexp tramp-action-permission-denied) (shell-prompt-pattern tramp-action-succeed) (tramp-shell-prompt-pattern tramp-action-succeed) (tramp-yesno-prompt-regexp tramp-action-yesno) (tramp-yn-prompt-regexp tramp-action-yn) (tramp-terminal-prompt-regexp tramp-action-terminal) (tramp-process-alive-regexp tramp-action-process-alive)) 60)
  byte-code("�\205��\306�!\205��\307�!\310>?\205��\311  !\210\312\313!\203'�\313J\203'�\314\313\211\"\210\315\211�� \316\317\320\321    !G!\203C�\322\323\324 !\325   !#\202O�\322\326\321  !\324   !\325   !$C���@�A\315\327\330\217\210,�B\203t��C\203t�\316�D\316^X\203t�\315\331\332\217\210\333\216�B\205}�\n?�B�\203\215�\306�!\203\215�\334�!\210\335\336�E\"\210\335\337\340\"\210\335\341!\210\335\342�F\"\210\343 !�G�H�I\315\211�J�K\315�L\312\344!\203\303�\345\344\346N@!\2068�\347\350!\203\332�\351\350!\204\325�\352\350!\2058�\350 \2028�\353\354!\211�M\205\347�\355�M!)\203\363�\356\353\354!!\2028�\353\357!\211�M\205��\355�M!)\203\f�\356\353\357!!\2028�\353\360!\211�M\205��\355�M!)\203%�\356\353\360!!\2028�\361\362!\2031�\356\362!\2028�\363\364!\210\356\365!)�N\366\367\370   !\371   !�O\203P��P�OD\202S��PC$)�\372�\373 #\210\374�\375\"\210\376�\315\"\210\377\201n� \315\"!\201o� B�Q\201p� �R  \201q�\201r�\201s�\201t�\201u��!\201v�#C���@�A\315\201w�\201x�\217\210,\201y��\201z�\201{��P$\210�G\203���G@�S\325�S!�T\321�S!�U\324�S!�V\315�W\201|��T\201}�\"�X\201|��T\201~�\"�Y\201|��T\201��\"�Z\201|��T\201\200�\"�[\201\201��S\201\202�\201\203�\315$\211�\\\205��\325�\\!�]�\\\205��\321�\\!�^�\\\205*�\201\204��\\!�_�X�`\372�\201\205�\201\206�\201\207��a\315�L\312\344!\203O�\345\344\346N@!\206\304�\347\350!\203f�\351\350!\204a�\352\350!\205\304�\350 \202\304�\353\354!\211�M\205s�\355�M!)\203��\356\353\354!!\202\304�\353\357!\211�M\205\214�\355�M!)\203\230�\356\353\357!!\202\304�\353\360!\211�M\205\245�\355�M!)\203\261�\356\353\360!!\202\304�\361\362!\203\275�\356\362!\202\304�\363\364!\210\356\365!)\"!#�b\315\211�c�d�e\203\344��Z\203\344�\201n��Z�Y\"�Y�\\\203\370��[\203\370�\201n��[�Y\"�Y\201\210��f�V\"\203��\201\211�\201\212��V\"�W\201\211�\201\213��V\"�V�g\315�h\211�i\203B��i@�h\201\210��h�R\"\2039�\201\214��d�iA\211�i\204$�*�]\206J��T�j�^\206S��U�k�_\206\\��V�R�V\206f�\201\202��V�U\206p�\201\202��U�W\206z�\201\202��W\201\215�\201\216��V\201\217��U\201\220��W\201\221��b&��c�d?\205\240�\201\222��`\201v�\201s�\201\223��Y\201v�#�d\205\271�\201\224�\260��`  \316\201\225��`C���@�A\315\201\226�\201\227�\217\210,\201\230�  �`\201\214�\211$\210\201\231��  �l�m\201z�%\210   \316\201\232��VC���@�A\315\201\233�\201\234�\217\210.��GA\211�G\204\265�\201\235��  \". \207" [p vec tm pr args fmt-string processp process-status (run open) tramp-get-buffer boundp non-essential throw nil 3 "%s..." zerop tramp-file-name-user format "Opening connection for %s using %s" tramp-file-name-host tramp-file-name-method "Opening connection for %s@%s using %s" (byte-code "�    X\203~�\306 �\307\216�\203;��\310X\203;�\311\312�\313U\203!�\314\2026��\315U\203+�\314\2026��\316U\2035�\317\2026�\320\fP
#\210   \321Y\203}���\203d�\322��!\203d�\323\324��!!\203d�r\324��!q\210\325��!��)��\203}�\326��!\203}�\311\327��\330\331�\"\fP
$\210*\306\207" [level tramp-verbose save-match-data-internal tramp-message-show-message fmt-string args match-data ((byte-code "\301�\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) 3 apply message 0 "" 1 2 "Warning: " "Tramp: " 4 processp buffer-name process-buffer tramp-dissect-file-name vectorp tramp-debug-message format "(%d) # " vec-or-proc default-directory] 6) ((error)) (byte-code "\303\304!\204\f�\305\304!\205/�\304\306\307�!G!\203\"�\310\311\312�!\313�!#\202.�\310\314\307�!\312�!\313�!$!\211�\205:�\315\316\317\320  $�\303\207" [vec pr tm subrp make-progress-reporter functionp zerop tramp-file-name-user format "Opening connection for %s using %s" tramp-file-name-host tramp-file-name-method "Opening connection for %s@%s using %s" run-at-time 3 0.1 tramp-progress-reporter-update] 8) ((error)) ((byte-code "�\203��\306\307!\204��\310\307!\203��\307�!\210  \311\312\313\314    !G!\203,�\315\316\317 !\320   !#\2028�\315\321\314  !\317   !\320   !$C����\322\323\324\217\210,\322\207" [tm vec args fmt-string level vec-or-proc subrp cancel-timer functionp 3 "%s...done" zerop tramp-file-name-user format "Opening connection for %s using %s" tramp-file-name-host tramp-file-name-method "Opening connection for %s@%s using %s" nil (byte-code "� X\203~�\306 �\307\216�\203;��\310X\203;�\311\312�\313U\203!�\314\2026��\315U\203+�\314\2026��\316U\2035�\317\2026�\320\fP
#\210   \321Y\203}���\203d�\322��!\203d�\323\324��!!\203d�r\324��!q\210\325��!��)��\203}�\326��!\203}�\311\327��\330\331�\"\fP
$\210*\306\207" [level tramp-verbose save-match-data-internal tramp-message-show-message fmt-string args match-data ((byte-code "\301�\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) 3 apply message 0 "" 1 2 "Warning: " "Tramp: " 4 processp buffer-name process-buffer tramp-dissect-file-name vectorp tramp-debug-message format "(%d) # " vec-or-proc default-directory] 6) ((error))] 9)) delete-process setenv "TERM" "LC_ALL" "C" "PROMPT_COMMAND" "PS1" tramp-compute-multi-hops temporary-file-directory eval standard-value fboundp temp-directory subrp functionp getenv "TEMP" file-directory-p file-name-as-directory "TMP" "TMPDIR" file-exists-p ...] 10)
  byte-code("\306�!\307�\310\311#\312   !r\313�!q\210`)���\211�\203)�\314\f!\203)�\315\f!\316>\204E�\317\320�\311\"!
@\232\203E�\321\322 
A\"\323V\204E�\324\325\211\"\210\311\326\327\217\210\330\331\332\217,\207" [vec process-environment pos process-name p tramp-current-connection tramp-get-connection-process tramp-get-connection-property "process-name" nil copy-sequence tramp-get-connection-buffer processp process-status (run open) butlast append tramp-time-diff current-time 5 throw suppress (byte-code "\306\307 \310�\311\312#\"\313V\203g��\203g�\314�!\203g�\315�!\316>\203g�\317  \320\321\211$\210\315�!\322>\2036�\323�\324\"\204g� \325\326\327����\327� 
\330\331\332\f\211\333N\334\335�\n#E!C���!�\327\336\337\217\210,\304\f\334\335�\n#C\"\210-\327\207" [p vec args fmt-string signal vec-or-proc tramp-time-diff current-time tramp-get-connection-property "last-cmd-time" (0 0 0) 60 processp process-status (run open) tramp-send-command "echo are you awake" t (run open) tramp-wait-for-output 10 file-error "Awake did fail" nil 1 "%s" error-message-string error-message apply format (byte-code "�   X\203~�\306 �\307\216�\203;��\310X\203;�\311\312�\313U\203!�\314\2026��\315U\203+�\314\2026��\316U\2035�\317\2026�\320\fP
#\210   \321Y\203}���\203d�\322��!\203d�\323\324��!!\203d�r\324��!q\210\325��!��)��\203}�\326��!\203}�\311\327��\330\331�\"\fP
$\210*\306\207" [level tramp-verbose save-match-data-internal tramp-message-show-message fmt-string args match-data ((byte-code "\301�\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) 3 apply message 0 "" 1 2 "Warning: " "Tramp: " 4 processp buffer-name process-buffer tramp-dissect-file-name vectorp tramp-debug-message format "(%d) # " vec-or-proc default-directory] 6) ((error)) tramp-message-show-message level] 10) ((file-error (byte-code "\302�!\210\303\211�\207" [vec p tramp-cleanup nil] 3))) err (byte-code "�\205��\306�!\205��\307�!\310>?\205��\311    !\210\312\313!\203'�\313J\203'�\314\313\211\"\210\315\211�� \316\317\320\321    !G!\203C�\322\323\324 !\325   !#\202O�\322\326\321  !\324   !\325   !$C���@�A\315\327\330\217\210,�B\203t��C\203t�\316�D\316^X\203t�\315\331\332\217\210\333\216�B\205}�\n?�B�\203\215�\306�!\203\215�\334�!\210\335\336�E\"\210\335\337\340\"\210\335\341!\210\335\342�F\"\210\343 !�G�H�I\315\211�J�K\315�L\312\344!\203\303�\345\344\346N@!\2068�\347\350!\203\332�\351\350!\204\325�\352\350!\2058�\350 \2028�\353\354!\211�M\205\347�\355�M!)\203\363�\356\353\354!!\2028�\353\357!\211�M\205��\355�M!)\203\f�\356\353\357!!\2028�\353\360!\211�M\205��\355�M!)\203%�\356\353\360!!\2028�\361\362!\2031�\356\362!\2028�\363\364!\210\356\365!)�N\366\367\370   !\371   !�O\203P��P�OD\202S��PC$)�\372�\373 #\210\374�\375\"\210\376�\315\"\210\377\201n� \315\"!\201o� B�Q\201p� �R  \201q�\201r�\201s�\201t�\201u��!\201v�#C���@�A\315\201w�\201x�\217\210,\201y��\201z�\201{��P$\210�G\203���G@�S\325�S!�T\321�S!�U\324�S!�V\315�W\201|��T\201}�\"�X\201|��T\201~�\"�Y\201|��T\201��\"�Z\201|��T\201\200�\"�[\201\201��S\201\202�\201\203�\315$\211�\\\205��\325�\\!�]�\\\205��\321�\\!�^�\\\205*�\201\204��\\!�_�X�`\372�\201\205�\201\206�\201\207��a\315�L\312\344!\203O�\345\344\346N@!\206\304�\347\350!\203f�\351\350!\204a�\352\350!\205\304�\350 \202\304�\353\354!\211�M\205s�\355�M!)\203��\356\353\354!!\202\304�\353\357!\211�M\205\214�\355�M!)\203\230�\356\353\357!!\202\304�\353\360!\211�M\205\245�\355�M!)\203\261�\356\353\360!!\202\304�\361\362!\203\275�\356\362!\202\304�\363\364!\210\356\365!)\"!#�b\315\211�c�d�e\203\344��Z\203\344�\201n��Z�Y\"�Y�\\\203\370��[\203\370�\201n��[�Y\"�Y\201\210��f�V\"\203��\201\211�\201\212��V\"�W\201\211�\201\213��V\"�V�g\315�h\211�i\203B��i@�h\201\210��h�R\"\2039�\201\214��d�iA\211�i\204$�*�]\206J��T�j�^\206S��U�k�_\206\\��V�R�V\206f�\201\202��V�U\206p�\201\202��U�W\206z�\201\202��W\201\215�\201\216��V\201\217��U\201\220��W\201\221��b&��c�d?\205\240�\201\222��`\201v�\201s�\201\223��Y\201v�#�d\205\271�\201\224�\260��`  \316\201\225��`C���@�A\315\201\226�\201\227�\217\210,\201\230�  �`\201\214�\211$\210\201\231��  �l�m\201z�%\210   \316\201\232��VC���@�A\315\201\233�\201\234�\217\210.��GA\211�G\204\265�\201\235��  \". \207" [p vec tm pr args fmt-string processp process-status (run open) tramp-get-buffer boundp non-essential throw nil 3 "%s..." zerop tramp-file-name-user format "Opening connection for %s using %s" tramp-file-name-host tramp-file-name-method "Opening connection for %s@%s using %s" (byte-code "�    X\203~�\306 �\307\216�\203;��\310X\203;�\311\312�\313U\203!�\314\2026��\315U\203+�\314\2026��\316U\2035�\317\2026�\320\fP
#\210   \321Y\203}���\203d�\322��!\203d�\323\324��!!\203d�r\324��!q\210\325��!��)��\203}�\326��!\203}�\311\327��\330\331�\"\fP
$\210*\306\207" [level tramp-verbose save-match-data-internal tramp-message-show-message fmt-string args match-data ((byte-code "\301�\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) 3 apply message 0 "" 1 2 "Warning: " "Tramp: " 4 processp buffer-name process-buffer tramp-dissect-file-name vectorp tramp-debug-message format "(%d) # " vec-or-proc default-directory] 6) ((error)) (byte-code "\303\304!\204\f�\305\304!\205/�\304\306\307�!G!\203\"�\310\311\312�!\313�!#\202.�\310\314\307�!\312�!\313�!$!\211�\205:�\315\316\317\320  $�\303\207" [vec pr tm subrp make-progress-reporter functionp zerop tramp-file-name-user format "Opening connection for %s using %s" tramp-file-name-host tramp-file-name-method "Opening connection for %s@%s using %s" run-at-time 3 0.1 tramp-progress-reporter-update] 8) ((error)) ((byte-code "�\203��\306\307!\204��\310\307!\203��\307�!\210  \311\312\313\314    !G!\203,�\315\316\317 !\320   !#\2028�\315\321\314  !\317   !\320   !$C����\322\323\324\217\210,\322\207" [tm vec args fmt-string level vec-or-proc subrp cancel-timer functionp 3 "%s...done" zerop tramp-file-name-user format "Opening connection for %s using %s" tramp-file-name-host tramp-file-name-method "Opening connection for %s@%s using %s" nil (byte-code "� X\203~�\306 �\307\216�\203;��\310X\203;�\311\312�\313U\203!�\314\2026��\315U\203+�\314\2026��\316U\2035�\317\2026�\320\fP
#\210   \321Y\203}���\203d�\322��!\203d�\323\324��!!\203d�r\324��!q\210\325��!��)��\203}�\326��!\203}�\311\327��\330\331�\"\fP
$\210*\306\207" [level tramp-verbose save-match-data-internal tramp-message-show-message fmt-string args match-data ... 3 apply message 0 "" 1 2 "Warning: " "Tramp: " 4 processp buffer-name process-buffer tramp-dissect-file-name vectorp tramp-debug-message format "(%d) # " vec-or-proc default-directory] 6) ((error))] 9)) delete-process setenv "TERM" "LC_ALL" "C" "PROMPT_COMMAND" "PS1" tramp-compute-multi-hops temporary-file-directory eval standard-value fboundp temp-directory subrp functionp getenv "TEMP" file-directory-p file-name-as-directory "TMP" "TMPDIR" file-exists-p ...] 10) ((quit (byte-code "\302�!\210\303  @   A\"\207" [vec err tramp-cleanup signal] 3)))] 6)
  ad-Orig-tramp-maybe-open-connection(["scp" nil "duckduckgo.com" "<Space" nil])
  tramp-maybe-open-connection(["scp" nil "duckduckgo.com" "<Space" nil])
  tramp-send-command(["scp" nil "duckduckgo.com" "<Space" nil] "cd ~; pwd")
  tramp-sh-handle-expand-file-name("/duckduckgo.com:<Space" "/home/wasa/")
  apply(tramp-sh-handle-expand-file-name ("/duckduckgo.com:<Space" "/home/wasa/"))
  tramp-sh-file-name-handler(expand-file-name "/duckduckgo.com:<Space" "/home/wasa/")
  apply(tramp-sh-file-name-handler expand-file-name ("/duckduckgo.com:<Space" "/home/wasa/"))
  byte-code("\300\301\215\207" [suppress (apply foreign operation args)] 2)
  #[nil "�K\306�\211�<\203\240�\n@\307=\203\240�\306�\310\311!\203\"�\312\311\313N@!\206\221�\314\315!\2039�\316\315!\2044�\317\315!\205\221�\315 \202\221�\320\321!\211�\205D�\322\f!)\203P�\323\320\321!!\202\221�\320\324!\211�\205[�\322\f!)\203g�\323\320\324!!\202\221�\320\325!\211�\205r�\322\f!)\203~�\323\320\325!!\202\221�\326\327!\203\212�\323\327!\202\221�\330\331!\210\323\332!)�\333\n\211�*A@)\334\335#\210)\336\337\215\211�\336=\203\315��+\340\341\342�,C�-\"C�-�.�/�0\306\343\344\217,\210\345�,�-\"\202�� \346=\203\377�\306�1�+\347\350\342�,C�-\"C�-�.�/�0\306\343\344\217,\210\351�+!\210\345�,�-\")\202�� *\207" [foreign result sf file-name-handler-alist d default-directory nil autoload boundp temporary-file-directory eval standard-value fboundp temp-directory subrp functionp getenv "TEMP" file-directory-p file-name-as-directory "TMP" "TMPDIR" file-exists-p "c:/temp" message "Neither `temporary-file-directory' nor `temp-directory' is defined -- using /tmp." "/tmp" load noerror nomessage non-essential (byte-code "\300\301\215\207" [suppress (apply foreign operation args)] 2) 5 "Non-essential received in operation %s" append (byte-code "�   X\205}�\306 �\307\216�\203;��\310X\203;�\311\312�\313U\203!�\314\2026��\315U\203+�\314\2026��\316U\2035�\317\2026�\320\fP
#\210   \321Y\205|���\203d�\322��!\203d�\323\324��!!\203d�r\324��!q\210\325��!��)��\205|�\326��!\205|�\311\327��\330\331�\"\fP
$*\207" [level tramp-verbose save-match-data-internal tramp-message-show-message fmt-string args match-data ((byte-code "\301�\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) 3 apply message 0 "" 1 2 "Warning: " "Tramp: " 4 processp buffer-name process-buffer tramp-dissect-file-name vectorp tramp-debug-message format "(%d) # " vec-or-proc default-directory] 6) ((error)) tramp-run-real-handler suppress 1 "Suppress received in operation %s" tramp-cleanup x v operation args fmt-string level vec-or-proc tramp-message-show-message] 7]()
  tramp-file-name-handler(expand-file-name "/duckduckgo.com:<Space" "/home/wasa/")
  expand-file-name("/duckduckgo.com:<Space" "/home/wasa/")
  apply(expand-file-name ("/duckduckgo.com:<Space" "/home/wasa/"))
  tramp-completion-run-real-handler(expand-file-name ("/duckduckgo.com:<Space" "/home/wasa/"))
  tramp-completion-file-name-handler(expand-file-name "/duckduckgo.com:<Space" "/home/wasa/")
  expand-file-name("/duckduckgo.com:<Space" "/home/wasa/")
  (and file-at-pt (not urlp) (expand-file-name file-at-pt def-dir))
  (let* ((def-dir (helm-current-directory)) (urlp (and file-at-pt ffap-url-regexp (string-match ffap-url-regexp file-at-pt))) (abs (and file-at-pt (not urlp) (expand-file-name file-at-pt def-dir))) (lib (if helm-ff-search-library-in-sexp (progn (helm-find-library-at-point)))) (hlink (helm-ff-find-url-at-point)) (remp (and abs (file-remote-p abs))) (file-p (and (not remp) file-at-pt (not (string= file-at-pt "")) (file-exists-p file-at-pt) thing-at-pt (not (string= thing-at-pt "")) (file-exists-p (file-name-directory (expand-file-name thing-at-pt def-dir)))))) (cond (lib) (hlink) (remp abs) (file-p (let ((it (ffap-file-at-point))) (if it (expand-file-name it)))) (urlp file-at-pt) ((and file-at-pt (file-exists-p file-at-pt)) file-at-pt)))
  helm-find-files-input("/duckduckgo.com:<Space" "Space")
  eval((helm-find-files-input (ffap-guesser) (thing-at-point (quote filename))) nil)
  eval-expression((helm-find-files-input (ffap-guesser) (thing-at-point (quote filename))) nil)
  call-interactively(eval-expression nil nil)

Here's my value of file-name-handler-alist:

'(("\\(?:\\.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.

@thierryvolpiatto
Copy link
Member

Vasilij Schneidermann notifications@github.com writes:

Yes, I've made sure by removing helm and installing it from the git
repository. When starting emacs-helm.sh from helm's directory, I get
exactly the same error.

I can't reproduce.

Here's the full traceback:

Debugger entered--Lisp error: (file-error "Process died")
signal(file-error ("Process died"))
tramp-error(["scp" nil "duckduckgo.com" "<Space" nil] file-error "Process died")

Looks a tramp error, I guess if you run find-file-at-point instead of
helm you will have the same result.

Here's my value of file-name-handler-alist:

If it comes from your init file (not the default) it is not used by
emacs-helm.sh.

I'm still using Emacs 24.3 on Arch Linux.

On 24.3, I have a strange thing happening though, but when the point is
on duckduckgo between the two ":":
pinging duckduckgo (commercial)

On 24.4 and 24.5, nothing happen, only helm starting with
default-directory.

Probably arch linux use a package with a different tramp version?

I suggest you try with emacs-24 branch.

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

@wasamasa
Copy link
Author

wasamasa commented Oct 6, 2014

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 ./emacs-helm.sh with the latter (this time from that file and with M-x toggle-debug-on-quit):

Debugger entered--Lisp error: (quit)
  signal(quit nil)
  byte-code("\302�\303\"\210\304    @   A\"\207" [vec err tramp-cleanup-connection t signal] 3)
  tramp-maybe-open-connection([#("scp" 0 3 (tramp-default t)) nil "duckduckgo.com" "<Space" nil])
  tramp-send-command([#("scp" 0 3 (tramp-default t)) nil "duckduckgo.com" "<Space" nil] "cd ~; pwd")
  tramp-sh-handle-expand-file-name("/duckduckgo.com:<Space" "/home/wasa/")
  apply(tramp-sh-handle-expand-file-name ("/duckduckgo.com:<Space" "/home/wasa/"))
  tramp-sh-file-name-handler(expand-file-name "/duckduckgo.com:<Space" "/home/wasa/")
  apply(tramp-sh-file-name-handler expand-file-name ("/duckduckgo.com:<Space" "/home/wasa/"))
  byte-code("\300\301\215\207" [suppress (apply foreign operation args)] 2)
  byte-code("�K\306�\211�<\203\237�\n@\307=\203\237�\306�\310\311!\203\"�\312\311\313N@!\206\221�\314\315!\2039�\316\315!\2044�\317\315!\205\221�\315 \202\221�\320\321!\211�\205D�\322\f!)\203P�\323\320\321!!\202\221�\320\324!\211�\205[�\322\f!)\203g�\323\320\324!!\202\221�\320\325!\211�\205r�\322\f!)\203~�\323\320\325!!\202\221�\326\327!\203\212�\323\327!\202\221�\330\331!\210\323\332!)�\333\n\211A@\262�\334\335#\210)\336\337\215\211�\336=\203\314��+\340\341\342�,C�-\"C�.�/�0�1\306\343\344\217,\210\345�,�-\"\202��   \346=\203\377�\306�2�+\347\350\342�,C�-\"C�.�/�0�1\306\343\344\217,\210\351�+\352\"\210\345�,�-\")\202��    *\207" [foreign result sf file-name-handler-alist d default-directory nil autoload boundp temporary-file-directory eval standard-value fboundp temp-directory subrp functionp getenv "TEMP" file-directory-p file-name-as-directory "TMP" "TMPDIR" file-exists-p "c:/temp" message "Neither `temporary-file-directory' nor `temp-directory' is defined -- using /tmp." "/tmp" load noerror nomessage non-essential (byte-code "\300\301\215\207" [suppress (apply foreign operation args)] 2) 5 "Non-essential received in operation %s" append (byte-code "�   X\205g�\306 �\307\216�\203;��\310X\203;�\311\312�\313U\203!�\314\2026��\315U\203+�\314\2026��\316U\2035�\317\2026�\320\fP
#\210   \321Y\205f�\322��!\203S�\313�\323��\324\325#��)\326��!\205f�\311\327��\330\331�\"\fP
$*\207" [level tramp-verbose save-match-data-internal tramp-message-show-message fmt-string arguments match-data ((byte-code "\301�\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) 3 apply message 0 "" 1 2 "Warning: " "Tramp: " 4 processp tramp-get-connection-property "vector" nil vectorp tramp-debug-message format "(%d) # " vec-or-proc] 6) ((error)) tramp-run-real-handler suppress 1 "Suppress received in operation %s" tramp-cleanup-connection t v operation args arguments fmt-string level vec-or-proc ...] 7)
  tramp-file-name-handler(expand-file-name "/duckduckgo.com:<Space" "/home/wasa/")
  expand-file-name("/duckduckgo.com:<Space" "/home/wasa/")
  apply(expand-file-name ("/duckduckgo.com:<Space" "/home/wasa/"))
  tramp-completion-run-real-handler(expand-file-name ("/duckduckgo.com:<Space" "/home/wasa/"))
  tramp-completion-file-name-handler(expand-file-name "/duckduckgo.com:<Space" "/home/wasa/")
  expand-file-name("/duckduckgo.com:<Space" "/home/wasa/")
  helm-find-files-input("/duckduckgo.com:<Space" "Space")
  helm-find-files-initial-input()
  helm-find-files(nil)
  call-interactively(helm-find-files nil nil)
  command-execute(helm-find-files)

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))

@michael-heerdegen
Copy link
Contributor

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).

@thierryvolpiatto
Copy link
Member

Michael Heerdegen notifications@github.com writes:

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).

Sorry but I can't reproduce:

launch ./emacs-helm.sh

paste in scratch buffer:

"ddg fix
set passkeys:duckduckgo.com:

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
(apart on emacs-24.3)
Are you sure guys you don't have a old tramp version somewhere in your
load-path ?

Anyway it looks more a tramp bug than a helm bug.

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

@thierryvolpiatto
Copy link
Member

Ah! I finally get it, I pasted the wrong string, a ":" instead of a "=",
I will try to debug this.

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

@michael-heerdegen
Copy link
Contributor

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.

@thierryvolpiatto
Copy link
Member

Michael Heerdegen notifications@github.com writes:

Do we need Tramp in this situation?

No, the problem is how to determinate the situation.

I'm not convinced this is Tramp's fault. We are requesting to expand a dir on a remote host.

Tramp or ffap, try M-x find-file-at-point

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

thierryvolpiatto added a commit that referenced this issue Oct 7, 2014
(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.
@wasamasa
Copy link
Author

wasamasa commented Oct 7, 2014

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.

@michael-heerdegen
Copy link
Contributor

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.

@thierryvolpiatto
Copy link
Member

Michael Heerdegen notifications@github.com writes:

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.

Yes, this is an ffap problem, apart not relaying on it I can't fix this,
just C-g and move point somewhere else when this happen.
This happen only in 24.3 for me.
You should be able to reproduce same thing with M-x find-file-at-point.

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

@michael-heerdegen
Copy link
Contributor

Thierry Volpiatto notifications@github.com writes:

Yes, this is an ffap problem, apart not relaying on it I can't fix
this, just C-g and move point somewhere else when this happen.

Is the default ffap behavior suitable for us? We could bind
`ffap-machine-p-known' to avoid the ping. Do we want the ping?

This happen only in 24.3 for me.

I see it in 25.0

You should be able to reproduce same thing with M-x
find-file-at-point.

Yes.

@thierryvolpiatto
Copy link
Member

Michael Heerdegen notifications@github.com writes:

Is the default ffap behavior suitable for us? We could bind
`ffap-machine-p-known' to avoid the ping.

Done, didn't know of this var, great thanks.

I see it in 25.0

Me too, but not in 24.4

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

@freckletonj
Copy link

Since it's not obvious, this helps: (setq ffap-machine-p-known 'reject)

dickmao pushed a commit to commercial-emacs/commercial-emacs that referenced this issue Jul 8, 2022
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'.
uqix pushed a commit to uqix/.emacs.d that referenced this issue Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants