From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrew Hyatt Newsgroups: gmane.emacs.bugs Subject: bug#53294: 29.0.50; Indirect font changes incorrectly affecting original buffer Date: Sun, 16 Jan 2022 10:28:40 -0500 Message-ID: References: <835yqkyqzw.fsf@gnu.org> <83lezfybc9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14399"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 53294@debbugs.gnu.org To: Eli Zaretskii , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 16 16:29:14 2022 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 1n97Sz-0003X9-Oj for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 Jan 2022 16:29:13 +0100 Original-Received: from localhost ([::1]:34830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n97Sy-0002ni-9D for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 Jan 2022 10:29:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42978) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n97So-0002nZ-2Z for bug-gnu-emacs@gnu.org; Sun, 16 Jan 2022 10:29:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51166) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n97Sn-00025H-Pe for bug-gnu-emacs@gnu.org; Sun, 16 Jan 2022 10:29:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n97Sn-0000BF-Mi for bug-gnu-emacs@gnu.org; Sun, 16 Jan 2022 10:29:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrew Hyatt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Jan 2022 15:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53294 X-GNU-PR-Package: emacs Original-Received: via spool by 53294-submit@debbugs.gnu.org id=B53294.1642346929673 (code B ref 53294); Sun, 16 Jan 2022 15:29:01 +0000 Original-Received: (at 53294) by debbugs.gnu.org; 16 Jan 2022 15:28:49 +0000 Original-Received: from localhost ([127.0.0.1]:44069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n97Sb-0000An-KG for submit@debbugs.gnu.org; Sun, 16 Jan 2022 10:28:49 -0500 Original-Received: from mail-qv1-f48.google.com ([209.85.219.48]:36475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n97SZ-0000Aa-Cu for 53294@debbugs.gnu.org; Sun, 16 Jan 2022 10:28:47 -0500 Original-Received: by mail-qv1-f48.google.com with SMTP id c2so6081775qvw.3 for <53294@debbugs.gnu.org>; Sun, 16 Jan 2022 07:28:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=S6uA7uUREWXz8k+8v3MqeHNVRdBkf+3CwQm66IVZMzw=; b=lR6JPC207eVPk7rINd2ciMAoY/lUO6mq4jzeWC5WyiG6Gzp0ba6nyuXuS/3c4GJ2tb 5eBLd3orvOE/yKgmYIXYRFsXPGSlQuvpeAlyhzk93DBS2q4xjeqPx6ciSAJvBSxxKZn8 eJE71jQk8nEz3f14SQQv2yFkTLcQrLNdPmp6PNtOl+Br+jmQ3Be3HdvYg0K99n9dI1Ob UDgDwXJUt3LekokakYNnevn/8E6iZdtk14S22EHYx4hoSuEDXgPSnW0XtGiBMSqDyeT4 eJZhHsYkYf1RS/qSepWP9jtCLOwmTWlGFZyuri13fu6zppSc8pcGkz6lgDUKCZxJ1SjS 146g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=S6uA7uUREWXz8k+8v3MqeHNVRdBkf+3CwQm66IVZMzw=; b=A2QAhhyEvcy6fVpMmCeRNlO+pYjFqeS1C5YJxsk3T40rjJ/Ab15bXv1rZ91QlIhqxp 5lT54g1sQhhI4N0vv42rkYNGRenSIf6WksL6qGOzakSu5RMHJTAAHBwGx0sWHDjJotbU b54FQY4TqrMCobvf0iLCAaECvftdPHq9g+wiJriK7GWOIBAqFcoKa1A1fSTsh4tNbtUr IkBYW6mDh35mEB8k1YYm0rvyEcLpaXA7s+NN7OFS9iOZkkscSRlFpXq7dOnfUeeuHOga 2UbpFoUMkLpsh8ksXpKwmv5xl2yZBk4iuYJQV3p79cGrcfLc+yoFhg6DC3r/9OIhnGQ2 1UsQ== X-Gm-Message-State: AOAM533Mm0DsPtH2W3uBBb190pRPbxJqNVRif1rsKhSB7IopHIWUFE4P GvSfK+aH97D7FFnHK/PDgOgfGaHUBfs= X-Google-Smtp-Source: ABdhPJwi9qqwvF+gJ0rzqikH1GANyLMdUv7nx6CW/Q4R8mLTRq2wDeEJLY6hg0Ko10TEOKgpIylm3g== X-Received: by 2002:a05:6214:2489:: with SMTP id gi9mr5841915qvb.114.1642346921350; Sun, 16 Jan 2022 07:28:41 -0800 (PST) Original-Received: from andrews-mbp.lan (pool-173-56-75-166.nycmny.fios.verizon.net. [173.56.75.166]) by smtp.gmail.com with ESMTPSA id z20sm367796qtj.66.2022.01.16.07.28.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jan 2022 07:28:40 -0800 (PST) In-Reply-To: <83lezfybc9.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:224389 Archived-At: On Sun, Jan 16, 2022 at 05:00 PM Eli Zaretskii wrote: >> From: Andrew Hyatt Cc: 53294@debbugs.gnu.org >> Date: Sun, 16 Jan 2022 09:43:16 -0500 Yes, the non-nil CLONE >> argument is essential to reproduce. But that just means the >> indirect buffer will inherit the state from the direct buffer. >> It doesn't imply that changes made to the indirect buffer's >> state will affect the original buffer, which is what is >> happening here. > > But "inheriting" the state means the indirect buffer gets the > copy of the variables of the original buffer, and that is not a > deep copy, AFAIU. > > Stefan, any comments on this issue? Sorry, I may have been unclear. I'm not disagreeing - what you just said is correct. But, because of that, it's a bug for code to make an indirect buffer, then perform operations on it via setcdr or setf like things, which then will affect the original buffer's variables. Alternatively, it'd perhaps would be a better fix to make the indirect buffer's copy a deep copy instead of the shallow copy it is now, so that these situations don't arise. I don't have a patch for that, though, but could create one if you thought it was a good idea.