[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: No longer accessible host paths
From: |
Michael Albinus |
Subject: |
Re: No longer accessible host paths |
Date: |
Mon, 11 Nov 2019 13:55:29 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
JD Smith <address@hidden> writes:
Hi,
> I have certainly noticed the “host is perfect” assumption and
> resulting errors. I’m not sure how completion enters into my
> suggestion of a shorter, single-prompt interface, which should work
> with or without completion? But I guess I could see trying to
> complete the /method:host when there is some local filename would be
> frustrating. Maybe that means my below suggestion of method-host only
> renaming makes sense for the single prompt version.
Hmm. I have added a new user option, `tramp-default-rename-alist'. Here
you can specify your preferences for renaming. If you always want to
rename files from "/ssh:badhost:/path/to/dir/" to
"/ssh:goodhost:/path/to/another/dir/", add the entry
("/ssh:badhost:/path/to/dir/" . "/ssh:goodhost:/path/to/another/dir/")
See the Tramp manual for other examples. Maybe this helps you?
> M-x tramp-rename-remote-files
> Enter old Tramp connection: /ssh:bad: RET
> Enter new Tramp connection: /ssh: ;; complete with "new" to
> Enter new Tramp connection: /ssh:new: RET
> Set visited file name: /ssh:new:/tmp/ RET
>
> Yes except that was *three* prompts. What would be ideal (for this
> simple case) is *just one prompt*:
>
> M-x tramp-rename-this-remote
> Change Remote Tramp Connection: /ssh:bad: (edit in place to /ssh:new:,
> RET)
That won't be possible. You must say both bad and new host, and confirm
them. So you have at least two prompts.
> Remote for all buffers visiting /ssh:bad are immediately changed, and
> marked as edited.
Maybe we can change the third argument of `tramp-rename-remote-files' to
NO-CONFIRM? In case it is non-nil (via a prefix argument of the
command), the new host is taken from `tramp-default-rename-alist'
without a prompt, and the buffer file names are changed also without a
prompt? Then you would have indeed only one prompt.
And you must live with the consequences, if the defaults are not as you
expect ...
WDYT?
Best regards, Michael.
- Re: No longer accessible host paths, (continued)
- Re: No longer accessible host paths, Michael Albinus, 2019/11/05
- Re: No longer accessible host paths, Michael Albinus, 2019/11/08
- Re: No longer accessible host paths, JD Smith, 2019/11/08
- Re: No longer accessible host paths, Michael Albinus, 2019/11/09
- Re: No longer accessible host paths, Michael Albinus, 2019/11/09
- Re: No longer accessible host paths, Michael Albinus, 2019/11/10
- Re: No longer accessible host paths, JD Smith, 2019/11/10
- Re: No longer accessible host paths, Michael Albinus, 2019/11/10
- Re: No longer accessible host paths, Michael Albinus, 2019/11/10
- Re: No longer accessible host paths, JD Smith, 2019/11/10
- Re: No longer accessible host paths,
Michael Albinus <=
- Re: No longer accessible host paths, JD Smith, 2019/11/11
- Re: No longer accessible host paths, Michael Albinus, 2019/11/11
- Re: No longer accessible host paths, Michael Albinus, 2019/11/13
- Re: No longer accessible host paths, JD Smith, 2019/11/13
- Re: No longer accessible host paths, Michael Albinus, 2019/11/14
- Re: No longer accessible host paths, JD Smith, 2019/11/14
- Re: No longer accessible host paths, Michael Albinus, 2019/11/14
- Re: No longer accessible host paths, JD Smith, 2019/11/14
- Re: No longer accessible host paths, Michael Albinus, 2019/11/15
- Re: No longer accessible host paths, JD Smith, 2019/11/15