GNU bug report logs - #18915
24.3; Feature: Prompt to make executable on write-file

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Ed Avis <eda@HIDDEN>; dated Fri, 31 Oct 2014 18:02:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 18915 <at> debbugs.gnu.org:


Received: (at 18915) by debbugs.gnu.org; 31 Oct 2014 21:16:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 31 17:16:40 2014
Received: from localhost ([127.0.0.1]:44170 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XkJYl-0008TF-IW
	for submit <at> debbugs.gnu.org; Fri, 31 Oct 2014 17:16:39 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:5269)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1XkJYj-0008T1-6m
 for 18915 <at> debbugs.gnu.org; Fri, 31 Oct 2014 17:16:38 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Au4MAOatTlRFpY87/2dsb2JhbABcgw6DYoZ+y1MEAgKBHBcBAXyEAwEBAwFWIwULCzQSFBgNJIhLCctyAQEBAQYBAQEBHpEIB4RLBbIggW+EFCGCegEBAQ
X-IPAS-Result: Au4MAOatTlRFpY87/2dsb2JhbABcgw6DYoZ+y1MEAgKBHBcBAXyEAwEBAwFWIwULCzQSFBgNJIhLCctyAQEBAQYBAQEBHpEIB4RLBbIggW+EFCGCegEBAQ
X-IronPort-AV: E=Sophos;i="5.04,797,1406606400"; d="scan'208";a="95700934"
Received: from 69-165-143-59.dsl.teksavvy.com (HELO pastel.home)
 ([69.165.143.59])
 by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA;
 31 Oct 2014 17:16:31 -0400
Received: by pastel.home (Postfix, from userid 20848)
 id 17B128592; Fri, 31 Oct 2014 17:16:31 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Ed Avis <eda@HIDDEN>
Subject: Re: bug#18915: 24.3; Feature: Prompt to make executable on write-file
Message-ID: <jwvbnosuekv.fsf-monnier+emacsbugs@HIDDEN>
References: <7E039918541B4C4183BFDB8F015C743081012B@HIDDEN>
Date: Fri, 31 Oct 2014 17:16:31 -0400
In-Reply-To: <7E039918541B4C4183BFDB8F015C743081012B@HIDDEN> (Ed
 Avis's message of "Fri, 31 Oct 2014 18:01:19 +0000")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 18915
Cc: 18915 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

> It would be useful if Emacs on write-file would first write the
> new file, and then (only if that involved creating the new file,
> and only if the buffer was previously visiting an executable file)
> prompt for whether to make the newly written file executable.

That could be done, even without prompting, I think.

The main downside is that I feel this covers only a very small corner case.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18915; Package emacs. Full text available.

Message received at 18915 <at> debbugs.gnu.org:


Received: (at 18915) by debbugs.gnu.org; 31 Oct 2014 20:54:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 31 16:54:22 2014
Received: from localhost ([127.0.0.1]:44162 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XkJDB-0007uu-LV
	for submit <at> debbugs.gnu.org; Fri, 31 Oct 2014 16:54:21 -0400
Received: from mail1.bemta14.messagelabs.com ([193.109.254.107]:10328)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eda@HIDDEN>) id 1XkJCz-0007uY-0e
 for 18915 <at> debbugs.gnu.org; Fri, 31 Oct 2014 16:54:20 -0400
Received: from [193.109.254.147] by server-3.bemta-14.messagelabs.com id
 A0/8B-02953-FE6F3545; Fri, 31 Oct 2014 20:54:07 +0000
X-Env-Sender: eda@HIDDEN
X-Msg-Ref: server-11.tower-27.messagelabs.com!1414788847!8546687!1
X-Originating-IP: [80.169.169.167]
X-StarScan-Received: 
X-StarScan-Version: 6.12.4; banners=waniasset.com,-,-
X-VirusChecked: Checked
Received: (qmail 26274 invoked from network); 31 Oct 2014 20:54:07 -0000
Received: from unknown (HELO WCL-EXCHCAS02.wcl.local) (80.169.169.167)
 by server-11.tower-27.messagelabs.com with AES128-SHA encrypted SMTP;
 31 Oct 2014 20:54:07 -0000
Received: from WCL-EXCH02.wcl.local ([169.254.1.16]) by
 WCL-EXCHCAS02.wcl.local ([149.85.127.102]) with mapi id 14.03.0123.003; Fri,
 31 Oct 2014 20:54:06 +0000
From: Ed Avis <eda@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>, Glenn Morris <rgm@HIDDEN>
Subject: RE: bug#18915: 24.3; Feature: Prompt to make executable on write-file
Thread-Topic: bug#18915: 24.3; Feature: Prompt to make executable on write-file
Thread-Index: AQHP9Uof0ixV3ghfTUu0NsZDfVOgZ5xKrrwQ
Date: Fri, 31 Oct 2014 20:54:06 +0000
Message-ID: <7E039918541B4C4183BFDB8F015C74308102FB@HIDDEN>
References: <7E039918541B4C4183BFDB8F015C743081012B@HIDDEN>
 <g8tx2k9ks3.fsf@HIDDEN>
 <jwvr3xoughw.fsf-monnier+emacsbugs@HIDDEN>
In-Reply-To: <jwvr3xoughw.fsf-monnier+emacsbugs@HIDDEN>
Accept-Language: en-US, en-GB
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [149.85.127.7]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 18915
Cc: "18915 <at> debbugs.gnu.org" <18915 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.3 (-)

>Also, FWIW, I use such a hook in my .emacs and have found it occasionally=
 harmful,

I agree, making the file executable silently is not a good idea.  It needs=
 a prompt.

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18915; Package emacs. Full text available.

Message received at 18915 <at> debbugs.gnu.org:


Received: (at 18915) by debbugs.gnu.org; 31 Oct 2014 20:35:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 31 16:35:02 2014
Received: from localhost ([127.0.0.1]:44144 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XkIuT-0007OL-By
	for submit <at> debbugs.gnu.org; Fri, 31 Oct 2014 16:35:01 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]:38858)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1XkIuR-0007Ny-GE
 for 18915 <at> debbugs.gnu.org; Fri, 31 Oct 2014 16:34:59 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Au0MAOatTlRFpY87/2dsb2JhbABcgw6DYoZ+y1MEAgKBHBcBAXyEAwEBBFYjEAsOJhIUGA0kiFTLcgEBAQEGAQEBAR6RCAeESwWyIIFvhBQhgnoBAQE
