From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#50946: insert-file-contents can corrupt buffers. Date: Sun, 3 Oct 2021 18:19:44 +0000 Message-ID: References: <83k0ivbjbu.fsf@gnu.org> <83czonbhex.fsf@gnu.org> <83lf3a8eo7.fsf@gnu.org> <83czom870a.fsf@gnu.org> <8335pi80zf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35645"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50946@debbugs.gnu.org, joaotavora@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 03 20:20:16 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 1mX65v-00096H-QG for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 20:20:15 +0200 Original-Received: from localhost ([::1]:38344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mX65u-0006R7-0V for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 14:20:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mX65i-0006Qw-3T for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 14:20:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51612) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mX65h-0000KU-SS for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 14:20:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mX65h-00076b-Is for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 14:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Oct 2021 18:20: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.163328519727297 (code B ref 50946); Sun, 03 Oct 2021 18:20:01 +0000 Original-Received: (at 50946) by debbugs.gnu.org; 3 Oct 2021 18:19:57 +0000 Original-Received: from localhost ([127.0.0.1]:34925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mX65c-00076C-Py for submit@debbugs.gnu.org; Sun, 03 Oct 2021 14:19:56 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:29099 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1mX65X-00075w-Fo for 50946@debbugs.gnu.org; Sun, 03 Oct 2021 14:19:54 -0400 Original-Received: (qmail 98878 invoked by uid 3782); 3 Oct 2021 18:19:45 -0000 Original-Received: from acm.muc.de (p4fe1506f.dip0.t-ipconnect.de [79.225.80.111]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 03 Oct 2021 20:19:45 +0200 Original-Received: (qmail 8055 invoked by uid 1000); 3 Oct 2021 18:19:44 -0000 Content-Disposition: inline In-Reply-To: <8335pi80zf.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:216294 Archived-At: Hello, Eli. On Sun, Oct 03, 2021 at 20:36:04 +0300, Eli Zaretskii wrote: > > 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. Thanks, I've committed it to the emacs-28 branch. -- Alan Mackenzie (Nuremberg, Germany).