Open a file with su/sudo inside Emacs

前端 未结 9 938
我寻月下人不归
我寻月下人不归 2020-12-12 08:32

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

9条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-12 09:14

    Ugh. Perhaps you could open a shell in Emacs and exec sudo emacs.

    The problem is that you presumably don't just want to open the file. You want to be able to save it later. Thus you need your root privs to persist, not just exist for opening the file.

    Sounds like you want Emacs to become your window manager. It's bloated enough without that. :)

提交回复
热议问题