[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: File modes facilities.
From: |
Kevin Ryde |
Subject: |
Re: File modes facilities. |
Date: |
Thu, 20 Oct 2005 11:42:56 +1000 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) |
Michael Cadilhac <address@hidden> writes:
>
> - chmod: Change the mode of any file.
I made myself M-x chmod below, to change the current visited file. I
usually just want to make a script executable. I know there's an
executable-chmod or something, but I can never remember and prefer
typing 755 or 700. The save-buffer is in case it's a new file.
(defun chmod (mode)
"Set the mode of the current file, as per the chmod program."
(interactive "sMode (3 or 4 octal digits): ")
(if (string-match "[0-3]?[0-7][0-7][0-7]" mode)
(progn
(unless (file-exists-p (buffer-file-name))
(save-buffer))
(set-file-modes (buffer-file-name) (string-to-number mode 8)))
(error "Invalid mode")))
- Re: File modes facilities., (continued)
- Re: File modes facilities., Richard M. Stallman, 2005/10/20
- Re: File modes facilities., Michael Cadilhac, 2005/10/20
- Re: File modes facilities., Miles Bader, 2005/10/20
- Re: File modes facilities., Michael Cadilhac, 2005/10/20
- Re: File modes facilities., Richard M. Stallman, 2005/10/21
- Re: File modes facilities., Michael Cadilhac, 2005/10/23
- Re: File modes facilities., Kim F. Storm, 2005/10/24
- Re: File modes facilities., Richard M. Stallman, 2005/10/25
Re: File modes facilities.,
Kevin Ryde <=