Function: tramp-dired-find-file-with-sudo

tramp-dired-find-file-with-sudo is an autoloaded, interactive and byte-compiled function defined in tramp-cmds.el.gz.

Signature

(tramp-dired-find-file-with-sudo)

Documentation

Visit the file or directory named on this line as the superuser.

By default this is done using the "sudo" Tramp method. You can customize tramp-file-name-with-method to change this.

Interactively, with a prefix argument, prompt for a different method.

View in manual

Probably introduced at or before Emacs version 31.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-cmds.el.gz
;; FIXME: See FIXME above about renaming this before Emacs 31.1.

;;;###autoload
(defun tramp-dired-find-file-with-sudo ()
  "Visit the file or directory named on this line as the superuser.

By default this is done using the \"sudo\" Tramp method.
You can customize `tramp-file-name-with-method' to change this.

Interactively, with a prefix argument, prompt for a different method."
  ;; (declare (completion tramp-dired-buffer-command-completion-p))
  (interactive)
  (with-tramp-file-name-with-method
    (find-file (tramp-file-name-with-sudo (dired-get-file-for-visit)))))