[pot@gnu.org: Re: TRAMP2 path definitions.]

2001-03-14 Thread Francesco Potorti`

Well, I tried to write a message for the Emacs developers and pretesters
lists, but could not manage to  write anything that would make sense.  I
suspect that we (ar at least it's  me) do not have ideas clear enough to
be explained outside of here.

In fact,  I do not manage  to make a resume  of our discussion  in a way
that is generally significant.  Sorry.




Re: TRAMP2 path definitions.

2001-03-14 Thread Daniel Pittman

On Tue, 13 Mar 2001, Pete Forman wrote:
 Daniel Pittman writes:
   As such, I want to propose an alternate tag to indicate our own
   paths:
   
  "/!/"

[...]

 I agree with you but would like to take it further.  How about
 reworking the whole syntax along these lines.
 
 /![@enc]/:telnet://[usr[:pwd]@]host1[:port]/ssh://host2/:/path/to/file
 ^^ ^^^  ^^^ ^^   ^ ^   ^^^ ^^
  A B C   F  HG   I DF   E
 
 A tramp-prefix-tramp-name   "/!" or "/tramp" or "/:" or "/"
 B tramp-prefix-encoding "@" or ":" or "/[^:]"
 C tramp-prefix-first-connection "/:"
 D tramp-prefix-next-connection  "/[^/:]" or "[^/]/[^/:]" or "/[^:]"
 E tramp-prefix-remote-pathname  same as C
 F tramp-prefix-authority"//:" or "#"
 G, H, I, etc. are specific to schemes
 
 C, D, and E are mutually constrained to match at the start.  Having F
 set to "#" makes parsing easier for them.  I suggested "//:" for F to
 match the syntax of URIs; see RFC 2396 and 1738.

The syntax is clean enough, I guess.[1]  I don't see any technical
reason it couldn't be used.

A couple of points, though:

'//' causes problems with the default XEmacs behaviour[2] that typing
'//' in a path elides it up to the second '/' and makes it an absolute
path.

It also conflicts with anything that emulates `substitute-in-file-name'
without calling our handler. That /shouldn't/ happen, I think, but it's
a risk.


Secondly, I am very opposed to including passwords in the path. It's
very easy for someone to C-x C-f UP UP and see the password that way.

It's considerably harder for someone to strings(1) a running process or
core-dump Emacs without your noticing.

Not giving end users a loaded gun is, in my opinion, a nice thing to do.
Passwords in the path, the history, the kill ring, the X system
clipboard[3] and so on, make for an easy way to leak a password.

 There would be no "@encoding" clause for an out-of-band method.  For
 in-band, encoding would be "base64" or "uuencode".  We may want to add
 other encodings later such as "quoted-printable".

I have been thinking on this for the last day or so. It's amazing what
you can achieve when you don't spend all your effort writing code.

I think that the idea of 'encodings' is not quite what is really wanted
for tramp. scp(1) isn't a way of connecting to a remote host, it's a way
of transferring data. So is base64 to mimencode(1).

So, it your scheme, I think that scp /would/ fit into the first bit,
like base64.

 The encoding might also be specified as "b64" or "uu" or "b" or "u".
 The protocols could also accept long and short forms, e.g. "telnet",
 "tn" and "t" would be equivalent.

Of course. If it's not easy, it's not worth it. :)

Daniel


Footnotes: 
[1]  I think this is my natural hubris emerging. I like my idea better
 because, um, because I /do/. :) [4]

[2]  I think it's the default. It's been so many years since I used a
 default XEmacs...  *testing*  Ah, yes. It is default.

[3]  Recent XEmacs versions put the top of kill in there by default.
 /I/ think this is a silly idea, but who am I to argue...

[4]  In other words, I don't see any real /technical/ argument against
 your idea. It just feels... different. Maybe not even wrong.

-- 
Reality is not as strong as perception. Perception all too often swallows
reality and spits it out in a new, unrecognizable form.
-- Maytee Aspuro




Re: TRAMP2 path definitions.

2001-03-14 Thread Daniel Pittman

