[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18915: 24.3; Feature: Prompt to make executable on write-file
From: |
Ed Avis |
Subject: |
bug#18915: 24.3; Feature: Prompt to make executable on write-file |
Date: |
Fri, 31 Oct 2014 18:12:44 +0000 |
You suggested
(add-hook 'after-save-hook
'executable-make-buffer-file-executable-if-script-p)
That is useful, but it does make *all* newly created shebang files executable.
Which could be considered mildly dangerous; in other words, this hook cannot be
on by default in a vanilla Emacs.
I suggest that Emacs usability would be improved by prompting to make a file
executable,
and that since this is both safe and beginner-friendly (and doesn't get in the
way of experts,
who will surely also want the execute bit on their scripts most of the time) it
could be made
part of the default Emacs configuration.
It is not that important whether 'scriptness' is detected by looking for a
shebang line or
by whether the file originally visited had the execute bit set. In practice
either test would
give the same effect.
--
Ed Avis <eda@waniasset.com>
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________