X-IPAS-Result: Au0MAOatTlRFpY87/2dsb2JhbABcgw6DYoZ+y1MEAgKBHBcBAXyEAwEBBFYjEAsOJhIUGA0kiFTLcgEBAQEGAQEBAR6RCAeESwWyIIFvhBQhgnoBAQE
X-IronPort-AV: E=Sophos;i="5.04,797,1406606400"; d="scan'208";a="95698590"
Received: from 69-165-143-59.dsl.teksavvy.com (HELO pastel.home)
 ([69.165.143.59])
 by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA;
 31 Oct 2014 16:34:53 -0400
Received: by pastel.home (Postfix, from userid 20848)
 id AB53162BA; Fri, 31 Oct 2014 16:34:53 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Subject: Re: bug#18915: 24.3; Feature: Prompt to make executable on write-file
Message-ID: <jwvr3xoughw.fsf-monnier+emacsbugs@HIDDEN>
References: <7E039918541B4C4183BFDB8F015C743081012B@HIDDEN>
 <g8tx2k9ks3.fsf@HIDDEN>
Date: Fri, 31 Oct 2014 16:34:53 -0400
In-Reply-To: <g8tx2k9ks3.fsf@HIDDEN> (Glenn Morris's message of
 "Fri, 31 Oct 2014 14:06:04 -0400")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 18915
Cc: 18915 <at> debbugs.gnu.org, Ed Avis <eda@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

