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

前端 未结 9 1164
悲&欢浪女
悲&欢浪女 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 22:01

    I tried out Vebjorn Ljosa's solution, and it turned out that at least in my Emacs (22.3.1) there isn't such function as 'trim-right', which is used for removing an useless newline at the end of chmod output.

    Removing the call to 'trim-right' helped, but made the status row "bounce" because of the extra newline.

提交回复
热议问题