Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to interrupt tramp from reading a big file

Tags:

emacs

tramp

Some time ago I opened a file via tramp. That is, effectively via ssh/scp. It still is not finished and I would like to stop the reading. Yet C-g does not work. Apart from killing emacs (which seems quite unethical to me, it also destroys my M-x shell s), do I have any other option to stop the loading?

Note that the server does not hang. And I do not want any timeouts like in this question.

like image 915
false Avatar asked Mar 18 '23 04:03

false


2 Answers

If you can find the corresponding ssh / scp process ID, you can kill just that.

like image 157
tripleee Avatar answered Mar 24 '23 06:03

tripleee


If neither C-g nor C-cC-c are interrupting, but Emacs is still responding to M-x commands, you can kill the connection or the whole buffer.

The TRAMP manual suggests that the following M-x commands may be of interest:

  • M-x tramp-cleanup-this-connection
  • M-x tramp-cleanup-all-buffers
like image 30
RJHunter Avatar answered Mar 24 '23 04:03

RJHunter