On 13 Mar 2001, Stefan Monnier wrote:
 "Pete" == Pete Forman [EMAIL PROTECTED] writes:
 /![@enc]/:telnet://[usr[:pwd]@]host1[:port]/ssh://host2/:/path/to/file
 [...]
 F tramp-prefix-authority"//:" or "#"
 
 Clearly ""//:"" won't do since Emacs tends to interpret it directly. I
 liked the @enc thing, except that I'd use it for the
 file-name-coding-system rather than for the base64/uuencode.

Isn't C-u [1] C-x C-f what you want there, or is that just XEmacs?

It prompts me interactively for a coding system to visit with...

Daniel


Footnotes: 
[1]  universal argument

-- 
In the present-day reconstruction of physics, fragments of the Newtonian
concepts are stubbornly retained. The result is to reduce modern physics to a
sort of mystic chant over an unintelligible universe.
-- Alfred North Whitehead, _Modes of Thought_




Re: TRAMP2 path definitions.

2001-03-14 Thread Daniel Pittman

On Tue, 13 Mar 2001, Francesco Potorti` wrote:
 As such, I want to propose an alternate tag to indicate our own
 paths:
 
"/!/"
 
Seconded.
 
 I still do not like it at all. It's completely different from anything
 that is done out there. There is a quasi-standard for doing such
 things, which involves using /protocol:, and that's reasonable,
 widespread and people are accustomed to it. We do not want to
 introduce Yet Another Nice Convention.
 
 We should instead raise the problem on the internal Emacs developers
 lists, and then contact to Xemacs developers (or the other way around,
 if you care more about Xemacs), and try to find a real solution.

I think this is a good idea - but even if we succeed, supporting old
code is a burden.

If the EFS changes made it into the up-coming 21.4 release, it's going
to take a /long/ time for that to be common, let alone universal,
amongst XEmacs users.

Ditto the impending Emacs release, I imagine.

[...]

 I volunteer to raise the question on Emacs lists, if I am asked to.

Please do. It would be nice to see the issue addressed. I don't think it
solves the problems of TRAMP if there is a better way introduced,
though.

I need to submit a patch for `file-remote-p' to start moving towards
this better world, though. It's worth aiming for - just not a silver
bullet. :)

Daniel

-- 
Sweet desert rose
This memory of Eden haunts us all
This desert flower, this rare perfume
Is the sweet intoxication of the fall
-- Sting, _Desert Rose_




Re: TRAMP2 path definitions.

2001-03-14 Thread Daniel Pittman

On Tue, 13 Mar 2001, Edward J. Sabol wrote:
 I agree with Francesco. I don't like "/!/" at all. 

The prefix will be changeable, using custom, with no trouble at all. 

 First off, I have to use the shift key to type the exclamation point. 

So, pick something different. "/tramp/" is available. ;)

 Secondly, there's no mnemonic for it at all. 

Given Emacs isn't really about that, I am unconcerned. 

 "/tr:" was the best idea that's been mentioned. That will fix the DOS
 problem, though perhaps not the EFS problem, 

No. It's the `:' I want to avoid, specifically. I don't care if the
default is "/tr/" or "/this-is-a-/really/-silly-prefix/"

 but we've lived with that since the inception of tramp/rcp/rssh and I
 don't consider it a problem personally.

It's hard to support, requires hacking the innards of other packages and
introduces load-order dependencies in the packages.

This makes it less than pleasant to use, as the second bug report on the
new Debian package shows.

The poor user had not loaded the FTP access package first and then TRAMP
lost. :/

Daniel

-- 
A drug is neither moral nor immoral--it's a chemical compound. The compound
itself is not a menace to society until a human being treats it as if
consumption bestowed a temporary license to act like an asshole.
-- Frank Zappa




Re: TRAMP2 path definitions.

2001-03-14 Thread Daniel Pittman

