From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= 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, 3 Oct 2021 17:02:04 +0100 Message-ID: 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: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34112"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50946@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 03 18:03:56 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 1mX3y0-0008et-7v for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 18:03:56 +0200 Original-Received: from localhost ([::1]:51856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mX3xv-0003F0-G5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 12:03:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mX3x9-0001zj-5N for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 12:03:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51476) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mX3x8-0007mY-OE for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 12:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mX3x7-0003Pm-Js for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 12:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Oct 2021 16:03: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.163327694313073 (code B ref 50946); Sun, 03 Oct 2021 16:03:01 +0000 Original-Received: (at 50946) by debbugs.gnu.org; 3 Oct 2021 16:02:23 +0000 Original-Received: from localhost ([127.0.0.1]:34789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mX3wU-0003On-SK for submit@debbugs.gnu.org; Sun, 03 Oct 2021 12:02:23 -0400 Original-Received: from mail-pj1-f48.google.com ([209.85.216.48]:55813) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mX3wS-0003OZ-GD for 50946@debbugs.gnu.org; Sun, 03 Oct 2021 12:02:21 -0400 Original-Received: by mail-pj1-f48.google.com with SMTP id pg10so9385586pjb.5 for <50946@debbugs.gnu.org>; Sun, 03 Oct 2021 09:02:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=zh8mj1i9M5MsFMuiIBcvEJsx21VHO5FeljO9AC1ybqM=; b=VNO+3JvdSQQAYiSJj3NKMYMpcV64om1zeUX92+BZGnqpKEsBmIkZU7gFJepNDIkF+z K02UxkF2zWdwaxeK/fJHGoNXNZvddcMT5XLd54G4B84GBs8LRfNKkp9JkwPushlhG7sx K7uq347DzOqoBZqYsWFGCgjmNUD7f0rjs4xkHWmTtLDXrsHNrQLvUZGBAgxS9E+Z4Sec lUBs8vwk0zfu/xOTKFTeW/v5nhsFzce5JssODVUyfh0EjgvT9GYUWSCgyLPGi1BkUgWj /qBgzg3ptRihn6d1DRBoTPb3SJX2tvPNYNaZyUmuIhbcUX5Nt7Nd060TLxXG6Ai06yNJ fCJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=zh8mj1i9M5MsFMuiIBcvEJsx21VHO5FeljO9AC1ybqM=; b=z2ahXDPzbsOKSvlnkLERXxiv4aM2hR9Mw5E/nvg/b+oyjDykFqUhvCUW/YqvdE/UB3 fZYnCFQY8Hn/x9xyCGheilLyhhuIXe/c0f5omW2ywLYxw3YBlWdcqv7VYvhXvucfp96w kgrZwZz0jI9qZjNmduxHNMD13Jv1t9RGPVl8lpdxnbkwoQ39oak5P/6nRoeEQDa2dYnN BxDHe/GyIIQ7N+ARofuMUK2b5CJlyS7AbUPX7/hKk8uA5IlHtjxWtzB8C97YrjzI5wGP WsaSUChPV2oTAYfpzAunoIg9gLUcQqvrp1pZqruk7YcpthJ2olD+uF2CXTWctRKy7Uo8 3JMA== X-Gm-Message-State: AOAM531edGqtqxH1BLeJGPYNWSpxthuYkyd/hJR21acD36FNj3ZrjZ9z SUO85tszFhr2VDzELHV/IPtIuSOeaU+6bhaAwhPUEsRe X-Google-Smtp-Source: ABdhPJwqo1wfEv9OlhD/ZZ6N1Ru2Li5iRLcoiFKsEk5qEghOVRgUxLSRNRxjPa6QFPrKRtc1vFs1O86gVdLKSkRtOw8= X-Received: by 2002:a17:90a:5a86:: with SMTP id n6mr25172769pji.3.1633276934071; Sun, 03 Oct 2021 09:02:14 -0700 (PDT) In-Reply-To: <83bl4685m2.fsf@gnu.org> 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:216272 Archived-At: On Sun, Oct 3, 2021 at 4:56 PM Eli Zaretskii wrote: > Why "icky"? The whole load-with-code-conversion stuff is defined > there, so that's a natural place for any things that need to be done > during loading, IMO. "_Slightly_ icky", because that file is supposed to be about coding systems and internationalisms, at least so I presumed. So coupling it to a concept such as shorthands (which is defined after) is _slightly_ icky. But not the end of the world. > > 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. Jo=C3=A3o