David Smith | 20 Apr 2013 22:07
Picon
Favicon

perl local decoding leads to empty buffers

Hi!

I'm trying to use tramp to edit files via ssh from an openwrt box.
When I attempt find-file on a tramp filename for that box, tramp
appears to work, no errors are reported, but the resulting buffer
contains no contents for files that have contents. I'm using tramp
2.2.3-24.1 bundled with emacs 24.1 on ubuntu 12.10.

I debugged the problem a bit and have a workaround but I doubt it is
the best solution. Can you please help me understand what the right
fix should be? I'm happy to test.

What I noticed is that from tramp-sh-handle-file-local-copy, the
remote-encoding and local-decoding commands are gotten from
tramp-get-inline-coding, then passed to
tramp-call-local-coding-command. The decoding command looks like this
initially:

  perl -e 'binmode STDIN; binmode STDOUT; print unpack(q{u*}, join q{}, <>)'

And when returned from tramp-get-inline-coding, a >%s is appended, producing

  perl -e 'binmode STDIN; binmode STDOUT; print unpack(q{u*}, join q{}, <>)' >%s

tramp-call-local-coding-command take three args: cmd, input, and
output. tramp-sh-handle-file-local-copy invokes
tramp-call-local-coding-command with the perl command with >%s
appended for cmd, the temporary file containing the output of the
remote-encoding perl command as input, and a second temporary file as
output. tramp-call-local-coding-command also interprets any %s in cmd
(Continue reading)

Gilles Pion | 12 Apr 2013 14:00
Picon

old problem, purely cosmetic, but a little bit ugly

hello,

As long as I remember I've always encoutered this issue,
maybe someone has a workaround..

Inside remote (accessed via tramp) dired buffers, changing any file attributes
like "dired-do-chmod", "dired-do-chgrp", etc ... results in lines of the
affected files being misaligned.

Before:
  drwxrwxrwx 2 clampin users 4096 2013-04-12 13:48 .
  drwx------ 7 clampin users 4096 2013-04-12 11:47 ..
  -rw-r--r-- 1 clampin users    1 2013-04-12 13:47 f1
  -rw-r--r-- 1 clampin users    0 2013-04-12 13:47 f2
  -rw-r--r-- 1 clampin users    0 2013-04-12 13:48 f3

After applying "dired-do-chmod on f2:
  drwxrwxrwx 2 clampin users 4096 2013-04-12 13:48 .
  drwx------ 7 clampin users 4096 2013-04-12 11:47 ..
  -rw-r--r-- 1 clampin users    1 2013-04-12 13:47 f1
  -rw-r--r-- 1 clampin users 0 2013-04-12 13:47 f2
  -rw-r--r-- 1 clampin users    0 2013-04-12 13:48 f3

==> note the inalid alignement of "f2" line

Not sure if this really related to tramp, but it's occurs only in dired/tramp
buffers (ange-ftp through tramp ones are ok)
--

-- 
Gilles Pion
(Continue reading)

Gilles Pion | 12 Apr 2013 09:50
Picon

ange-ftp doesn't work after unloading tramp

