From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ed Avis Newsgroups: gmane.emacs.bugs Subject: bug#18915: 24.3; Feature: Prompt to make executable on write-file Date: Fri, 31 Oct 2014 18:12:44 +0000 Message-ID: <7E039918541B4C4183BFDB8F015C7430810163@WCL-EXCH02.wcl.local> References: <7E039918541B4C4183BFDB8F015C743081012B@WCL-EXCH02.wcl.local> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1414787470 26702 80.91.229.3 (31 Oct 2014 20:31:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Oct 2014 20:31:10 +0000 (UTC) Cc: "18915@debbugs.gnu.org" <18915@debbugs.gnu.org> To: 'Glenn Morris' Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 31 21:31:03 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XkIqc-0001Ha-RO for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 Oct 2014 21:31:02 +0100 Original-Received: from localhost ([::1]:43128 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkIqc-0007Bu-A6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 Oct 2014 16:31:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkGhB-0001U1-Cr for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2014 14:13:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XkGh4-0000Gv-QL for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2014 14:13:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkGh4-0000Gp-NU for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2014 14:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XkGh4-0003qz-9V for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2014 14:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ed Avis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Oct 2014 18:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18915 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18915-submit@debbugs.gnu.org id=B18915.141477917114794 (code B ref 18915); Fri, 31 Oct 2014 18:13:02 +0000 Original-Received: (at 18915) by debbugs.gnu.org; 31 Oct 2014 18:12:51 +0000 Original-Received: from localhost ([127.0.0.1]:44094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XkGgs-0003qX-Lo for submit@debbugs.gnu.org; Fri, 31 Oct 2014 14:12:50 -0400 Original-Received: from mail1.bemta3.messagelabs.com ([195.245.230.165]:50013) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XkGgq-0003qP-Ly for 18915@debbugs.gnu.org; Fri, 31 Oct 2014 14:12:49 -0400 Original-Received: from [85.158.137.68] by server-5.bemta-3.messagelabs.com id C8/FE-26858-E11D3545; Fri, 31 Oct 2014 18:12:46 +0000 X-Env-Sender: eda@waniasset.com X-Msg-Ref: server-9.tower-31.messagelabs.com!1414779166!7191097!1 X-Originating-IP: [213.212.127.155] X-StarScan-Received: X-StarScan-Version: 6.12.4; banners=waniasset.com,-,- X-VirusChecked: Checked Original-Received: (qmail 19193 invoked from network); 31 Oct 2014 18:12:46 -0000 Original-Received: from unknown (HELO WCL-EXCHCAS03.wcl.local) (213.212.127.155) by server-9.tower-31.messagelabs.com with AES128-SHA encrypted SMTP; 31 Oct 2014 18:12:46 -0000 Original-Received: from WCL-EXCH02.wcl.local ([169.254.1.16]) by WCL-EXCHCAS03.wcl.local ([149.85.126.212]) with mapi id 14.03.0123.003; Fri, 31 Oct 2014 18:12:46 +0000 Thread-Topic: bug#18915: 24.3; Feature: Prompt to make executable on write-file Thread-Index: Ac/1NIXn0ixV3ghfTUu0NsZDfVOgZwAANXYfAAANJAA= In-Reply-To: Accept-Language: en-US, en-GB Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [149.85.127.143] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:95325 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 executa= ble. Which could be considered mildly dangerous; in other words, this hook cann= ot be on by default in a vanilla Emacs. I suggest that Emacs usability would be improved by prompting to make a fi= le 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 tim= e) 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 practi= ce either test would give the same effect. --=20 Ed Avis ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________