From unknown Tue Jun 17 01:49:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18915: 24.3; Feature: Prompt to make executable on write-file Resent-From: Ed Avis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Oct 2014 18:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18915 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 18915@debbugs.gnu.org X-Debbugs-Original-To: "'bug-gnu-emacs@gnu.org'" Received: via spool by submit@debbugs.gnu.org id=B.141477851013708 (code B ref -1); Fri, 31 Oct 2014 18:02:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 Oct 2014 18:01:50 +0000 Received: from localhost ([127.0.0.1]:44077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XkGWD-0003Z0-4a for submit@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 ) id 1XkGW9-0003Yk-HE for submit@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 ) id 1XkGVy-0003zc-IF for submit@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 ) id 1XkGVy-0003zY-Fa for submit@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 ) id 1XkGVs-0003wG-SZ for bug-gnu-emacs@gnu.org; Fri, 31 Oct 2014 14:01:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XkGVn-0003xO-7C for bug-gnu-emacs@gnu.org; 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 ) id 1XkGVm-0003x9-VS for bug-gnu-emacs@gnu.org; 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@waniasset.com 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 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@WCL-EXCH02.wcl.local> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ From unknown Tue Jun 17 01:49:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18915: 24.3; Feature: Prompt to make executable on write-file Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Oct 2014 18:07:01 +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: To: Ed Avis Cc: 18915@debbugs.gnu.org Received: via spool by 18915-submit@debbugs.gnu.org id=B18915.141477877214176 (code B ref 18915); Fri, 31 Oct 2014 18:07:01 +0000 Received: (at 18915) by debbugs.gnu.org; 31 Oct 2014 18:06:12 +0000 Received: from localhost ([127.0.0.1]:44086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XkGaS-0003ga-6Y for submit@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 ) id 1XkGaQ-0003gS-41 for 18915@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 ) id 1XkGaL-00028X-Ar; Fri, 31 Oct 2014 14:06:05 -0400 From: Glenn Morris References: <7E039918541B4C4183BFDB8F015C743081012B@WCL-EXCH02.wcl.local> X-Spook: Jyllandsposten benelux Venezuela AMEMB unclassified Steve X-Ran: 4<+&x#oHAu{v._51>iA (Ed Avis's message of "Fri, 31 Oct 2014 18:01:19 +0000") Message-ID: 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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. From unknown Tue Jun 17 01:49:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18915: 24.3; Feature: Prompt to make executable on write-file 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: To: 'Glenn Morris' Cc: "18915@debbugs.gnu.org" <18915@debbugs.gnu.org> Received: via spool by 18915-submit@debbugs.gnu.org id=B18915.141477917114794 (code B ref 18915); Fri, 31 Oct 2014 18:13:02 +0000 Received: (at 18915) by debbugs.gnu.org; 31 Oct 2014 18:12:51 +0000 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 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 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 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 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@WCL-EXCH02.wcl.local> References: <7E039918541B4C4183BFDB8F015C743081012B@WCL-EXCH02.wcl.local> 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] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ From unknown Tue Jun 17 01:49:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18915: 24.3; Feature: Prompt to make executable on write-file Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Oct 2014 20:36:01 +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: To: Glenn Morris Cc: 18915@debbugs.gnu.org, Ed Avis Received: via spool by 18915-submit@debbugs.gnu.org id=B18915.141478770228436 (code B ref 18915); Fri, 31 Oct 2014 20:36:01 +0000 Received: (at 18915) by debbugs.gnu.org; 31 Oct 2014 20:35:02 +0000 Received: from localhost ([127.0.0.1]:44144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XkIuT-0007OL-By for submit@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 ) id 1XkIuR-0007Ny-GE for 18915@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 Message-ID: References: <7E039918541B4C4183BFDB8F015C743081012B@WCL-EXCH02.wcl.local> Date: Fri, 31 Oct 2014 16:34:53 -0400 In-Reply-To: (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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 From unknown Tue Jun 17 01:49:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18915: 24.3; Feature: Prompt to make executable on write-file Resent-From: Ed Avis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Oct 2014 20:55: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: To: Stefan Monnier , Glenn Morris Cc: "18915@debbugs.gnu.org" <18915@debbugs.gnu.org> Received: via spool by 18915-submit@debbugs.gnu.org id=B18915.141478886230440 (code B ref 18915); Fri, 31 Oct 2014 20:55:02 +0000 Received: (at 18915) by debbugs.gnu.org; 31 Oct 2014 20:54:22 +0000 Received: from localhost ([127.0.0.1]:44162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XkJDB-0007uu-LV for submit@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 ) id 1XkJCz-0007uY-0e for 18915@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@waniasset.com 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 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@WCL-EXCH02.wcl.local> References: <7E039918541B4C4183BFDB8F015C743081012B@WCL-EXCH02.wcl.local> 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.7] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 ______________________________________________________________________ From unknown Tue Jun 17 01:49:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18915: 24.3; Feature: Prompt to make executable on write-file Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Oct 2014 21:17:01 +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: To: Ed Avis Cc: 18915@debbugs.gnu.org Received: via spool by 18915-submit@debbugs.gnu.org id=B18915.141479020032570 (code B ref 18915); Fri, 31 Oct 2014 21:17:01 +0000 Received: (at 18915) by debbugs.gnu.org; 31 Oct 2014 21:16:40 +0000 Received: from localhost ([127.0.0.1]:44170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XkJYl-0008TF-IW for submit@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 ) id 1XkJYj-0008T1-6m for 18915@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 Message-ID: References: <7E039918541B4C4183BFDB8F015C743081012B@WCL-EXCH02.wcl.local> Date: Fri, 31 Oct 2014 17:16:31 -0400 In-Reply-To: <7E039918541B4C4183BFDB8F015C743081012B@WCL-EXCH02.wcl.local> (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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 From unknown Tue Jun 17 01:49:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18915: 24.3; Feature: Prompt to make executable on write-file Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Dec 2021 12:22: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: To: Stefan Monnier Cc: 18915@debbugs.gnu.org, Ed Avis Received: via spool by 18915-submit@debbugs.gnu.org id=B18915.16384477147907 (code B ref 18915); Thu, 02 Dec 2021 12:22:02 +0000 Received: (at 18915) by debbugs.gnu.org; 2 Dec 2021 12:21:54 +0000 Received: from localhost ([127.0.0.1]:46909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msl62-00023T-D2 for submit@debbugs.gnu.org; Thu, 02 Dec 2021 07:21:54 -0500 Received: from quimby.gnus.org ([95.216.78.240]:38938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msl5x-00022v-Jc for 18915@debbugs.gnu.org; Thu, 02 Dec 2021 07:21:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vWawqBPgxIiy/3sbcwytMl9tJlojILQrV+xYgDO90b8=; b=SBCCUaYgDEA6QWwrNgZmaqB9UL QEprQIMuVUnc2TXNg8hn4NnQTHDNe83SmHD5vMYtTUCpcyBGNhwJq2c6fLrsC+Csoe2tKzCXZ27wu NXCsXUvqzORHypINdYUiyOKjTP2AvG0GzQJp9q4eSi9ymlNG4OGWTLbjTNjF+snoVoSA=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msl5n-0000pB-0k; Thu, 02 Dec 2021 13:21:41 +0100 From: Lars Ingebrigtsen References: <7E039918541B4C4183BFDB8F015C743081012B@WCL-EXCH02.wcl.local> X-Now-Playing: Seb Brun & Pierre Alexandre Tremblay's _The Wire Tapper 53_: "Late" Date: Thu, 02 Dec 2021 13:21:36 +0100 In-Reply-To: (Stefan Monnier's message of "Fri, 31 Oct 2014 17:16:31 -0400") Message-ID: <87fsrb2o4v.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: >> 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 f [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Monnier writes: >> 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. So I've now done this in Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 02 07:21:53 2021 Received: (at control) by debbugs.gnu.org; 2 Dec 2021 12:21:53 +0000 Received: from localhost ([127.0.0.1]:46907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msl61-00023F-7w for submit@debbugs.gnu.org; Thu, 02 Dec 2021 07:21:53 -0500 Received: from quimby.gnus.org ([95.216.78.240]:38954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msl60-00022z-CA for control@debbugs.gnu.org; Thu, 02 Dec 2021 07:21:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=iu3lu+roptO0CXvm0MM1ydGWdIoJJNYrNetWIGiQiQA=; b=SepQ6oDDItcV1/CFIqfc+DbD4o hYpviyY+AldEDAVqShLCuyuWdYGAIMMnJRZhiMqRdJE8xhYmRZFPKW+dcTsc/uQWX4Ynjrz7TCS3z XJNnqzq+XhNMXh8j5TXruG5Zos9QnQ0kt6s8lhjpvL4gVok6GPTK4y5PC+pyGBCnmuoE=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msl5s-0000pI-LS for control@debbugs.gnu.org; Thu, 02 Dec 2021 13:21:46 +0100 Date: Thu, 02 Dec 2021 13:21:44 +0100 Message-Id: <87ee6v2o4n.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #18915 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 18915 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 18915 29.1 quit