On 13 Mar 2001, Stefan Monnier wrote:
 "Francesco" == Francesco Potorti` [EMAIL PROTECTED] writes:
 Emacs should have a general hook for /[^/]+:.* filenames, where [^/]+
 is the protocol. Then, different packages could register to that hook
 and tell it which protocol they do manage.
 
 I think using /protocol: is just fine, indeed. But I don't think it
 requires any changes to ange-ftp or EFS. All that matters is that
 ange-ftp or EFS have lower precedence, i.e. that they be loaded
 before, 

As I understand it, Emacs and XEmacs both agree that changes to the
overall system state are undesirable when you load a single package.

While an exemption is clearly made in the case of Ange-FTP, I don't
think that loading another remote access tool to work around our...
issues with it is right.

 which is already the case of ange-ftp (since it is preloaded). Being
 an Emacser I don't care much about EFS.

It's really not very different, to be frank. The hacks to work around it
are pretty much identical.

Daniel

-- 
Sanely applied advertising could remake the world.
-- Stuart Chase




Re: [pot@gnu.org: Re: TRAMP2 path definitions.]

2001-03-14 Thread Daniel Pittman

On Wed, 14 Mar 2001, Francesco Potorti` wrote:
 Well, I tried to write a message for the Emacs developers and
 pretesters lists, but could not manage to write anything that would
 make sense. 

I am happy to offer what help I can. I would like to see a good solution
to the issue forged.

 I suspect that we (ar at least it's me) do not have ideas clear enough
 to be explained outside of here.

Feel free to contact me off-list if you want to work through the whys
and wherefores of it.

 In fact, I do not manage to make a resume of our discussion in a way
 that is generally significant. Sorry.

Huh. You have been helpful to me, at least, in my thinking. You do not
give yourself enough credit.

Daniel

-- 
All that we see or seem is but a dream within a dream.
-- Edgar Allen Poe, _A Dream Within a Dream_




Re: TRAMP2 path definitions.

2001-03-14 Thread Edward J. Sabol

On 15-Mar-2001, Daniel Pittman wrote:
 On Tue, 13 Mar 2001, Edward J. Sabol wrote:
 I agree with Francesco. I don't like "/!/" at all. 
 The prefix will be changeable, using custom, with no trouble at all.

Yes, that's always been the case, but I strongly feel that the default should
be wisely chosen.

 First off, I have to use the shift key to type the exclamation point. 
 So, pick something different. "/tramp/" is available. ;)

Great, let's go with either "/tr/" or "/tramp/" then. I just think almost
anything would be better than an exclamation point.

 Secondly, there's no mnemonic for it at all. 
 Given Emacs isn't really about that, I am unconcerned. 

That's too bad. I think you should be.

 "/tr:" was the best idea that's been mentioned. That will fix the DOS
 problem, though perhaps not the EFS problem, 
 No. It's the `:' I want to avoid, specifically. I don't care if the
 default is "/tr/" or "/this-is-a-/really/-silly-prefix/"

I don't particularly have a problem with getting rid of the colon.

 but we've lived with that since the inception of tramp/rcp/rssh and I
 don't consider it a problem personally.
 It's hard to support, requires hacking the innards of other packages and
 introduces load-order dependencies in the packages.

Correct me if I'm wrong, but it's only a problem with EFS. However, I agree
that we should fix it, if we can.




check in by grossjoh: 'tramp/lisp tramp.el,2.9 ChangeLog,2.8'

2001-03-14 Thread Kai Grossjohann

Update of /services/emacs-rcp/cvsroot/tramp/lisp
In directory lucy:/export/home/grossjoh/work/kai/tramp-devel/tramp/lisp

Modified Files:
tramp.el ChangeLog 
Log Message:
(tramp-methods, tramp-telnet-args): New method
parameter `tramp-telnet-args'.
(tramp-get-telnet-args): New function.
(tramp-open-connection-telnet): Use it.




check in by grossjoh: 'tramp/texi .cvsignore,2.1'

2001-03-14 Thread Kai Grossjohann

Update of /services/emacs-rcp/cvsroot/tramp/texi
In directory lucy:/export/home/grossjoh/work/kai/tramp-devel/tramp/texi

Modified Files:
.cvsignore 
Log Message:
Ignore *.vrs.




Telnet connection with extra args

2001-03-14 Thread Kai Großjohann

I have now added the `tramp-telnet-args' method parameter, similar to
all the other foo-args method parameters.  However, I haven't tested
this.

Some of you wanted this.  I think Harry and Ted?  Could you please
test this version?  (New version in CVS, head branch, not stable.)

