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 20:59:55 +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> <837deu84i0.fsf@gnu.org> <87pmsmavj6.fsf@gmail.com> <83y27a6lh8.fsf@gnu.org> <87ilyeaq9f.fsf@gmail.com> <83r1d17upy.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="31393"; 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 22:01:19 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 1mX7fj-0007xL-GC for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 22:01:19 +0200 Original-Received: from localhost ([::1]:38934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mX7fh-0002Eg-Co for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 16:01:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mX7fT-0002EW-TO for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 16:01:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51727) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mX7fS-0005Pa-2y for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 16:01:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mX7fS-0001GI-1G for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 16:01:02 -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 20:01: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.16332912134783 (code B ref 50946); Sun, 03 Oct 2021 20:01:01 +0000 Original-Received: (at 50946) by debbugs.gnu.org; 3 Oct 2021 20:00:13 +0000 Original-Received: from localhost ([127.0.0.1]:35040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mX7ef-0001F4-EJ for submit@debbugs.gnu.org; Sun, 03 Oct 2021 16:00:13 -0400 Original-Received: from mail-pl1-f174.google.com ([209.85.214.174]:33400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mX7ec-0001Do-G5 for 50946@debbugs.gnu.org; Sun, 03 Oct 2021 16:00:11 -0400 Original-Received: by mail-pl1-f174.google.com with SMTP id t4so1757545plo.0 for <50946@debbugs.gnu.org>; Sun, 03 Oct 2021 13:00:10 -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=VHj4LBH52aPp9kONMlXokDbm4jgd7Z1gLtcjBHoNpYg=; b=Yj8Je/cjZRv+AvXlRnkWurxYagDtAoB0QS0hUD76pBi24NsjS10iy2Hi6OKQuZUEbA dhYD2pfQz6grge6EwyclxA2pd92lnu/RQC44eVZMTfJEAXRjOV7w/OadfoRuCc9pN64F 2Sfi58zBJnqrhQD1ICCxYDlXeIl5BE1LiedG+Ixhh5bw6SRgx0vpvvc8isVoOGf2mFsl y6q2Co+05b2KeqWHNhj1Y8yluUYfN6G5FrWZmCjycKJBIjTrrMpuzW6REcQskd45Avgp a43W9pjuMaklqTeK8dZPHSEwJsHea6SyFcWNb9Cf0rR+atKvUMUe4Xea3eLfou3TyOOO WdMQ== 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=VHj4LBH52aPp9kONMlXokDbm4jgd7Z1gLtcjBHoNpYg=; b=jK63QVy44l0ldOI8O+dFuApN4Nc1+E2SCSMedJ5N5L9/9AkOmPqxabLK4KO4QSwZx4 T/CA3PwxkQgkE0C5zN+X6c+zfwZH5Ge/LS651W7l0IsiT3lnh7lpOwGr+Usb0b7uMNZB ERoYuuq2dTnFS9qKB0uRVsE6Ml03pid5931bGmlm3SaGMc668EdrILcuf2DqMs/L/lTP cW8GeBQhA8Dd0e32qs5lTihD/c1VJ/+waSpeGbrhWc8ZzV8bmO93c5/J/cnj2/OXyroT yMv3lVFWnDbqx3pjG3MDM7H3HhknEa125jD2is3MJIOVGqKzEPTjicNqs4pThBF2FStH 6j8g== X-Gm-Message-State: AOAM532tZoSpyA3Ka5w0J1LNr6H1U+djQVsjSZVaqoTHwUh5IcltJfjG RhCjhAB7mbhj2PaCHKk9IBoNZ9pxA3DeKc+xVa+SK5HO X-Google-Smtp-Source: ABdhPJyTBRz9PyQYgEHN5eGxnblP76qxir4HTqFJYWjlGq6WFlsorRXZx/nuKo/1UGhsPmFLOTFy8/Sursa+/wngdys= X-Received: by 2002:a17:902:bcc6:b0:138:d3ca:c356 with SMTP id o6-20020a170902bcc600b00138d3cac356mr19559352pls.6.1633291204364; Sun, 03 Oct 2021 13:00:04 -0700 (PDT) In-Reply-To: <83r1d17upy.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:216308 Archived-At: On Sun, Oct 3, 2021 at 8:51 PM Eli Zaretskii wrote: > > Given you dislike hooks, the patch with > > hack-read-symbol-shorthands-function is below. Looks good? > > I like it slightly less than my proposal, because it spreads the > arrangement over 3 files instead of just 2. No, you're not counting right, or I'm not. I count only 2 in my arrangement= . In my arrangement, loadup.el knows nothing about the agreement between mule.el and shorthands.el. So it's the same, but without the negative "inhibit" logic and mule.el knowing about a function in files.el, which is loaded after it. It's shorthands.el who knows about two things loaded before it: a variable and a function, as it The Right Thing. Which reminds me, shorthand.el should (require 'mule) > But if you want a hook so badly, I won't fight. I don't want it badly, I just think it's simpler and easier to reason about= . The version I propose uses a "-function" variable instead of a hook. > Just put a comment in mule.el describing how we arrange for this to start > being in effect. I have, already. Jo=C3=A3o