all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: "Göktuğ Kayaalp" <self@gkayaalp.com>, 29550@debbugs.gnu.org
Subject: bug#29550: 27.0.50; `not-modified' should be disabled by default
Date: Sun, 29 Sep 2019 02:06:55 +0200	[thread overview]
Message-ID: <CADwFkmk0ySi2pev+8Y4ZtndKqrr1gN7UsEtk0bQzdCnBoiM+tw@mail.gmail.com> (raw)
In-Reply-To: <ygmvahnv1pq.fsf@gkayaalp.com>

[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]

tags 29550 + patch
quit

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Glenn Morris <rgm@gnu.org> writes:
>
>> Previous times this came up:
>> http://lists.gnu.org/archive/html/bug-gnu-emacs/2005-04/msg00182.html
>> (a prolific and, err, idiosyncratic reporter)
>>
>> http://lists.gnu.org/archive/html/emacs-devel/2006-02/msg00414.html
>> (previous maintainer)
>>
>> http://lists.gnu.org/archive/html/emacs-devel/2006-02/msg00395.html
>> (previous+N maintainer)
>>
>> Obviously, this calls for a poll!
>>
>> (Please don't have a poll.)
>
> :-)
>
> I think it makes sense to have this command disabled by default.  It's a
> lot more dangerous than several of the other commands that are
> disabled...

I agree with Lars here, and Stefan Monnier in the above thread, that
it should be disabled.

I don't really understand the basic controversy here.  It should at
worst be a minor inconvenience for anyone who do wish to use it, while
it could save many other users some big headaches.

So I'll just jump in at the deep end and ask... Are there any
objections to the attached patch?

Best regards,
Stefan Kangas

[-- Attachment #2: 0001-Disable-not-modified-command-by-default.patch --]
[-- Type: text/x-patch, Size: 892 bytes --]

From d676fbb543c04a7f258f564214812a627e609000 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Sun, 29 Sep 2019 02:02:06 +0200
Subject: [PATCH] Disable not-modified command by default

* lisp/files.el (not-modified): Disable command by
default.  (Bug#29550)
---
 lisp/files.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lisp/files.el b/lisp/files.el
index 09180fd555..f3bb23738d 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -5537,6 +5537,9 @@ clear-visited-file-modtime
 Next attempt to save will not complain of a discrepancy."
   (set-visited-file-modtime 0))
 
+;; This command could cause data loss for unsuspecting users.
+(put 'not-modified 'disabled t)
+
 (defun not-modified (&optional arg)
   "Mark current buffer as unmodified, not needing to be saved.
 With prefix ARG, mark buffer as modified, so \\[save-buffer] will save.
-- 
2.20.1


  parent reply	other threads:[~2019-09-29  0:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-03 23:19 bug#29550: 27.0.50; `not-modified' should be disabled by default Göktuğ Kayaalp
2017-12-04  3:37 ` Eli Zaretskii
2017-12-04 17:58   ` Glenn Morris
2017-12-05 10:06     ` Göktuğ Kayaalp
2018-04-15 19:06     ` Lars Ingebrigtsen
2017-12-05  9:49   ` Göktuğ Kayaalp
2019-09-29  0:06 ` Stefan Kangas [this message]
2019-09-29  7:20   ` Eli Zaretskii
2019-09-29  7:35     ` Stefan Kangas
2019-09-29  7:59       ` Eli Zaretskii
2019-09-29  8:01     ` Lars Ingebrigtsen
2019-09-29  8:28       ` Eli Zaretskii
2019-09-29  8:58       ` Andreas Schwab
2019-09-29 10:05         ` Lars Ingebrigtsen
2019-10-04 18:38           ` Göktuğ Kayaalp
2019-10-04 19:40             ` Eli Zaretskii
2020-08-10 14:02               ` 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=CADwFkmk0ySi2pev+8Y4ZtndKqrr1gN7UsEtk0bQzdCnBoiM+tw@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=29550@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=self@gkayaalp.com \
    /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.