* Filename auto complete doesn't work in tramp mode @ 2013-05-21 6:27 Ravi 2013-05-21 7:54 ` Michael Albinus 0 siblings, 1 reply; 11+ messages in thread From: Ravi @ 2013-05-21 6:27 UTC (permalink / raw) To: help-gnu-emacs H i, I am using tramp mode in Emacs to edit files over ssh. Though listing of directories works fine when I open it over ssh, but filename auto complete doesn't work at all. What can I do to further troubleshoot the problem? Thanks, Ravi A ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Filename auto complete doesn't work in tramp mode 2013-05-21 6:27 Filename auto complete doesn't work in tramp mode Ravi @ 2013-05-21 7:54 ` Michael Albinus 2013-05-21 8:03 ` ken 2013-05-22 6:34 ` Ravi 0 siblings, 2 replies; 11+ messages in thread From: Michael Albinus @ 2013-05-21 7:54 UTC (permalink / raw) To: Ravi; +Cc: help-gnu-emacs Ravi <ra.ravi.rav@gmail.com> writes: > Hi, Hi Ravi, > I am using tramp mode in Emacs to edit files over ssh. Though listing of > directories works fine when I open it over ssh, but filename auto complete > doesn't work at all. > > What can I do to further troubleshoot the problem? Could you, please, give an example what does not work? Which keys have you entered, and what shall be the expected result? Do you load any completion package? Does the problem happen when you start "emacs -Q"? And which Emacs / Tramp version are you using? > Thanks, > > Ravi A Best regards, Michael. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Filename auto complete doesn't work in tramp mode 2013-05-21 7:54 ` Michael Albinus @ 2013-05-21 8:03 ` ken 2013-05-22 6:35 ` Ravi 2013-05-22 6:34 ` Ravi 1 sibling, 1 reply; 11+ messages in thread From: ken @ 2013-05-21 8:03 UTC (permalink / raw) To: Michael Albinus; +Cc: help-gnu-emacs, Ravi On 05/21/2013 03:54 AM Michael Albinus wrote: > Ravi <ra.ravi.rav@gmail.com> writes: > >> Hi, > > Hi Ravi, > >> I am using tramp mode in Emacs to edit files over ssh. Though listing of >> directories works fine when I open it over ssh, but filename auto complete >> doesn't work at all. >> >> What can I do to further troubleshoot the problem? ;; To find version do C-x C-e at end of this line: tramp-version ;; Just for debugging. (setq tramp-verbose 9) (setq tramp-debug-buffer t) > .... ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Filename auto complete doesn't work in tramp mode 2013-05-21 8:03 ` ken @ 2013-05-22 6:35 ` Ravi 2013-05-22 8:46 ` Michael Albinus 0 siblings, 1 reply; 11+ messages in thread From: Ravi @ 2013-05-22 6:35 UTC (permalink / raw) To: gebser; +Cc: help-gnu-emacs, Michael Albinus Hi Ken, Thanks for replying. Tramp version I am using is: 2.2.3-24.1 The debug output is available at: http://pastebin.com/PZuxs1St Thanks, Ravi -- ►http://raviforyou.xolve.net <http://raviforyou.blogspot.com> ◄ On Tue, May 21, 2013 at 1:33 PM, ken <gebser@mousecar.com> wrote: > On 05/21/2013 03:54 AM Michael Albinus wrote: > >> Ravi <ra.ravi.rav@gmail.com> writes: >> >> Hi, >>> >> >> Hi Ravi, >> >> I am using tramp mode in Emacs to edit files over ssh. Though listing of >>> directories works fine when I open it over ssh, but filename auto >>> complete >>> doesn't work at all. >>> >>> What can I do to further troubleshoot the problem? >>> >> > ;; To find version do C-x C-e at end of this line: tramp-version > ;; Just for debugging. > (setq tramp-verbose 9) > (setq tramp-debug-buffer t) > > > .... >> > > > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Filename auto complete doesn't work in tramp mode 2013-05-22 6:35 ` Ravi @ 2013-05-22 8:46 ` Michael Albinus 2013-05-23 12:21 ` Ravi 0 siblings, 1 reply; 11+ messages in thread From: Michael Albinus @ 2013-05-22 8:46 UTC (permalink / raw) To: Ravi; +Cc: help-gnu-emacs Ravi <ra.ravi.rav@gmail.com> writes: > Hi Ken, Hi Ravi, > The debug output is available at: http://pastebin.com/PZuxs1St In the debug output, there is the following sequence (shortened): 00:10:03.198174 tramp-send-command (6) # tramp_perl_file_name_all_completions /home/username/ '' 0 00:10:03.513918 tramp-wait-for-regexp (6) # ///4a9849cafd12e16baecfd05f1384e262#$ 00:10:03.514405 tramp-sh-handle-file-name-all-completions (1) # File error: tramp-sh-handle-file-name-all-completions: internal error accessing `/home/username/': `' That means, that Tramp sends the command "tramp_perl_file_name_all_completions /home/username/ '' 0", which is an internal shell function which Tramp has declared earlier. It returns an empty output, "///4a9849cafd12e16baecfd05f1384e262#$" is just the shell prompt for Tramp. That internal shell function does not work correctly; it shall return as last output line "ok\n". 'Cause this line is missing, Tramp speaks about an internal error. So we need to debug that shell function, which is mainly the call of a Perl script. First step is to check, that there are no wrong connection properties left in Tramp due to a previous connection. Could you, please, perform "M-x tramp-cleanup-all-connections" and rerun the test? I would also like to see the *whole* debug buffer of that test. If you do not want to publish it due to internal sensitive information, you might send it to me directly. > Thanks, > Ravi Best regards, Michael. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Filename auto complete doesn't work in tramp mode 2013-05-22 8:46 ` Michael Albinus @ 2013-05-23 12:21 ` Ravi 2013-05-23 13:03 ` Michael Albinus 0 siblings, 1 reply; 11+ messages in thread From: Ravi @ 2013-05-23 12:21 UTC (permalink / raw) To: Michael Albinus; +Cc: help-gnu-emacs > > Hi Ravi, > Hi Michael, In the debug output, there is the following sequence (shortened): > > 00:10:03.198174 tramp-send-command (6) # > tramp_perl_file_name_all_completions /home/username/ '' 0 > 00:10:03.513918 tramp-wait-for-regexp (6) # > ///4a9849cafd12e16baecfd05f1384e262#$ > 00:10:03.514405 tramp-sh-handle-file-name-all-completions (1) # File > error: tramp-sh-handle-file-name-all-completions: internal error accessing > `/home/username/': `' > > That means, that Tramp sends the command > "tramp_perl_file_name_all_completions /home/username/ '' 0", which is an > internal shell function which Tramp has declared earlier. It returns an > empty output, "///4a9849cafd12e16baecfd05f1384e262#$" is just the shell > prompt for Tramp. > > That internal shell function does not work correctly; it shall return as > last output line "ok\n". 'Cause this line is missing, Tramp speaks about > an internal error. > Thanks, at least its some start! I do not know Perl and know little elisp but will surely try to triage the problem as much as I can. So we need to debug that shell function, which is mainly the call of a > Perl script. > > First step is to check, that there are no wrong connection properties > left in Tramp due to a previous connection. Could you, please, perform > "M-x tramp-cleanup-all-connections" and rerun the test? > I performed the actions as you mentioned. Following are the results: 1. After "M-x tramp-cleanup-all-connections" , C-x C-f , enter path as "/scpc:myserver_name_changed.com:/home/" and pres TAB. It asks for passphrase and opens the connection, which succeeds. But it gives the error: "ssh: Could not resolve hostname scpc: Name or service not known" 2. Do C-x C-f again, enter path: "/scpc:myserver_name_changed.com:/home/" and press TAB. It will wait for the command to complete and will show "[No match]" next to path in mini-buffer. I would also like to see the *whole* debug buffer of that test. If you > do not want to publish it due to internal sensitive information, you > might send it to me directly. > The log is available in base64 encoding at: http://pastebin.com/qbbAFC8n (you can copy paste text in a text editor, save it and run command "base64 -d <filename>" to get original contents) > Best regards, Michael. > Thanks a lot for you efforts Michael. -Ravi ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Filename auto complete doesn't work in tramp mode 2013-05-23 12:21 ` Ravi @ 2013-05-23 13:03 ` Michael Albinus 2013-05-23 14:23 ` Ravi 0 siblings, 1 reply; 11+ messages in thread From: Michael Albinus @ 2013-05-23 13:03 UTC (permalink / raw) To: Ravi; +Cc: help-gnu-emacs Ravi <ra.ravi.rav@gmail.com> writes: > Hi Michael, Hi Ravi, > Thanks, at least its some start! I do not know Perl and know little > elisp but will surely try to triage the problem as much as I can. > > The log is available in base64 encoding at: > http://pastebin.com/qbbAFC8n > (you can copy paste text in a text editor, save it and run command > "base64 -d <filename>" to get original contents) Thanks for this. In fact, "M-x base64-decode-region" in an Emacs buffer is sufficient :-) Well, it looks like there is a Perl problem on your remote host. Tramp checks for Perl versions, but it might not be good enough in your case. What happens, if you call the following in a remote shell on that host: --8<---------------cut here---------------start------------->8--- which \perl5 --8<---------------cut here---------------end--------------->8--- And if it looks trustworthy, please call the following in the remote shell: --8<---------------cut here---------------start------------->8--- \perl5 -e 'sub case { my $str = shift; if ($ARGV[2]) { return lc($str); } else { return $str; } } opendir(d, $ARGV[0]) || die("$ARGV[0]: $!\nfail\n"); @files = readdir(d); closedir(d); foreach $f (@files) { if (case(substr($f, 0, length($ARGV[1]))) eq case($ARGV[1])) { if (-d "$ARGV[0]/$f") { print "$f/\n"; } else { print "$f\n"; } } } print "ok\n" ' /home/ '' 0 --8<---------------cut here---------------end--------------->8--- > Thanks a lot for you efforts Michael. > -Ravi Best regards, Michael. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Filename auto complete doesn't work in tramp mode 2013-05-23 13:03 ` Michael Albinus @ 2013-05-23 14:23 ` Ravi 2013-05-24 7:17 ` Michael Albinus 0 siblings, 1 reply; 11+ messages in thread From: Ravi @ 2013-05-23 14:23 UTC (permalink / raw) To: Michael Albinus; +Cc: help-gnu-emacs > Hi Ravi, > Hi Michael, > Thanks for this. In fact, "M-x base64-decode-region" in an Emacs buffer > is sufficient :-) > Gee! Emacs rocks ! > Well, it looks like there is a Perl problem on your remote host. Tramp > checks for Perl versions, but it might not be good enough in your case. > > What happens, if you call the following in a remote shell on that host: > > --8<---------------cut here---------------start------------->8--- > which \perl5 > --8<---------------cut here---------------end--------------->8--- > I get "/usr/local/bin/perl5". But this is broken, because of a missing library: $ ldd /usr/local/redhat/packages/local/bin/perl5.00503 linux-gate.so.1 => (0xffffe000) libnsl.so.1 => /lib/libnsl.so.1 (0x00bf1000) libdb.so.3 => not found libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0xf7eb1000) libdl.so.2 => /lib/libdl.so.2 (0x00810000) libm.so.6 => /lib/libm.so.6 (0x00833000) libc.so.6 => /lib/libc.so.6 (0x006b4000) libcrypt.so.1 => /lib/libcrypt.so.1 (0xf7e7e000) /lib/ld-linux.so.2 (0x00691000) And it will error out as: "error while loading shared libraries: libdb.so.3: cannot open shared object file: No such file or directory" > And if it looks trustworthy, please call the following in the remote > shell: > > --8<---------------cut here---------------start------------->8--- > > \perl > 5 > -e 'sub case { > my $str = shift; > if ($ARGV[2]) { > return lc($str); > } > else { > return $str; > } > } > opendir(d, $ARGV[0]) || die("$ARGV[0]: $!\nfail\n"); > @files = readdir(d); closedir(d); > foreach $f (@files) { > if (case(substr($f, 0, length($ARGV[1]))) eq case($ARGV[1])) { > if (-d "$ARGV[0]/$f") { > print "$f/\n"; > } > else { > print "$f\n"; > } > } > } > print "ok\n" > ' /home/ '' 0 > --8<---------------cut here---------------end--------------->8--- > If I run the snippet with perl5 replaced with perl it will run fine with following output: ./ ../ username/ ok Yeah! now we know Perl package is the problem. What I have to do so that tram uses "perl" instead of "perl5". You really helped in pinpointing the issue with great precision! Best regards, Michael. > Thanks and Regards, Ravi ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Filename auto complete doesn't work in tramp mode 2013-05-23 14:23 ` Ravi @ 2013-05-24 7:17 ` Michael Albinus 2013-05-24 13:22 ` Ravi 0 siblings, 1 reply; 11+ messages in thread From: Michael Albinus @ 2013-05-24 7:17 UTC (permalink / raw) To: Ravi; +Cc: help-gnu-emacs Ravi <ra.ravi.rav@gmail.com> writes: > Hi Michael, Hi Ravi, > Yeah! now we know Perl package is the problem. What I have to do so > that tram uses "perl" instead of "perl5". Best would be to fix Perl5 on that remote machine. But I understand that it might not be possible when the remote machine is not under your control. Tramp checks several properties of a remote machine during connection setup, like the Perl binary to be used. Since Tramp 2.2.7, such properties can be overwritten by own values - exactly what you need. You might add the following into your .emacs after loading Tramp: (add-to-list 'tramp-connection-properties (list (regexp-quote "your.server.name") "perl" "/path/to/perl")) You could either install Tramp 2.2.7 from its ftp archive, or you could switch to the development version of Emacs, which contains Tramp 2.2.8-pre. > Thanks and Regards, > Ravi Best regards, Michael. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Filename auto complete doesn't work in tramp mode 2013-05-24 7:17 ` Michael Albinus @ 2013-05-24 13:22 ` Ravi 0 siblings, 0 replies; 11+ messages in thread From: Ravi @ 2013-05-24 13:22 UTC (permalink / raw) To: Michael Albinus; +Cc: help-gnu-emacs Hi Ravi, > Hi Michael , Best would be to fix Perl5 on that remote machine. But I understand that > it might not be possible when the remote machine is not under your control. > > Tramp checks several properties of a remote machine during connection > setup, like the Perl binary to be used. Since Tramp 2.2.7, such > properties can be overwritten by own values - exactly what you need. You > might add the following into your .emacs after loading Tramp: > > (add-to-list 'tramp-connection-properties > (list (regexp-quote "your.server.name") "perl" > "/path/to/perl")) > > You could either install Tramp 2.2.7 from its ftp archive, or you could > switch to the development version of Emacs, which contains Tramp 2.2.8-pre. > Thanks a lot!! this is really great work you are doing, we all users appreciate it :) > Best regards, Michael. > Thanks Again, Ravi ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Filename auto complete doesn't work in tramp mode 2013-05-21 7:54 ` Michael Albinus 2013-05-21 8:03 ` ken @ 2013-05-22 6:34 ` Ravi 1 sibling, 0 replies; 11+ messages in thread From: Ravi @ 2013-05-22 6:34 UTC (permalink / raw) To: Michael Albinus; +Cc: help-gnu-emacs H i Michael, Thanks for replying. Could you, please, give an example what does not work? Which keys have > you entered, and what shall be the expected result? > When I am using tramp, I press C-x C-f and get this prompt /scpc:myserver_name_changed.com:/home/ I press TAB it waits for the network to return the list of files in the directory but then it shows [No match] in Mini Buffer. > Do you load any completion package? No. Filename completion for local files works just out of box. > Does the problem happen when you > start "emacs -Q"? > Yes > And which Emacs / Tramp version are you using? > 2.2.3-24.1 > > Thanks, > > > > Ravi A > > Best regards, Michael. > ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-05-24 13:22 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-05-21 6:27 Filename auto complete doesn't work in tramp mode Ravi 2013-05-21 7:54 ` Michael Albinus 2013-05-21 8:03 ` ken 2013-05-22 6:35 ` Ravi 2013-05-22 8:46 ` Michael Albinus 2013-05-23 12:21 ` Ravi 2013-05-23 13:03 ` Michael Albinus 2013-05-23 14:23 ` Ravi 2013-05-24 7:17 ` Michael Albinus 2013-05-24 13:22 ` Ravi 2013-05-22 6:34 ` Ravi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).