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. [Was: bug#50946: Emacs-28: Inadequate coding in hack-elisp-shorthands] Date: Sun, 03 Oct 2021 19:20:07 +0300 Message-ID: <837deu84i0.fsf@gnu.org> References: <831r54einq.fsf@gnu.org> <871r54xnds.fsf@gmail.com> <87ee933bcj.fsf@gmail.com> <83pmsnbnci.fsf@gnu.org> <83k0ivbjbu.fsf@gnu.org> <83czonbhex.fsf@gnu.org> <83lf3a8eo7.fsf@gnu.org> <87y27at950.fsf@gmail.com> <83bl4685m2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34559"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50946@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 03 18:21:12 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 1mX4Ei-0008oX-NA for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 18:21:12 +0200 Original-Received: from localhost ([::1]:38872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mX4Eh-0006Gw-Nb for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 12:21:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mX4EY-0006Dn-Ul for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 12:21:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51485) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mX4EY-0001gn-MJ for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 12:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mX4EY-0003tQ-Ej for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 12:21:02 -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 16:21:02 +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.163327804914920 (code B ref 50946); Sun, 03 Oct 2021 16:21:02 +0000 Original-Received: (at 50946) by debbugs.gnu.org; 3 Oct 2021 16:20:49 +0000 Original-Received: from localhost ([127.0.0.1]:34798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mX4EL-0003sa-Ks for submit@debbugs.gnu.org; Sun, 03 Oct 2021 12:20:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mX4EH-0003sJ-Aq for 50946@debbugs.gnu.org; Sun, 03 Oct 2021 12:20:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52188) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mX4EB-0008Ip-QX; Sun, 03 Oct 2021 12:20:40 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1644 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 1mX4Dt-0008FP-1U; Sun, 03 Oct 2021 12:20:31 -0400 In-Reply-To: (message from =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= on Sun, 3 Oct 2021 17:02:04 +0100) 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:216274 Archived-At: > From: João Távora > Date: Sun, 3 Oct 2021 17:02:04 +0100 > Cc: 50946@debbugs.gnu.org > > > > A bigger problem is that hack-local-variables--find-variables isn't > > > defined at that point and the function will then be used to load > > > lisp/files.el itself (which happens to be where h-l-v--f-v is defined). > > > > You are talking about loadup? We can easily condition the call by > > that function's being fboundp, no? Preloaded files, at least those > > loaded before file.el, should not use shorthands, so bypassing the > > call should not produce any problems. Am I missing something? > > No, fboundp also works, probably. Do you prefer that to a hook? > A hook is, in theory, more powerful. Well, using a hook in our own sources is IMO ... "icky". So yes, I prefer the fboundp test. And then shorthands.el will deal with stuff other than loading, which I think is a Good Thing. Thanks.