unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* tramp question
@ 2003-12-10 22:46 Michael W. Daniels
       [not found] ` <nq8yljn3sw.fsf@alcatel.de>
  2003-12-16 23:56 ` Kai Grossjohann
  0 siblings, 2 replies; 12+ messages in thread
From: Michael W. Daniels @ 2003-12-10 22:46 UTC (permalink / raw)


Does anyone know how to use tramp when the remote username contains an @ 
sign?

Trying

/my@name@site.com:/path/to/file.txt

doesn't work -- it says that the above is not a tramp filename.

(I regrettably have no control over my remote username.)

-- 
Michael W. Daniels        | Choreography is its own reward.
daniels@ling.osu.edu      | Some things are done only for the sake
Doctoral Candidate        | of form. Don't fight it by looking for
Department of Linguistics | substance in everything.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: tramp question
       [not found] ` <nq8yljn3sw.fsf@alcatel.de>
@ 2003-12-14  2:15   ` Michael W. Daniels
  0 siblings, 0 replies; 12+ messages in thread
From: Michael W. Daniels @ 2003-12-14  2:15 UTC (permalink / raw)


Michael Albinus <Michael.Albinus@alcatel.de> wrote in
news:nq8yljn3sw.fsf@alcatel.de: 

> You can try to customize `tramp-user-regexp' and
> `tramp-postfix-user-format'. Nobody has tested yet, so your report
> would be welcome.

I ended up customizing the "Tramp File Name Structure" regexp to 

