I have done this a ton of times in the past 10 months or so that I have been using Emacs (which I have quickly come to love, by the way) and never had a problem. No clue what I changed or how, but now this does not work at all. As far as I know, I didn't change anything. Haven't edited my init.el or similar, haven't changed any configurations on my host machine. No clue what's going on here.
I have the below in my init.el to open dired and then opening files from there to edit when I need to edit with privileges.
(require 'tramp) (defun sudired () (interactive) (dired "/sudo::/"))
That has served me well for months. Now, I open dired and open a file (say /boot/config.txt), do my edits, C-x C-s, and I get the message "Copying directly failed, see buffer 'tramp/sudo root@HOST' for details." There buffer it mentions is empty. My messages buffer has this:
Saving file /sudo:root@HOST:/boot/config.txt... Renaming /sudo:root@HOST:/boot/config.txt to /sudo:root@HOST:/boot/config.txt~...done Copying /tmp/tramp.eqRQkH.txt to /sudo:root@HOST:/boot/config.txt... Copying directly failed, see buffer ‘tramp/sudo root@HOST’ for details.
I've searched around and found similar problems involving Tramp... Nothing that helps my issue though. At least not that I can work out.
Same thing happens when I try to use C-x C-f and type out /sudo:root@HOST:/boot/config.txt, do my edits, and then C-x C-s. I get those same error messages, etc.
Probably making a noob mistake here. Someone school me please.
tramp-mode
has a bad bug. It has a couple of really bad bugs.