> (add-hook 'after-save-hook
>           'executable-make-buffer-file-executable-if-script-p)
>
> already handles that particular case, so personally I don't see the need
> for a new, more general feature for this.

Also, FWIW, I use such a hook in my .emacs and have found it
occasionally harmful, e.g. when editing the emacs/test/indent/scheme.scm
file, which then gets it `execute' bit set, even though it's not meant
to be executed.
Tho I guess it'd be OK to mark those files as executable, but I can't
get myself to do it, so I regularly end up "chmod -x"ing those files
after editing them.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18915; Package emacs. Full text available.

Message received at 18915 <at> debbugs.gnu.org:


Received: (at 18915) by debbugs.gnu.org; 31 Oct 2014 18:12:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 31 14:12:51 2014
Received: from localhost ([127.0.0.1]:44094 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XkGgs-0003qX-Lo
	for submit <at> debbugs.gnu.org; Fri, 31 Oct 2014 14:12:50 -0400
Received: from mail1.bemta3.messagelabs.com ([195.245.230.165]:50013)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eda@HIDDEN>) id 1XkGgq-0003qP-Ly
 for 18915 <at> debbugs.gnu.org; Fri, 31 Oct 2014 14:12:49 -0400
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@HIDDEN
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
Received: (qmail 19193 invoked from network); 31 Oct 2014 18:12:46 -0000
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
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
From: Ed Avis <eda@HIDDEN>
To: 'Glenn Morris' <rgm@HIDDEN>
Subject: RE: bug#18915: 24.3; Feature: Prompt to make executable on write-file
Thread-Topic: bug#18915: 24.3; Feature: Prompt to make executable on write-file
Thread-Index: Ac/1NIXn0ixV3ghfTUu0NsZDfVOgZwAANXYfAAANJAA=
Date: Fri, 31 Oct 2014 18:12:44 +0000
Message-ID: <7E039918541B4C4183BFDB8F015C7430810163@HIDDEN>
References: <7E039918541B4C4183BFDB8F015C743081012B@HIDDEN>
 <g8tx2k9ks3.fsf@HIDDEN>
In-Reply-To: <g8tx2k9ks3.fsf@HIDDEN>
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]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 18915
Cc: "18915 <at> debbugs.gnu.org" <18915 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

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 <eda@HIDDEN>

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18915; Package emacs. Full text available.

Message received at 18915 <at> debbugs.gnu.org:


Received: (at 18915) by debbugs.gnu.org; 31 Oct 2014 18:06:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 31 14:06:12 2014
Received: from localhost ([127.0.0.1]:44086 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XkGaS-0003ga-6Y
	for submit <at> debbugs.gnu.org; Fri, 31 Oct 2014 14:06:12 -0400
Received: from fencepost.gnu.org ([208.118.235.10]:56767 ident=Debian-exim)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rgm@HIDDEN>) id 1XkGaQ-0003gS-41
 for 18915 <at> debbugs.gnu.org; Fri, 31 Oct 2014 14:06:10 -0400
Received: from rgm by fencepost.gnu.org with local (Exim 4.71)
 (envelope-from <rgm@HIDDEN>)
 id 1XkGaL-00028X-Ar; Fri, 31 Oct 2014 14:06:05 -0400
From: Glenn Morris <rgm@HIDDEN>
To: Ed Avis <eda@HIDDEN>
Subject: Re: bug#18915: 24.3; Feature: Prompt to make executable on write-file
References: <7E039918541B4C4183BFDB8F015C743081012B@HIDDEN>
X-Spook: Jyllandsposten benelux Venezuela AMEMB unclassified Steve
X-Ran: 4<+&x#oHAu{v._51>iA<vDa]Rt(DF)3%gx]CS;S8KSxhzy,^l{m}'V2_z1+5i5.iLD%[\c
X-Hue: yellow
X-Attribution: GM
Date: Fri, 31 Oct 2014 14:06:04 -0400
In-Reply-To: <7E039918541B4C4183BFDB8F015C743081012B@HIDDEN> (Ed
 Avis's message of "Fri, 31 Oct 2014 18:01:19 +0000")
Message-ID: <g8tx2k9ks3.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -5.6 (-----)
X-Debbugs-Envelope-To: 18915
Cc: 18915 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.6 (-----)

Ed Avis wrote:

> (if you edit a script and save a copy, you'll probably want to run the
> new script).

The existing

(add-hook 'after-save-hook
          'executable-make-buffer-file-executable-if-script-p)

already handles that particular case, so personally I don't see the need
for a new, more general feature for this.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18915; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 31 Oct 2014 18:01:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 31 14:01:50 2014
Received: from localhost ([127.0.0.1]:44077 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XkGWD-0003Z0-4a
	for submit <at> debbugs.gnu.org; Fri, 31 Oct 2014 14:01:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57996)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eda@HIDDEN>) id 1XkGW9-0003Yk-HE
 for submit <at> debbugs.gnu.org; Fri, 31 Oct 2014 14:01:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eda@HIDDEN>) id 1XkGVy-0003zc-IF
 for submit <at> debbugs.gnu.org; Fri, 31 Oct 2014 14:01:40 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:43471)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <eda@HIDDEN>) id 1XkGVy-0003zY-Fa
 for submit <at> debbugs.gnu.org; Fri, 31 Oct 2014 14:01:34 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:59693)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <eda@HIDDEN>) id 1XkGVs-0003wG-SZ
 for bug-gnu-emacs@HIDDEN; Fri, 31 Oct 2014 14:01:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eda@HIDDEN>) id 1XkGVn-0003xO-7C
 for bug-gnu-emacs@HIDDEN; Fri, 31 Oct 2014 14:01:28 -0400
Received: from mail1.bemta5.messagelabs.com ([195.245.231.142]:10852)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <eda@HIDDEN>) id 1XkGVm-0003x9-VS
 for bug-gnu-emacs@HIDDEN; Fri, 31 Oct 2014 14:01:23 -0400
Received: from [85.158.139.211] by server-6.bemta-5.messagelabs.com id
 F7/F0-26652-17EC3545; Fri, 31 Oct 2014 18:01:21 +0000
X-Env-Sender: eda@HIDDEN
X-Msg-Ref: server-10.tower-206.messagelabs.com!1414778480!7690636!1
X-Originating-IP: [80.169.169.167]
X-StarScan-Received: 
X-StarScan-Version: 6.12.3; banners=waniasset.com,-,-
X-VirusChecked: Checked
Received: (qmail 10528 invoked from network); 31 Oct 2014 18:01:20 -0000
Received: from unknown (HELO WCL-EXCHCAS02.wcl.local) (80.169.169.167)
 by server-10.tower-206.messagelabs.com with AES128-SHA encrypted SMTP;
 31 Oct 2014 18:01:20 -0000
Received: from WCL-EXCH02.wcl.local ([169.254.1.16]) by
 WCL-EXCHCAS02.wcl.local ([149.85.127.102]) with mapi id 14.03.0123.003; Fri,
 31 Oct 2014 18:01:20 +0000
From: Ed Avis <eda@HIDDEN>
To: "'bug-gnu-emacs@HIDDEN'" <bug-gnu-emacs@HIDDEN>
Subject: 24.3; Feature: Prompt to make executable on write-file
Thread-Topic: 24.3; Feature: Prompt to make executable on write-file
Thread-Index: Ac/1NIXn0ixV3ghfTUu0NsZDfVOgZw==
Date: Fri, 31 Oct 2014 18:01:19 +0000
Message-ID: <7E039918541B4C4183BFDB8F015C743081012B@HIDDEN>
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]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgment at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':

On Unix, Create a file with execute permission (chmod a+x file)
and open it with C-x C-f file RET.  Now save that as a different
file, C-x C-w otherfile RET.

Current behaviour: a file called otherfile is written but it is not
executable, even though the file that you originally visited was.

It would be useful if Emacs on write-file would first write the
new file, and then (only if that involved creating the new file,
and only if the buffer was previously visiting an executable file)
prompt for whether to make the newly written file executable.

I suggest that most of the time, the user will probably want to
make the new file executable (if you edit a script and save a
copy, you'll probably want to run the new script).  However,
making things executable by default is a bit dangerous, so
better to prompt.

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/share/emacs/24.3/etc/DEBUG.


In GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.10.9)
 of 2014-09-30 on buildvm-10.phx2.fedoraproject.org
Configured using:
 `configure '--build=3Dx86_64-redhat-linux-gnu'
 '--host=3Dx86_64-redhat-linux-gnu' '--program-prefix=3D'
 '--disable-dependency-tracking' '--prefix=3D/usr' '--exec-prefix=3D/usr'
 '--bindir=3D/usr/bin' '--sbindir=3D/usr/sbin' '--sysconfdir=3D/etc'
 '--datadir=3D/usr/share' '--includedir=3D/usr/include'
 '--libdir=3D/usr/lib64' '--libexecdir=3D/usr/libexec'
 '--localstatedir=3D/var' '--sharedstatedir=3D/var/lib'
 '--mandir=3D/usr/share/man' '--infodir=3D/usr/share/info' '--with-dbus'
 '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff'
 '--with-xft' '--with-xpm' '--with-x-toolkit=3Dgtk3' '--with-gpm=3Dno'
 'build_alias=3Dx86_64-redhat-linux-gnu'
 'host_alias=3Dx86_64-redhat-linux-gnu' 'CFLAGS=3D-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=3D2 -fexceptions
 -fstack-protector-strong --param=3Dssp-buffer-size=3D4
 -grecord-gcc-switches -m64 -mtune=3Dgeneric' 'LDFLAGS=3D-Wl,-z,relro ''

Important settings:
  value of $LC_COLLATE: C
  value of $LC_CTYPE: en_GB.UTF-8
  value of $LC_MESSAGES: en_GB.UTF-8
  value of $LC_MONETARY: en_GB.UTF-8
  value of $LC_NUMERIC: en_GB.UTF-8
  value of $LC_TIME: en_GB.UTF-8
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Help

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s
C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s
C-a C-x C-w t e s t C-a C-k / v a r TAB q w TAB DEL
DEL w TAB c g TAB t e s t _ c a DEL DEL DEL / c a p
TAB i t a l _ a l l o c a t i o n RET ESC x s h e l
l RET ESC > w c DEL DEL e c h o SPC ; DEL ' c a p i
t a l _ a l l o c a t i o n ? f u n d _ g r o u p _
i d =3D 0 ' SPC | SPC . / m i s TAB t e s t _ p a TAB
RET C-x 2 C-x o C-x b c a p TAB RET C-x C-f / v a r
TAB C-g C-x k RET C-x C-f / v a r TAB w TAB C-g ESC
! C-g c j m DEL DEL h m o d SPC a + x SPC / v a r TAB
w TAB c g TAB t e s t / c a p TAB RET C-h k C-x C-w
c a p i t a l _ a l l o c a t i o n ? f u n d _ g r
o u p _ i d =3D 0 C-g C-g ESC x e m a c s - b u TAB g
RET DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL r e
p o r t - e m TAB RET

Recent messages:
Mark set
Mark saved where search started [3 times]
Saving file /var/www/cgi-bin/test/capital_allocation...
Wrote /var/www/cgi-bin/test/capital_allocation
Mark set
Quit [3 times]
Type "q" to delete help window.

Quit [2 times]
delete-backward-char: Text is read-only [2 times]

Load-path shadows:
None found.

Features:
(shadow sort emacsbug message format-spec rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mail-utils etags mail-extr dired
vc-cvs vc-rcs make-mode pcmpl-rpm tabify man sh-script smie executable
conf-mode imenu nroff-mode python rx cus-edit wid-edit cus-start
cus-load perl-mode ffap url-parse auth-source eieio gnus-util mm-util
mail-prsvr password-cache url-vars dabbrev edmacro kmacro mule-util
log-edit diff-mode nxml-uchnm rng-xsd xsd-regexp rng-cmpct rng-nxml
rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util
rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph
nxml-enc xmltok misearch multi-isearch add-log log-view easy-mmode
pcvs-util vc vc-dispatcher vc-svn sql thingatpt help-mode pcmpl-unix
time-date server csharp-mode warnings advice help-fns advice-preload
byte-opt bytecomp byte-compile cconv cc-langs cc-mode cc-fonts easymenu
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
zoom-frm frame-cmds frame-fns cl-macs gv avoid cl cl-lib compile shell
pcomplete comint ring ansi-color tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

--=20
Ed Avis <eda@HIDDEN>


______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________




Acknowledgement sent to Ed Avis <eda@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#18915; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.