kai
-- 
Be indiscrete.  Do it continuously.




Re: TRAMP2 path definitions.

2001-03-14 Thread Daniel Pittman

On Wed, 14 Mar 2001, Edward J. Sabol wrote:
 On 15-Mar-2001, Daniel Pittman wrote:
 On Tue, 13 Mar 2001, Edward J. Sabol wrote:
 I agree with Francesco. I don't like "/!/" at all. 
 The prefix will be changeable, using custom, with no trouble at all.
 
 Yes, that's always been the case, but I strongly feel that the default
 should be wisely chosen.

Indeed. If I didn't agree with you[1], I wouldn't have asked.

[...]

 Secondly, there's no mnemonic for it at all. 
 Given Emacs isn't really about that, I am unconcerned. 
 
 That's too bad. I think you should be.

I don't, quite honestly, think that there is a real common convention
about addressing remote files, save the Unix standard (just like
anything else) and the Windows standard (\\server\share\file).

Neither of those is really mnemonic, nor the tramp/EFS/Ange-FTP method
of /host:path. It's a matter of what people are used to.

[...]

 but we've lived with that since the inception of tramp/rcp/rssh and
 I don't consider it a problem personally.
 It's hard to support, requires hacking the innards of other packages
 and introduces load-order dependencies in the packages.
 
 Correct me if I'm wrong, but it's only a problem with EFS. 

You are wrong. It's a problem with Ange-FTP and EFS equally. EFS seems
to be a little more willing to dig it's claws in about the issue, on
occasion, but they /both/ suffer the same issue.

Specifically, the FTP file access package assumes that `/[^/]:' paths
belong to them. This means that we need to chose from:

1. Change away from using paths that match that.
2. Force EFS or Ange-FTP to be loaded before TRAMP is.

I tend to talk about EFS more than Ange-FTP because I am an XEmacs user,
so it's the tool I fight with more often. It's not because Ange-FTP
doesn't suffer the same problems.

 However, I agree that we should fix it, if we can.

Yes.
Daniel


Footnotes: 
[1]  Well, at least /popularly/ chosen. :)

-- 
Men are afraid of virgins, but they have a cure for their own fear and
the virgin's virginity: fucking. Men are afraid of crones, so afraid of
them that their cure for virginity fails them; they know it won't work.
-- Ursula K. Le Guin




Re: TRAMP2 path definitions.

2001-03-14 Thread Daniel Pittman

On 14 Mar 2001, Kai Grojohann wrote:
 On Wed, 14 Mar 2001, Edward J. Sabol wrote:
 
 On 15-Mar-2001, Daniel Pittman wrote:

[...]

 It's hard to support, requires hacking the innards of other
 packages and introduces load-order dependencies in the packages.
 
 Correct me if I'm wrong, but it's only a problem with EFS. However,
 I agree that we should fix it, if we can.
 
 I think some packages look for `/foo:' at the beginning of a file name
 and then decide it's remote.  I think.  Hm.  Maybe VC does this.  Even
 in Emacs.

Yes. Despite `file-remote-p'[1] being available, many packages are
hard-coded to the knowledge of FTP-style paths.

 No matter what the Tramp filename format, I think these packages need
 to be changed, because
 
 (a) knowing that a file is remote does not necessarily tell you
 what you can do with it -- ange-ftp and Tramp offer different
 file operations.; and

Yes. Especially because, for example, VC will refuse to operate on a FTP
file path (because it can't), while TRAMP supports this.

[...]

 But of course EFS is really really really pushy.  It hooks itself into
 dired in many places (it has its own dired, in fact).  Quite
 annoying.  But I have spoken to the

True. I intend to take this up with the maintainers of it, eventually.
It's also true, though, of Ange-FTP.

Daniel

Footnotes: 
[1]  Which /isn't/ a file operation, dammit, but a hard-coded function
 that *knows* about EFS or Ange-FTP.[2]

[2]  My hack makes this a file operation (yay), in the hope that I can
 convince the XEmacs beta team about it...  and that someone can let
 me know how to get the same thing done with Emacs.

-- 
Reality is a collective hunch.
-- Jane Wagner