How do I change read/write mode for a file using Emacs?

前端 未结 9 1064
悲&欢浪女
悲&欢浪女 2021-01-29 21:11

If a file is set to read only mode, how do I change it to write mode and vice versa from within Emacs?

9条回答
  •  春和景丽
    2021-01-29 21:44

    Be sure you're not confusing 'file' with 'buffer'. You can set buffers to read-only and back again with C-x C-q (toggle-read-only). If you have permission to read, but not write, a file, the buffer you get when you visit the file (C-x C-f or find-file) will be put in read-only mode automatically. If you want to change the permissions on a file in the file system, perhaps start with dired on the directory that contains the file. Documentation for dired can be found in info; C-h i (emacs)dired RET.

提交回复
热议问题