tramp (2.3.2); be sure dired "*" commands work in tramp

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

tramp (2.3.2); be sure dired "*" commands work in tramp

積丹尼 Dan Jacobson
Please be sure dired "*" commands work in tramp.
If the user does
(dired-do-shell-command "cat * > /tmp/rrr" ...
the /tmp/rrr should refer to the local machine, else he would write /adb::/tmp !

_______________________________________________
Tramp-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/tramp-devel
Reply | Threaded
Open this post in threaded view
|

Re: tramp (2.3.2); be sure dired "*" commands work in tramp

Michael Albinus
積丹尼 Dan Jacobson <[hidden email]> writes:

> Please be sure dired "*" commands work in tramp.
> If the user does
> (dired-do-shell-command "cat * > /tmp/rrr" ...
> the /tmp/rrr should refer to the local machine, else he would write /adb::/tmp !

How shall this work? `dired-do-shell-command' calls `shell-command'
internally. Tramp provides a handler for this,
`tramp-adb-handle-shell-command', but it is not responsible for the
arguments. It takes them literally.

The feature you are asking for must be implemented on dired level, I
believe.

Best regards, Michael.

_______________________________________________
Tramp-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/tramp-devel
Reply | Threaded
Open this post in threaded view
|

Re: tramp (2.3.2); be sure dired "*" commands work in tramp

積丹尼 Dan Jacobson
In reply to this post by 積丹尼 Dan Jacobson
Well all I know is some accident could happen...

_______________________________________________
Tramp-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/tramp-devel
Reply | Threaded
Open this post in threaded view
|

Re: tramp (2.3.2); be sure dired "*" commands work in tramp

Michael Albinus
積丹尼 Dan Jacobson <[hidden email]> writes:

> Well all I know is some accident could happen...

I don't understand. Which accident do you mean?

Best regards, Michael.

_______________________________________________
Tramp-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/tramp-devel
Reply | Threaded
Open this post in threaded view
|

Re: tramp (2.3.2); be sure dired "*" commands work in tramp

積丹尼 Dan Jacobson
In reply to this post by 積丹尼 Dan Jacobson
>>>>> "MA" == Michael Albinus <[hidden email]> writes:

MA> I don't understand. Which accident do you mean?

I mean he could do
Bla > some_unimportant_file
but it would end up actually doing
Bla > some_important_file
because the confusion between local and remote.

_______________________________________________
Tramp-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/tramp-devel
Reply | Threaded
Open this post in threaded view
|

Re: tramp (2.3.2); be sure dired "*" commands work in tramp

Michael Albinus
積丹尼 Dan Jacobson <[hidden email]> writes:

> I mean he could do
> Bla > some_unimportant_file
> but it would end up actually doing
> Bla > some_important_file
> because the confusion between local and remote.

If somebody uses a shell, she shall know what she's doing. Tramp also
does not prevent a user doing

# rm -rf * .*

Best regards, Michael.

_______________________________________________
Tramp-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/tramp-devel
Reply | Threaded
Open this post in threaded view
|

Re: tramp (2.3.2); be sure dired "*" commands work in tramp

積丹尼 Dan Jacobson
In reply to this post by 積丹尼 Dan Jacobson
Dear bug-gnu-emacs, in some cases when one thinks he is using a local
file in dired, it becomes a remote file. This might lead to him zapping
the wrong file.
http://lists.gnu.org/archive/html/tramp-devel/2017-10/threads.html

_______________________________________________
Tramp-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/tramp-devel
Reply | Threaded
Open this post in threaded view
|

Re: bug#28761: tramp (2.3.2); be sure dired "*" commands work in tramp

Michael Albinus
積丹尼 Dan Jacobson <[hidden email]> writes:

Hi Dan,

> Dear bug-gnu-emacs, in some cases when one thinks he is using a local
> file in dired, it becomes a remote file. This might lead to him zapping
> the wrong file.
> http://lists.gnu.org/archive/html/tramp-devel/2017-10/threads.html

I'm sorry, but what you describe is not a bug. Could you, pls, give a
scenario, starting with emacs -Q, which shows the problem?

Most of the Emacs developers don't read the Tramp devel mailing list, so
they would need this information. And as I told you already, you didn't
convince me (yet) that there's a Tramp bug.

Best regards, Michael.

_______________________________________________
Tramp-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/tramp-devel
Reply | Threaded
Open this post in threaded view
|

Re: bug#28761: tramp (2.3.2); be sure dired "*" commands work in tramp

積丹尼 Dan Jacobson
In reply to this post by 積丹尼 Dan Jacobson
OK I guess you are right. If we do
Dired file or URL: /ssh:remote_machine:
Then we are looking at a directory on the remote machine.
And all operations would refer to files on that remote machine. OK I'll
close this.

_______________________________________________
Tramp-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/tramp-devel