unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Quoting parts or a remote file name
@ 2016-11-30 14:23 Michael Albinus
  2016-11-30 14:40 ` Nicolas Petton
  2016-11-30 15:38 ` Quoting parts or " Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: Michael Albinus @ 2016-11-30 14:23 UTC (permalink / raw)
  To: emacs-devel

Hi,

in bug#16984 it was discussed, how to suppress expansion of "~" in file
names like "/path/~/file". One possible solution is to quote the file
name, like "/:/path/~/file".

This has the disadvantage, that remote file names are not handled
properly, like "/:/ssh:user@host:/path/~/file". I made the proposal to
apply the file name quoting to the local name of remote files instead,
like "/ssh:user@host:/:/path/~/file". There was no reaction.

What do people think? Is this something we could do?

Thanks, and best regards, Michael.



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

* Re: Quoting parts or a remote file name
  2016-11-30 14:23 Quoting parts or a remote file name Michael Albinus
@ 2016-11-30 14:40 ` Nicolas Petton
  2016-11-30 15:01   ` Quoting parts of " Michael Albinus
  2016-11-30 15:38 ` Quoting parts or " Eli Zaretskii
  1 sibling, 1 reply; 9+ messages in thread
From: Nicolas Petton @ 2016-11-30 14:40 UTC (permalink / raw)
  To: Michael Albinus, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 845 bytes --]

Michael Albinus <michael.albinus@gmx.de> writes:

> Hi,

Hi Michael,

> in bug#16984 it was discussed, how to suppress expansion of "~" in file
> names like "/path/~/file". One possible solution is to quote the file
> name, like "/:/path/~/file".
>
> This has the disadvantage, that remote file names are not handled
> properly, like "/:/ssh:user@host:/path/~/file". I made the proposal to
> apply the file name quoting to the local name of remote files instead,
> like "/ssh:user@host:/:/path/~/file". There was no reaction.
>
> What do people think? Is this something we could do?

I had a look at the discussion about bug#16984, and I think your
proposal makes sense.

I'm wondering, why don't we have an escape character for this, for
instance:

  /ssh:user@host:/path/\~/file

Although using backslash is probably a bad idea.

Cheers,
Nico

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

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

* Re: Quoting parts of a remote file name
  2016-11-30 14:40 ` Nicolas Petton
@ 2016-11-30 15:01   ` Michael Albinus
  2016-11-30 16:33     ` Nicolas Petton
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2016-11-30 15:01 UTC (permalink / raw)
  To: Nicolas Petton; +Cc: emacs-devel

Nicolas Petton <nicolas@petton.fr> writes:

> Hi Michael,

Hi Nicolas,

> I'm wondering, why don't we have an escape character for this, for
> instance:
>
>   /ssh:user@host:/path/\~/file
>
> Although using backslash is probably a bad idea.

Indeed. A backslash is a directory separator for MS Windows file names.

> Cheers,
> Nico

Best regards, Michael.



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

* Re: Quoting parts or a remote file name
  2016-11-30 14:23 Quoting parts or a remote file name Michael Albinus
  2016-11-30 14:40 ` Nicolas Petton
@ 2016-11-30 15:38 ` Eli Zaretskii
  2016-11-30 16:44   ` Quoting parts of " Michael Albinus
  2016-12-04 11:15   ` Quoting parts or " Michael Albinus
  1 sibling, 2 replies; 9+ messages in thread
From: Eli Zaretskii @ 2016-11-30 15:38 UTC (permalink / raw)
  To: Michael Albinus; +Cc: emacs-devel

> From: Michael Albinus <michael.albinus@gmx.de>
> Date: Wed, 30 Nov 2016 15:23:31 +0100
> 
> in bug#16984 it was discussed, how to suppress expansion of "~" in file
> names like "/path/~/file". One possible solution is to quote the file
> name, like "/:/path/~/file".
> 
> This has the disadvantage, that remote file names are not handled
> properly, like "/:/ssh:user@host:/path/~/file". I made the proposal to
> apply the file name quoting to the local name of remote files instead,
> like "/ssh:user@host:/:/path/~/file". There was no reaction.
> 
> What do people think? Is this something we could do?

I have no objections to your proposal, but I'm not much of an expert
in this area.  I trust that you have run the relevant tests from the
test suite with such names, and they don't raise any problems?



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

