tramp not working linux, quotation marks

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

tramp not working linux, quotation marks

Neal Becker
For some time now, tramp is not working reliably on linux (fedora 26).  
Frequently (not always) when using dired through tramp, file names are
erroneously displayed surrounded by quotation marks.  Then operations on
those files fail.

Possibly the quotes appear when items in the directory contain characters
special to the shell?


Reply | Threaded
Open this post in threaded view
|

Re: tramp not working linux, quotation marks

Michael Albinus
Neal Becker <[hidden email]> writes:

Hi Neal,

> For some time now, tramp is not working reliably on linux (fedora 26).  
> Frequently (not always) when using dired through tramp, file names are
> erroneously displayed surrounded by quotation marks.  Then operations on
> those files fail.

Which Emacs/Tramp version are you using?

Please set tramp-verbose to 10, and rerun your test, starting with
"emacs -Q". Show the resulting Tramp debug buffer. Describe also the
steps you have applied in order to run into the error (most important,
which file names show the problem).

I believe it is better to follow this issue either as Emacs bug, or on
the Tramp mailing list. If possible, pls swith.

Best regards, Michael.

Reply | Threaded
Open this post in threaded view
|

Re: tramp not working linux, quotation marks

Neal Becker
Michael Albinus wrote:

> Neal Becker <[hidden email]> writes:
>
> Hi Neal,
>
>> For some time now, tramp is not working reliably on linux (fedora 26).
>> Frequently (not always) when using dired through tramp, file names are
>> erroneously displayed surrounded by quotation marks.  Then operations on
>> those files fail.
>
> Which Emacs/Tramp version are you using?
>
> Please set tramp-verbose to 10, and rerun your test, starting with
> "emacs -Q". Show the resulting Tramp debug buffer. Describe also the
> steps you have applied in order to run into the error (most important,
> which file names show the problem).
>
> I believe it is better to follow this issue either as Emacs bug, or on
> the Tramp mailing list. If possible, pls swith.
>
> Best regards, Michael.

OK.  One thing I can tell you right away is filenames with spaces show this.  
This is emacs 25.3.1 (and whatever tramp comes with it)


Reply | Threaded
Open this post in threaded view
|

Re: tramp not working linux, quotation marks

Bastian Beischer-2
Hey Neal and Michael

recent versions of "ls" from GNU coreutils have introduced quotes for
certain filenames (those with spaces, but also others). The "ls" shipped
with Fedora 26 should be recent enough I think, so it could be the issue.

Could you check if running 'ls -l' in the same directory produces the same
quotes? And if yes, "ls -l --literal" should remove them. I think tramp is
using ls for directory listings as well, isn't it? If yes, I guess there is
a configurable variable somewhere, to which you can append '--literal' for
the ls flags used by tramp.

Cheers
Bastian

On Sun, Sep 24, 2017 at 2:14 PM, Neal Becker <[hidden email]> wrote:

> Michael Albinus wrote:
>
> > Neal Becker <[hidden email]> writes:
> >
> > Hi Neal,
> >
> >> For some time now, tramp is not working reliably on linux (fedora 26).
> >> Frequently (not always) when using dired through tramp, file names are
> >> erroneously displayed surrounded by quotation marks.  Then operations on
> >> those files fail.
> >
> > Which Emacs/Tramp version are you using?
> >
> > Please set tramp-verbose to 10, and rerun your test, starting with
> > "emacs -Q". Show the resulting Tramp debug buffer. Describe also the
> > steps you have applied in order to run into the error (most important,
> > which file names show the problem).
> >
> > I believe it is better to follow this issue either as Emacs bug, or on
> > the Tramp mailing list. If possible, pls swith.
> >
> > Best regards, Michael.
>
> OK.  One thing I can tell you right away is filenames with spaces show
> this.
> This is emacs 25.3.1 (and whatever tramp comes with it)
>
>
>


--
Bastian Beischer
RWTH Aachen University of Technology

