From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#50946: insert-file-contents can corrupt buffers. Date: Sun, 03 Oct 2021 20:36:04 +0300 Message-ID: <8335pi80zf.fsf@gnu.org> References: <83pmsnbnci.fsf@gnu.org> <83k0ivbjbu.fsf@gnu.org> <83czonbhex.fsf@gnu.org> <83lf3a8eo7.fsf@gnu.org> <83czom870a.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37427"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50946@debbugs.gnu.org, joaotavora@gmail.com To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 03 19:38:45 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mX5Rl-0009TQ-JU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 19:38:45 +0200 Original-Received: from localhost ([::1]:48066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mX5RY-0005kC-8E for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 13:38:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mX5Q6-0005Dr-7C for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 13:37:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51553) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mX5Q5-0008DD-VV for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 13:37:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mX5Q5-0005uK-Ry for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 13:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Oct 2021 17:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50946 X-GNU-PR-Package: emacs Original-Received: via spool by 50946-submit@debbugs.gnu.org id=B50946.163328258722662 (code B ref 50946); Sun, 03 Oct 2021 17:37:01 +0000 Original-Received: (at 50946) by debbugs.gnu.org; 3 Oct 2021 17:36:27 +0000 Original-Received: from localhost ([127.0.0.1]:34866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mX5PX-0005tS-3U for submit@debbugs.gnu.org; Sun, 03 Oct 2021 13:36:27 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mX5PV-0005tE-6k for 50946@debbugs.gnu.org; Sun, 03 Oct 2021 13:36:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53376) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mX5PP-0007dR-R5; Sun, 03 Oct 2021 13:36:19 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2368 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mX5PL-0002lD-JK; Sun, 03 Oct 2021 13:36:19 -0400 In-Reply-To: (message from Alan Mackenzie on Sun, 3 Oct 2021 17:21:35 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216287 Archived-At: > Date: Sun, 3 Oct 2021 17:21:35 +0000 > Cc: joaotavora@gmail.com, 50946@debbugs.gnu.org > From: Alan Mackenzie > > > So the text you propose is too "frightening", in that it basically > > says "don't use that". Which is too tough, because valid use cases to > > use that feature do exist, and if the programmer knows what he/she is > > doing it doesn't have to produce garbled buffers. For the manual, we > > need more informative text, which mentions coding-system-for-read. > > OK, how about this third version of my patch? LGTM, thanks.