all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ed Avis <eda@waniasset.com>
To: 'Glenn Morris' <rgm@gnu.org>
Cc: "18915@debbugs.gnu.org" <18915@debbugs.gnu.org>
Subject: bug#18915: 24.3; Feature: Prompt to make executable on write-file
Date: Fri, 31 Oct 2014 18:12:44 +0000	[thread overview]
Message-ID: <7E039918541B4C4183BFDB8F015C7430810163@WCL-EXCH02.wcl.local> (raw)
In-Reply-To: <g8tx2k9ks3.fsf@fencepost.gnu.org>

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
______________________________________________________________________





  reply	other threads:[~2014-10-31 18:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 18:01 bug#18915: 24.3; Feature: Prompt to make executable on write-file Ed Avis
2014-10-31 18:06 ` Glenn Morris
2014-10-31 18:12   ` Ed Avis [this message]
2014-10-31 20:34   ` Stefan Monnier
2014-10-31 20:54     ` Ed Avis
2014-10-31 21:16 ` Stefan Monnier
2021-12-02 12:21   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7E039918541B4C4183BFDB8F015C7430810163@WCL-EXCH02.wcl.local \
    --to=eda@waniasset.com \
    --cc=18915@debbugs.gnu.org \
    --cc=rgm@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.