@RWTH Aachen
Office: 28 C 203
Phone: +49-241-80-27205
E-mail: [hidden email]
Address: I. Physikalisches Institut B, Sommerfeldstr. 14, D-52074 Aachen

@CERN
Office: Bdg 32-4-B12
Phone: +41-22-76-75750
E-mail: [hidden email]
Address: CERN, CH-1211 Geneve 23
Reply | Threaded
Open this post in threaded view
|

Re: tramp not working linux, quotation marks

Tomas Zerolo
In reply to this post by Neal Becker
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, Sep 24, 2017 at 08:14:02AM -0400, Neal Becker wrote:

[...]

> OK.  One thing I can tell you right away is filenames with spaces show this.  
> This is emacs 25.3.1 (and whatever tramp comes with it)

Hm. It looks as if the ls on the other side had an option "--qouting-style="shell"
or something.

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlnHoyYACgkQBcgs9XrR2kYAaQCeOLWv+QVe1p/s8G2gcCRPkUeQ
IO8An3RWpUdbqB/jDpBuMgWar1PFXtjp
=9Ri7
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|

Re: tramp not working linux, quotation marks

Tomas Zerolo
In reply to this post by Bastian Beischer-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, Sep 24, 2017 at 02:20:13PM +0200, Bastian Beischer wrote:
> Hey Neal and Michael
>
> recent versions of "ls" from GNU coreutils have introduced quotes for
> certain filenames (those with spaces, but also others). The "ls" shipped
> with Fedora 26 should be recent enough I think, so it could be the issue.

Hm. Possible. Here's an extract of ls info:

  ‘--quoting-style=WORD’
       Use style WORD to quote file names and other strings that may
       contain arbitrary characters. [...]
 
       You can specify the default value of the ‘--quoting-style’ option
       with the environment variable ‘QUOTING_STYLE’.  If that environment
       variable is not set, the default value is ‘literal’, but this
       default may change to ‘shell’ in a future version of this package.

Although just changing the default doesn't seem a very friendly thing to
do.

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlnHpGMACgkQBcgs9XrR2kaPzACeLncWUd8YrXIdmUEAJ8VGq6EA
c6IAn2JT0mPypGGsKsz8ciRPd+1lYBhw
=M2NU
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|

Re: tramp not working linux, quotation marks

Neal Becker
[hidden email] wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Sun, Sep 24, 2017 at 02:20:13PM +0200, Bastian Beischer wrote:
>> Hey Neal and Michael
>>
>> recent versions of "ls" from GNU coreutils have introduced quotes for
>> certain filenames (those with spaces, but also others). The "ls" shipped
>> with Fedora 26 should be recent enough I think, so it could be the issue.
>
> Hm. Possible. Here's an extract of ls info:
>
>   ‘--quoting-style=WORD’
>        Use style WORD to quote file names and other strings that may
>        contain arbitrary characters. [...]
>  
>        You can specify the default value of the ‘--quoting-style’ option
>        with the environment variable ‘QUOTING_STYLE’.  If that environment
>        variable is not set, the default value is ‘literal’, but this
>        default may change to ‘shell’ in a future version of this package.
>
> Although just changing the default doesn't seem a very friendly thing to
> do.
>
> Cheers

Seems that
 '(dired-listing-switches "-al --literal")

fixes my issue, Thanks!


Reply | Threaded
Open this post in threaded view
|

Re: tramp not working linux, quotation marks

Michael Albinus
In reply to this post by Tomas Zerolo
<[hidden email]> writes:

>> This is emacs 25.3.1 (and whatever tramp comes with it)
>
> Hm. It looks as if the ls on the other side had an option
> "--qouting-style="shell"
> or something.

Tramp adds silently "--quoting-style=literal" to the switches in
`insert-directory', if the remote ls command supports this.

Starting with Tramp 2.3.1, so you have to wait for Emacs 26.1, or to
install recent Tramp 2.3.2.

Or apply the workaround as Neal has posted.

> Cheers
> -- tomás

Best regards, Michael.