* Re: Quoting parts of a remote file name
  2016-11-30 15:01   ` Quoting parts of " Michael Albinus
@ 2016-11-30 16:33     ` Nicolas Petton
  2016-11-30 16:48       ` Michael Albinus
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Petton @ 2016-11-30 16:33 UTC (permalink / raw)
  To: Michael Albinus; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 401 bytes --]

Michael Albinus <michael.albinus@gmx.de> writes:

>> I'm wondering, why don't we have an escape character for this, for
>> instance:
>>
>>   /ssh:user@host:/path/\~/file
>>
>> Although using backslash is probably a bad idea.
>
> Indeed. A backslash is a directory separator for MS Windows file
> names.

Indeed, but we could use another character.  Wouldn't that be easier for
the user?

Cheers,
Nico

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

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

* Re: Quoting parts of a remote file name
  2016-11-30 15:38 ` Quoting parts or " Eli Zaretskii
@ 2016-11-30 16:44   ` Michael Albinus
  2016-12-04 11:15   ` Quoting parts or " Michael Albinus
  1 sibling, 0 replies; 9+ messages in thread
From: Michael Albinus @ 2016-11-30 16:44 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

Hi Eli,

> I have no objections to your proposal, but I'm not much of an expert
> in this area.  I trust that you have run the relevant tests from the
> test suite with such names, and they don't raise any problems?

I haven't implemented anything yet, first I want to know whether this is
acceptable.

And of course, there will be respective test cases once I commit a
patch.

Best regards, Michael.



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

* Re: Quoting parts of a remote file name
  2016-11-30 16:33     ` Nicolas Petton
@ 2016-11-30 16:48       ` Michael Albinus
  2016-11-30 17:15         ` Nicolas Petton
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2016-11-30 16:48 UTC (permalink / raw)
  To: Nicolas Petton; +Cc: emacs-devel

Nicolas Petton <nicolas@petton.fr> writes:

> Indeed, but we could use another character.  Wouldn't that be easier for
> the user?

The "/:" syntax exist for a long time, since Emacs 20.4. See etc/NEWS.20.

> Cheers,
> Nico

Best regards, Michael.



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

* Re: Quoting parts of a remote file name
  2016-11-30 16:48       ` Michael Albinus
@ 2016-11-30 17:15         ` Nicolas Petton
  0 siblings, 0 replies; 9+ messages in thread
From: Nicolas Petton @ 2016-11-30 17:15 UTC (permalink / raw)
  To: Michael Albinus; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 208 bytes --]

Michael Albinus <michael.albinus@gmx.de> writes:

> The "/:" syntax exist for a long time, since Emacs 20.4. See
> etc/NEWS.20.

You're right.  Then I think the syntax you're proposing is good.

Cheers,
Nico

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

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

* Re: Quoting parts or a remote file name
  2016-11-30 15:38 ` Quoting parts or " Eli Zaretskii
  2016-11-30 16:44   ` Quoting parts of " Michael Albinus
@ 2016-12-04 11:15   ` Michael Albinus
  1 sibling, 0 replies; 9+ messages in thread
From: Michael Albinus @ 2016-12-04 11:15 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> in bug#16984 it was discussed, how to suppress expansion of "~" in file
>> names like "/path/~/file". One possible solution is to quote the file
>> name, like "/:/path/~/file".
>> 
>> This has the disadvantage, that remote file names are not handled
>> properly, like "/:/ssh:user@host:/path/~/file". I made the proposal to
>> apply the file name quoting to the local name of remote files instead,
>> like "/ssh:user@host:/:/path/~/file". There was no reaction.
>> 
>> What do people think? Is this something we could do?
>
> I have no objections to your proposal, but I'm not much of an expert
> in this area.  I trust that you have run the relevant tests from the
> test suite with such names, and they don't raise any problems?

I've implemented this now, patch pushed to master. Most of the test
cases in tramp-tests have been extended accordingly.

Best regards, Michael.



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

end of thread, other threads:[~2016-12-04 11:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-30 14:23 Quoting parts or a remote file name Michael Albinus
2016-11-30 14:40 ` Nicolas Petton
2016-11-30 15:01   ` Quoting parts of " Michael Albinus
2016-11-30 16:33     ` Nicolas Petton
2016-11-30 16:48       ` Michael Albinus
2016-11-30 17:15         ` Nicolas Petton
2016-11-30 15:38 ` Quoting parts or " Eli Zaretskii
2016-11-30 16:44   ` Quoting parts of " Michael Albinus
2016-12-04 11:15   ` Quoting parts or " Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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