^/\(\([a-zA-Z_0-9-]+\):\)?\(\([^:/ 	]*\)@\)?\([a-zA-Z0-9_.#-]*\):\(.
*$\)

(The difference is that the first @ sign in the regexp (inside the [^ 
...]) was deleted.)

So far, this seems to have worked.

-- 
Michael W. Daniels        | Choreography is its own reward.
daniels@ling.osu.edu      | Some things are done only for the sake
Doctoral Candidate        | of form. Don't fight it by looking for
Department of Linguistics | substance in everything.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: tramp question
  2003-12-10 22:46 tramp question Michael W. Daniels
       [not found] ` <nq8yljn3sw.fsf@alcatel.de>
@ 2003-12-16 23:56 ` Kai Grossjohann
  2003-12-17  0:42   ` Thomas F. Burdick
  1 sibling, 1 reply; 12+ messages in thread
From: Kai Grossjohann @ 2003-12-16 23:56 UTC (permalink / raw)


"Michael W. Daniels" <daniels@ling.ohio-state.edu> writes:

> Does anyone know how to use tramp when the remote username contains an @ 
> sign?

Maybe Tramp could provide an HTML-like feature where &at; (cf. HTML)
or %40 (cf. URL) could be typed instead of the @ sign in the user
name.

What do people think?

Kai

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: tramp question
  2003-12-16 23:56 ` Kai Grossjohann
@ 2003-12-17  0:42   ` Thomas F. Burdick
  2003-12-17 21:05     ` Kai Grossjohann
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas F. Burdick @ 2003-12-17  0:42 UTC (permalink / raw)


Kai Grossjohann <kai@emptydomain.de> writes:

> "Michael W. Daniels" <daniels@ling.ohio-state.edu> writes:
> 
> > Does anyone know how to use tramp when the remote username contains an @ 
> > sign?
> 
> Maybe Tramp could provide an HTML-like feature where &at; (cf. HTML)
> or %40 (cf. URL) could be typed instead of the @ sign in the user
> name.
> 
> What do people think?

Why not go with the simpler, familar scheme using backslashes, where
"\x" makes x have no special significance, and "\\" denotes ?\ .
  
-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: tramp question
  2003-12-17  0:42   ` Thomas F. Burdick
@ 2003-12-17 21:05     ` Kai Grossjohann
  0 siblings, 0 replies; 12+ messages in thread
From: Kai Grossjohann @ 2003-12-17 21:05 UTC (permalink / raw)


tfb@famine.OCF.Berkeley.EDU (Thomas F. Burdick) writes:

> Why not go with the simpler, familar scheme using backslashes, where
> "\x" makes x have no special significance, and "\\" denotes ?\ .

That's an idea.  I didn't think of this because in general the aim
appears to be to move to a URL-like notation for file names.  Hm.
Also, Emacs on Windows uses both / and \ as a directory separator.  So
it might get confused.

Kai

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Tramp question
@ 2010-10-19 14:13 Andrea Crotti
  2010-10-19 15:49 ` Michael Albinus
  0 siblings, 1 reply; 12+ messages in thread
From: Andrea Crotti @ 2010-10-19 14:13 UTC (permalink / raw)
  To: help-gnu-emacs

Supposing that I'm working with tramp via ssh on a virtual machine.

If for example I do
--8<---------------cut here---------------start------------->8---
M-! RET git ls-files
--8<---------------cut here---------------end--------------->8---
everything works fine and I get the remote result, but with

--8<---------------cut here---------------start------------->8---
M-: RET (shell-command-to-string "git ls-files")
--8<---------------cut here---------------end--------------->8---
it doesn't work on the remote machine.

I think that's more or less also why something works in tramp and
something doesn't (gtags-mode for example).




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Tramp question
  2010-10-19 14:13 Tramp question Andrea Crotti
@ 2010-10-19 15:49 ` Michael Albinus
  2010-10-20  9:08   ` Andrea Crotti
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Albinus @ 2010-10-19 15:49 UTC (permalink / raw)
  To: Andrea Crotti; +Cc: help-gnu-emacs

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> --8<---------------cut here---------------start------------->8---
> M-: RET (shell-command-to-string "git ls-files")
> --8<---------------cut here---------------end--------------->8---
> it doesn't work on the remote machine.

`shell-command-to-string' uses internally `call-process', which does not
support processes on remote hosts. Replacing this call by `process-file'
seems to DTRT. You might write a bug report.

> I think that's more or less also why something works in tramp and
> something doesn't (gtags-mode for example).

I do not know, whether it is always intended to run `shell-command-to-string'
on the remote host. Must be checked, before it is changed.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Tramp question
  2010-10-19 15:49 ` Michael Albinus
@ 2010-10-20  9:08   ` Andrea Crotti
  2010-10-20 13:44     ` Michael Albinus
       [not found]     ` <mailman.0.1287582252.26344.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 12+ messages in thread
From: Andrea Crotti @ 2010-10-20  9:08 UTC (permalink / raw)
  To: help-gnu-emacs

Michael Albinus <michael.albinus@gmx.de> writes:
> I do not know, whether it is always intended to run `shell-command-to-string'
> on the remote host. Must be checked, before it is changed.
>
> Best regards, Michael.

Well maybe since "shell-command-to-string" is used non interactively it
doesn't make sense for it to be so smart, since I should know what I'm
doing.

Might it be this the reason of this difference?




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Tramp question
  2010-10-20  9:08   ` Andrea Crotti
@ 2010-10-20 13:44     ` Michael Albinus
  2010-10-20 18:59       ` Andrea Crotti
       [not found]     ` <mailman.0.1287582252.26344.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 12+ messages in thread
From: Michael Albinus @ 2010-10-20 13:44 UTC (permalink / raw)
  To: Andrea Crotti; +Cc: help-gnu-emacs

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> Well maybe since "shell-command-to-string" is used non interactively it
> doesn't make sense for it to be so smart, since I should know what I'm
> doing.
>
> Might it be this the reason of this difference?

No, I don't believe that's the reason.

Anyway, I've checked the Emacs tree, and there are several dozen places
where `shell-command-to-string' is called. I fear we cannot simply
redefine its behaviour.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Tramp question
       [not found]     ` <mailman.0.1287582252.26344.help-gnu-emacs@gnu.org>
@ 2010-10-20 16:43       ` Stefan Monnier
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2010-10-20 16:43 UTC (permalink / raw)
  To: help-gnu-emacs

>> Well maybe since "shell-command-to-string" is used non interactively it
>> doesn't make sense for it to be so smart, since I should know what I'm
>> doing.
>> Might it be this the reason of this difference?
> No, I don't believe that's the reason.
> Anyway, I've checked the Emacs tree, and there are several dozen places
> where `shell-command-to-string' is called. I fear we cannot simply
> redefine its behaviour.

FWIW, shell-command obeys file-name-handlers-alist (but uses
call-process rather than process-file).  So it looks like this area
needs a clean up.


        Stefan


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Tramp question
  2010-10-20 13:44     ` Michael Albinus
@ 2010-10-20 18:59       ` Andrea Crotti
  2010-10-21  3:04         ` Michael Albinus
  0 siblings, 1 reply; 12+ messages in thread
From: Andrea Crotti @ 2010-10-20 18:59 UTC (permalink / raw)
  To: help-gnu-emacs

Michael Albinus <michael.albinus@gmx.de> writes:
> No, I don't believe that's the reason.
>
> Anyway, I've checked the Emacs tree, and there are several dozen places
> where `shell-command-to-string' is called. I fear we cannot simply
> redefine its behaviour.
>
> Best regards, Michael.

Well no I didn't want to change everything, maybe sometimes it doesn't
make sense, even if I can't come up with an example now...
I just realized it when I tried to use "gtags-find-tag" and I saw it
didn't work...




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Tramp question
  2010-10-20 18:59       ` Andrea Crotti
@ 2010-10-21  3:04         ` Michael Albinus
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Albinus @ 2010-10-21  3:04 UTC (permalink / raw)
  To: Andrea Crotti; +Cc: help-gnu-emacs

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> Well no I didn't want to change everything, maybe sometimes it doesn't
> make sense, even if I can't come up with an example now...
> I just realized it when I tried to use "gtags-find-tag" and I saw it
> didn't work...

Then you might trigger the maintainers of gtags.el to change the call of
`shell-command-to-string' in their code.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-10-21  3:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-10 22:46 tramp question Michael W. Daniels
     [not found] ` <nq8yljn3sw.fsf@alcatel.de>
2003-12-14  2:15   ` Michael W. Daniels
2003-12-16 23:56 ` Kai Grossjohann
2003-12-17  0:42   ` Thomas F. Burdick
2003-12-17 21:05     ` Kai Grossjohann
  -- strict thread matches above, loose matches on Subject: below --
2010-10-19 14:13 Tramp question Andrea Crotti
2010-10-19 15:49 ` Michael Albinus
2010-10-20  9:08   ` Andrea Crotti
2010-10-20 13:44     ` Michael Albinus
2010-10-20 18:59       ` Andrea Crotti
2010-10-21  3:04         ` Michael Albinus
     [not found]     ` <mailman.0.1287582252.26344.help-gnu-emacs@gnu.org>
2010-10-20 16:43       ` Stefan Monnier

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