(maybe I'm doing wrong)

after having executed: (tramp-unload-tramp), (find-file "/user <at> host:") signals
error:
Debugger entered--Lisp error: (void-function ange-ftp-run-real-handler)
  signal(void-function (ange-ftp-run-real-handler))
  byte-code("\301 <at> A\"\207" [err signal] 3)
  ange-ftp-hook-function(expand-file-name "/user <at> host:" nil)
  expand-file-name("/user <at> host:")
  find-file-noselect("/user <at> host:" nil nil nil)
  find-file("/user <at> host:")
  eval-region(213 242 t (lambda (ignore) (goto-char 242) (quote (find-file
"/user <at> host:"))))  ; Reading at buffer position 231
  apply(eval-region (213 242 t (lambda (ignore) (goto-char 242) (quote
(find-file "/user <at> host:")))))
  eval-defun-2()
  eval-defun(nil)
  call-interactively(eval-defun nil nil)

(describe-function 'ange-ftp-run-real-handler) gives:

ange-ftp-run-real-handler is an alias for `tramp-run-real-handler',
which is not defined.  Please make a bug report.

Tramp-version: 2.2.6-24.3
GNU Emacs 24.3.1 (i686-pc-cygwin) 
--

-- 
Gilles Pion
Thierry Volpiatto | 28 Mar 2013 00:22
Picon
Gravatar

tramp-dissect-file-name new user-error message

Hi Michael,

in the last changes you made in tramp, you are raising a user-error
message when host have the name of one of the methods.
But tramp-dissect-file-name set host to e.g "sudo" when using
"/sudo:" which is breaking helm. (It was working fine like this in
precedent emacs versions since 2 years now providing also host completion)

Is raising an error like this really useful ?

Thanks.

--

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 
Marc Girod | 19 Mar 2013 12:50
Picon

emacs hanging occasionally after tramp/scp invocation

Hello,

I am running tramp 2.2.3-24.1 over GNU emacs 24.2.1 on Cygwin.
I connect to a GNU linux 2.6.32.59-0.7 x86_64 host.
My local ssh client is:
OpenSSH_6.1p1, OpenSSL 1.0.1e 11 Feb 2013

The remote ssh is:
Remote protocol version 2.0, remote software version OpenSSH_5.2

The connection is between Ireland and Sweden, so there is a
significant latency (46ms).

Occasionally (maybe once a month), my emacs will hang.
I am left on Cygwin with a suspicious entry in the ps output:

     7280    6528    7280       7652  ?       654351 11:28:09
/usr/bin/chown <defunct>

6528 is /usr/bin/emacs-X11

What should I suspect?
Could there be a missing waitpid?
There may be an error condition on the remote side (automounter,
firewall, ...), but shouldn't the client survive it?

Thanks,
Marc
Michael Albinus | 15 Mar 2013 14:41
Picon
Picon
Gravatar

Tramp 2.2.7

The following message is a courtesy copy of an article
that has been posted to gnu.emacs.sources as well.

Hello,

The Tramp team is happy to announce the release of Tramp 2.2.7.

Tramp is a remote file editing package for Emacs and XEmacs.  Tramp uses
different methods like ssh or scp to access files on remote hosts as if
they were local files.  Access to the remote file system for editing
files, version control, directory editing and running processes on the
remote host are transparently enabled.

This release supports access to Android devices via the Android Debug
Bridge.  Read the manual for the new connection method "adb".

The connection methods "plink1", "ssh1", "ssh2", "scp1", "scp2", "scpc"
and "rsyncc" have been removed from Tramp.  The ssh option
"ControlMaster=auto" is set automatically in all ssh-based methods, when
possible.

Tramp 2.2.7 supports Emacs since version 22 and XEmacs since version
21.4.  It is merged into the Emacs 24 repository as well as into the
XEmacs package repository.

The download files are located at ftp://ftp.gnu.org/gnu/tramp/

Tramp's homepage is http://www.gnu.org/software/tramp/ (for Emacs) or
http://www.gnu.org/software/tramp/tramp-xemacs.html (for XEmacs),
respectively.
(Continue reading)

Stéphane Sénési | 13 Mar 2013 07:11
Picon
Favicon

tramp-send-string doens't send end-of-line ?

Dear all, and Michael

I tried the method described in the doc under "remote shell setup 
hints", namely :
>            (defconst my-tramp-prompt-regexp
>              (concat (regexp-opt '("Enter the birth date of your mother:") t)
>                      "\\s-*")
>              "Regular expression matching my login prompt question.")
>
>            (defun my-tramp-action (proc vec)
>              "Enter \"19000101\" in order to give a correct answer."
>              (save-window-excursion
>                (with-current-buffer (tramp-get-connection-buffer vec)
>                  (tramp-message vec 6 "\n%s" (buffer-string))
>                  (tramp-send-string vec "19000101"))))
>
>            (add-to-list 'tramp-actions-before-shell
>                         '(my-tramp-prompt-regexp my-tramp-action))
with only few changes.

 From what appears in my tramp debug buffer (with verbosity level 6), it 
looks like there is no "end-of-line" character sent by 
tramp-send-string. I tried to add one in the argument to 
tramp-send-string, namely writing :
     (tramp-send-string vec "abcd\n" )
or even,
     (tramp-send-string vec "abcd\nefgh\n" )
In that last case, the tramp-buffer will show :
     abcdefgh

(Continue reading)

Michael Albinus | 22 Feb 2013 15:13
Picon
Picon
Gravatar

Re: tramp (2.2.7-pre); Tramp incorrectly works with multibyte strings

Sergey Pashinin <sergey <at> pashinin.com> writes:

[Cc tramp-devel <at> gnu.org, for the archives]

Hi Sergey,

> Both of dirs have this bug:
> 1 - with:
>     "Шерлок.Sherlock" folder
> 2 - with:
>     Никола Тесла - Властелин мира 2007
>     париж.avi
>     Страны
>
> Do not know if you should create the same structure to reproduce a bug.
> And I wonder why only some files are incorryctly parsed.

I could reproduce the bug locally. Hopefully, it is fixed now; I've just
committed a patch to the repositories. Please check (and as I say to
everybody: the Tramp repository has moved to git).

Best regards, Michael.

_______________________________________________
Tramp-devel mailing list
Tramp-devel <at> gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel
Sergey Pashinin | 21 Feb 2013 18:42
Favicon
Gravatar

tramp (2.2.7-pre); Tramp incorrectly works with multibyte strings


When entering a dir (in dired mode) with cyrillic file names via tramp
it gives an error: "wrong type argument: integer-or-marker-p. nil"

It only appears when dired-omit mode is enabled.  But if you disable
it you are close to the root of the evil - you have another strange
bug which I asked here about:

http://stackoverflow.com/questions/14002123/emacs-diredtramp-wrong-filenames-with-utf8 (+ screenshots)

I think something is wrong in dealing with multibyte strings.

Tramp (or dired) incorrectly detects filename length for some files with russian symbols => can't work
with these files

Not sure but I think it's a tramp problem.

Emacs  : GNU Emacs 24.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.12)
 of 2012-09-22 on batsu, modified by Debian
Package: tramp (2.2.7-pre)

current state:
==============
(setq
 backup-by-copying nil
 backup-by-copying-when-linked nil
 backup-by-copying-when-mismatch t
 backup-by-copying-when-privileged-mismatch 200
 backup-directory-alist '(("." . "~/.emacs.backups"))
 file-name-handler-alist
(Continue reading)

Michael Albinus | 13 Feb 2013 11:31
Picon
Picon
Gravatar

Re: tramp (2.2.3-24.1); Using tramp to run ess-remote session. Submitting more than one line of code at a time, causes emacs to wait indefinitely.

Tobias Muhlhofer <tobias.muhlhofer <at> gmail.com> writes:

[Still Cc'ing tramp-devel <at> gnu.org. For the archives.]

> Michael:

Hi Tobias,

>> In order to reduce side effects, run your tests with
>>
>> emacs -Q -L /usr/share/emacs/site-lisp/ess -l ess-site

I'm using now 

# emacs24 -Q -L /usr/share/emacs24/site-lisp/ess -l ess-site

But this shouldn't make a difference. It is just to distinguish from the
Emacs development version, which is installed on my machine as well.

> Here's how I tested M-x R for remote machines.
>
> 1) Started emacs with 'emacs -Q -L /usr/share/emacs/site-lisp/ess -l
> ess-site', as specified.
> 2) In the *scratch* buffer that comes up, did M-x R, and selected a
> tramp path as the starting directory (/<username> <at> <server>:/<path>).
> 3) I was asked for my password in the minibuffer.
> 4) Emacs hung until I did C-g.

I have applied exactly the same scenario as you did. No problem at
all. Here are the versions I am using:
(Continue reading)

peng wu | 11 Feb 2013 09:14
Picon

problem getting files under SunOS (from cygwin)

From emacs under cygwin, remote OS being SunOS, problem opening files, several issues:

1. need time out longer than 60 seconds.  this slowness may be related to cygwin or the particular network situation.  Also wish tramp can ask the password immediately instead of waiting until the remote system responded with a request, because I often end up coming back to provide the password too late and have to do it again.  another wish is an option not to lock up the emacs completely while waiting the remote system to respond.

2. Before getting to the Terminal Type prompt, we have a "RETURN to continue" prompt that requires the user to hit the enter key.
In addition to adding a customer hook to detect the prompt and send the enter key, the tramp-send-string prove to be tricky because it would send nothing if "/n" is the string to be sent.  My work around is to send a space which is turned in to a space and a return key by tramp-send-string, and luckily the extra space does not hurt in this case.  tramp-send-stirng probably should send the "/n" if that is the thing to be sent.  A wish related to this is to have "just respond with a enter" prompts and action pre-defined, and the user only need to customize the prompt regexps.  Another wish might be presenting the user where things are stopped and send the user reresponse to the remote system.

3. keeps getting error saying no response from "test -e /", and my work around is to override a defun from tramp-sh:
 
;; overriding the following from tramp-sh, tramp 2.2.3-24.1:
;; add catching error thrown by tramp-send-command-and-check:
;; wrapping the calls in condition case.  Could be fixed by adding
;; an option to tramp-send-command-and-check as to what to return on error.
(defun tramp-find-file-exists-command (vec)
  "Find a command on the remote host for checking if a file exists.
Here, we are looking for a command which has zero exit status if the
file exists and nonzero exit status otherwise."
  (let ((existing "/")
        (nonexistent
  (tramp-shell-quote-argument "/ this file does not exist "))
 result)
    ;; The algorithm is as follows: we try a list of several commands.
    ;; For each command, we first run `$cmd /' -- this should return
    ;; true, as the root directory always exists.  And then we run
    ;; `$cmd /this\ file\ does\ not\ exist ', hoping that the file indeed
    ;; does not exist.  This should return false.  We use the first
    ;; command we find that seems to work.
    ;; The list of commands to try is as follows:
    ;; `ls -d'            This works on most systems, but NetBSD 1.4
    ;;                    has a bug: `ls' always returns zero exit
    ;;                    status, even for files which don't exist.
    ;; `test -e'          Some Bourne shells have a `test' builtin
    ;;                    which does not know the `-e' option.
    ;; `/bin/test -e'     For those, the `test' binary on disk normally
    ;;                    provides the option.  Alas, the binary
    ;;                    is sometimes `/bin/test' and sometimes it's
    ;;                    `/usr/bin/test'.
    ;; `/usr/bin/test -e' In case `/bin/test' does not exist.
    (unless (or
             (and (setq result (format "%s -e" (tramp-get-test-command vec)))
    (condition-case nil
        (tramp-send-command-and-check
         vec (format "%s %s" result existing))
      (error nil))
    (condition-case nil
        (not (tramp-send-command-and-check
       vec (format "%s %s" result nonexistent)))
      (error nil)))
             (and (setq result "/bin/test -e")
    (condition-case nil
        (tramp-send-command-and-check
         vec (format "%s %s" result existing))
      (error nil))
    (condition-case nil
        (not (tramp-send-command-and-check
       vec (format "%s %s" result nonexistent)))
      (error nil)))
             (and (setq result "/usr/bin/test -e")
    (condition-case nil
        (tramp-send-command-and-check
         vec (format "%s %s" result existing))
      (error nil))
    (condition-case nil
        (not (tramp-send-command-and-check
       vec (format "%s %s" result nonexistent)))
      (error nil)))
             (and (setq result (format "%s -d" (tramp-get-ls-command vec)))
    (condition-case nil
        (tramp-send-command-and-check
         vec (format "%s %s" result existing))
      (error nil))
    (condition-case nil
        (not (tramp-send-command-and-check
       vec (format "%s %s" result nonexistent)))
      (error nil))))
      (tramp-error
       vec 'file-error "Couldn't find command to check if file exists"))
    (tramp-message vec 10 "%s" result)
    result))

_______________________________________________
Tramp-devel mailing list
Tramp-devel <at> gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel

Gmane