* Re: emacs-26 d2d5e54: Mention remote file name completion in Emacs manual
[not found] ` <20180203203125.63A2520690@vcs0.savannah.gnu.org>
@ 2018-02-04 8:45 ` Michael Albinus
2018-02-04 8:56 ` John Wiegley
2018-02-04 17:18 ` Eli Zaretskii
0 siblings, 2 replies; 10+ messages in thread
From: Michael Albinus @ 2018-02-04 8:45 UTC (permalink / raw)
To: emacs-devel; +Cc: Eli Zaretskii
eliz@gnu.org (Eli Zaretskii) writes:
Hi Eli,
> + When completing remote file names (@pxref{Remote Files}), a double
> +slash behaves slightly differently: it causes Emacs to ignore only the
> +file-name part, leaving the rest (method, host and username, etc.)
> +intact. Typing three slashes in a row ignores everything in remote
> +file names. @xref{File name completion,,, tramp, The Tramp Manual}.
There is one exception: If you type two slashes at the top of the local
part of a remote file name, it behaves like for local file names. That
means, "/ssh:host:// TAB" completes to "/".
I don't remember why we have done this, but for consistency reasons,
"/ssh:host:// TAB" should complete to "/ssh:host:/", and "/ssh:host:///
TAB" should complete to "/".
Opinions?
Best regards, Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs-26 d2d5e54: Mention remote file name completion in Emacs manual
2018-02-04 8:45 ` emacs-26 d2d5e54: Mention remote file name completion in Emacs manual Michael Albinus
@ 2018-02-04 8:56 ` John Wiegley
2018-02-04 9:08 ` Michael Albinus
2018-02-04 15:28 ` Clément Pit-Claudel
2018-02-04 17:18 ` Eli Zaretskii
1 sibling, 2 replies; 10+ messages in thread
From: John Wiegley @ 2018-02-04 8:56 UTC (permalink / raw)
To: Michael Albinus; +Cc: Eli Zaretskii, emacs-devel
>>>>> "MA" == Michael Albinus <michael.albinus@gmx.de> writes:
MA> There is one exception: If you type two slashes at the top of the local
MA> part of a remote file name, it behaves like for local file names. That
MA> means, "/ssh:host:// TAB" completes to "/".
MA> I don't remember why we have done this, but for consistency reasons,
MA> "/ssh:host:// TAB" should complete to "/ssh:host:/", and "/ssh:host:///
MA> TAB" should complete to "/".
MA> Opinions?
Maybe that you'd be changing 30 years of muscle memory on people? I use //
several times a day to "Get back to root", when I don't want to complete
within a sub-path. It also works in places (like ivy) where C-a C-k doesn't
always.
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs-26 d2d5e54: Mention remote file name completion in Emacs manual
2018-02-04 8:56 ` John Wiegley
@ 2018-02-04 9:08 ` Michael Albinus
2018-02-04 15:28 ` Clément Pit-Claudel
1 sibling, 0 replies; 10+ messages in thread
From: Michael Albinus @ 2018-02-04 9:08 UTC (permalink / raw)
To: emacs-devel; +Cc: Eli Zaretskii
"John Wiegley" <johnw@gnu.org> writes:
> MA> There is one exception: If you type two slashes at the top of the local
> MA> part of a remote file name, it behaves like for local file names. That
> MA> means, "/ssh:host:// TAB" completes to "/".
>
> MA> I don't remember why we have done this, but for consistency reasons,
> MA> "/ssh:host:// TAB" should complete to "/ssh:host:/", and "/ssh:host:///
> MA> TAB" should complete to "/".
>
> MA> Opinions?
>
> Maybe that you'd be changing 30 years of muscle memory on people? I use //
> several times a day to "Get back to root", when I don't want to complete
> within a sub-path. It also works in places (like ivy) where C-a C-k doesn't
> always.
Good point. However, when I use // in remote file names, often it works
as expected, sometimes not due to that inconsistency. And I *know* what
I'm doing, I have implemented this. But my muscle memory doesn't care :-)
I don't insist in changing the current behaviour. But shouldn't we adapt
then Eli's wording slightly?
Best regards, Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs-26 d2d5e54: Mention remote file name completion in Emacs manual
2018-02-04 8:56 ` John Wiegley
2018-02-04 9:08 ` Michael Albinus
@ 2018-02-04 15:28 ` Clément Pit-Claudel
1 sibling, 0 replies; 10+ messages in thread
From: Clément Pit-Claudel @ 2018-02-04 15:28 UTC (permalink / raw)
To: emacs-devel
On 2018-02-04 03:56, John Wiegley wrote:
> Maybe that you'd be changing 30 years of muscle memory on people? I use //
> several times a day to "Get back to root", when I don't want to complete
> within a sub-path.
With remote file names? The change that Michael is proposing doesn't affect the usual use of //, AFAICT; just the case when you put two slashes right after the name of a remote host in a TRAMP path.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs-26 d2d5e54: Mention remote file name completion in Emacs manual
2018-02-04 8:45 ` emacs-26 d2d5e54: Mention remote file name completion in Emacs manual Michael Albinus
2018-02-04 8:56 ` John Wiegley
@ 2018-02-04 17:18 ` Eli Zaretskii
2018-02-04 18:21 ` Michael Albinus
1 sibling, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2018-02-04 17:18 UTC (permalink / raw)
To: Michael Albinus; +Cc: emacs-devel
> From: Michael Albinus <michael.albinus@gmx.de>
> Cc: Eli Zaretskii <eliz@gnu.org>
> Date: Sun, 04 Feb 2018 09:45:14 +0100
>
> > + When completing remote file names (@pxref{Remote Files}), a double
> > +slash behaves slightly differently: it causes Emacs to ignore only the
> > +file-name part, leaving the rest (method, host and username, etc.)
> > +intact. Typing three slashes in a row ignores everything in remote
> > +file names. @xref{File name completion,,, tramp, The Tramp Manual}.
>
> There is one exception: If you type two slashes at the top of the local
> part of a remote file name, it behaves like for local file names. That
> means, "/ssh:host:// TAB" completes to "/".
The node to which I pointed in the Tramp manual is quite large, and
mentions many other useful aspects of the issue. I hoped that the
cross-reference will be enough to send people there, instead of
repeating everything in the Emacs manual. Are you saying that the nit
about two slashes at the beginning of the file name is so important
that it must be in the Emacs manual?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs-26 d2d5e54: Mention remote file name completion in Emacs manual
2018-02-04 17:18 ` Eli Zaretskii
@ 2018-02-04 18:21 ` Michael Albinus
2018-02-04 20:05 ` John Wiegley
0 siblings, 1 reply; 10+ messages in thread
From: Michael Albinus @ 2018-02-04 18:21 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
Hi Eli,
> Are you saying that the nit about two slashes at the beginning of the
> file name is so important that it must be in the Emacs manual?
No, definitely not. I've asked rather whether we shall fix this
inconsistency. John has objected, so it is decided.
Best regards, Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs-26 d2d5e54: Mention remote file name completion in Emacs manual
2018-02-04 18:21 ` Michael Albinus
@ 2018-02-04 20:05 ` John Wiegley
2018-02-04 22:07 ` Michael Albinus
0 siblings, 1 reply; 10+ messages in thread
From: John Wiegley @ 2018-02-04 20:05 UTC (permalink / raw)
To: Michael Albinus; +Cc: Eli Zaretskii, emacs-devel
>>>>> "MA" == Michael Albinus <michael.albinus@gmx.de> writes:
MA> No, definitely not. I've asked rather whether we shall fix this
MA> inconsistency. John has objected, so it is decided.
Clément has made me think I'm objecting too broadly. Indeed, these all do what
I expected in ivy:
/ssh:hermes:/<TAB> completes in / on remote
/ssh:hermes://<TAB> completes in / on remote
/ssh:hermes:///<TAB> completes in / on local
Are you saying this is inconsistent for plain Emacs?
John
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs-26 d2d5e54: Mention remote file name completion in Emacs manual
2018-02-04 20:05 ` John Wiegley
@ 2018-02-04 22:07 ` Michael Albinus
2018-02-05 3:22 ` John Wiegley
0 siblings, 1 reply; 10+ messages in thread
From: Michael Albinus @ 2018-02-04 22:07 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
John Wiegley <johnw@gnu.org> writes:
Hi John,
> Clément has made me think I'm objecting too broadly. Indeed, these all do what
> I expected in ivy:
>
> /ssh:hermes:/<TAB> completes in / on remote
> /ssh:hermes://<TAB> completes in / on remote
> /ssh:hermes:///<TAB> completes in / on local
>
> Are you saying this is inconsistent for plain Emacs?
Yes. Vanilla Emacs ("emacs -Q") behaves like this:
/ssh:ford:/<TAB> completes in / on remote
/ssh:ford://<TAB> completes in / on local
/ssh:ford:///<TAB> completes in / on remote
The second one is the inconsistency I wrote about (it shall complete in
/ on remote). The third one I didn't recognize until now, it shall
complete in / on local. A bug.
My proposal is the behavior you've shown with ivy, also for vanilla
Emacs.
> John
Best regards, Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs-26 d2d5e54: Mention remote file name completion in Emacs manual
2018-02-04 22:07 ` Michael Albinus
@ 2018-02-05 3:22 ` John Wiegley
2018-02-05 13:08 ` Michael Albinus
0 siblings, 1 reply; 10+ messages in thread
From: John Wiegley @ 2018-02-05 3:22 UTC (permalink / raw)
To: Michael Albinus; +Cc: Eli Zaretskii, emacs-devel
>>>>> "MA" == Michael Albinus <michael.albinus@gmx.de> writes:
MA> Yes. Vanilla Emacs ("emacs -Q") behaves like this:
MA> /ssh:ford:/<TAB> completes in / on remote
MA> /ssh:ford://<TAB> completes in / on local
MA> /ssh:ford:///<TAB> completes in / on remote
MA> The second one is the inconsistency I wrote about (it shall complete in /
MA> on remote). The third one I didn't recognize until now, it shall complete
MA> in / on local. A bug.
MA> My proposal is the behavior you've shown with ivy, also for vanilla Emacs.
OK, I change my objection and agree with you. I'd like to see this fixed.
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs-26 d2d5e54: Mention remote file name completion in Emacs manual
2018-02-05 3:22 ` John Wiegley
@ 2018-02-05 13:08 ` Michael Albinus
0 siblings, 0 replies; 10+ messages in thread
From: Michael Albinus @ 2018-02-05 13:08 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
"John Wiegley" <johnw@gnu.org> writes:
> MA> Yes. Vanilla Emacs ("emacs -Q") behaves like this:
>
> MA> /ssh:ford:/<TAB> completes in / on remote
> MA> /ssh:ford://<TAB> completes in / on local
> MA> /ssh:ford:///<TAB> completes in / on remote
>
> MA> The second one is the inconsistency I wrote about (it shall complete in /
> MA> on remote). The third one I didn't recognize until now, it shall complete
> MA> in / on local. A bug.
>
> MA> My proposal is the behavior you've shown with ivy, also for vanilla Emacs.
>
> OK, I change my objection and agree with you. I'd like to see this fixed.
Done, pushed to master.
Best regards, Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-02-05 13:08 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180203203124.9577.74338@vcs0.savannah.gnu.org>
[not found] ` <20180203203125.63A2520690@vcs0.savannah.gnu.org>
2018-02-04 8:45 ` emacs-26 d2d5e54: Mention remote file name completion in Emacs manual Michael Albinus
2018-02-04 8:56 ` John Wiegley
2018-02-04 9:08 ` Michael Albinus
2018-02-04 15:28 ` Clément Pit-Claudel
2018-02-04 17:18 ` Eli Zaretskii
2018-02-04 18:21 ` Michael Albinus
2018-02-04 20:05 ` John Wiegley
2018-02-04 22:07 ` Michael Albinus
2018-02-05 3:22 ` John Wiegley
2018-02-05 13:08 ` 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).