Skip to main content
deleted 12 characters in body
Source Link

TheExpanding on the other answers are fine. Based on these, here is a piece of Elisp, allowing to automate this action:

(defun chmod-this-file () "chmod the file corresponding to the current buffer." (interactive) (setq modes (read-file-modes "File modes (octal or symbolic): " buffer-file-name)) (chmod buffer-file-name modes)) 

The other answers are fine. Based on these, here is a piece of Elisp, allowing to automate this action:

(defun chmod-this-file () "chmod the file corresponding to the current buffer." (interactive) (setq modes (read-file-modes "File modes (octal or symbolic): " buffer-file-name)) (chmod buffer-file-name modes)) 

Expanding on the other answers, here is a piece of Elisp, allowing to automate this action:

(defun chmod-this-file () "chmod the file corresponding to the current buffer." (interactive) (setq modes (read-file-modes "File modes (octal or symbolic): " buffer-file-name)) (chmod buffer-file-name modes)) 
Source Link

The other answers are fine. Based on these, here is a piece of Elisp, allowing to automate this action:

(defun chmod-this-file () "chmod the file corresponding to the current buffer." (interactive) (setq modes (read-file-modes "File modes (octal or symbolic): " buffer-file-name)) (chmod buffer-file-name modes))