Suppose I want to open a file in an existing Emacs session using su or sudo, without dropping down to a shell and doing sudoedit or
su
sudo
sudoedit
If you use helm, helm-find-files supports opening a file as root with C-c r.
helm
helm-find-files
C-c r