From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +KufFg6lumEB2QAAgWs5BA (envelope-from ) for ; Thu, 16 Dec 2021 03:31:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oAIoEg6lumGROwAAbx9fmQ (envelope-from ) for ; Thu, 16 Dec 2021 02:31:42 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D455217CF6 for ; Thu, 16 Dec 2021 03:31:41 +0100 (CET) Received: from localhost ([::1]:44542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxgYV-0000Qo-Q5 for larch@yhetil.org; Wed, 15 Dec 2021 21:31:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxgWz-0000QP-8r for emacs-orgmode@gnu.org; Wed, 15 Dec 2021 21:30:05 -0500 Received: from [2a00:1450:4864:20::42c] (port=36501 helo=mail-wr1-x42c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxgWw-0006yo-L6 for emacs-orgmode@gnu.org; Wed, 15 Dec 2021 21:30:04 -0500 Received: by mail-wr1-x42c.google.com with SMTP id u17so41413603wrt.3 for ; Wed, 15 Dec 2021 18:30:01 -0800 (PST) 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; bh=mqweLjn7P5yfV8flcNBnhBMX4bKk/maGqtVdo4/Utis=; b=aBvSTj62bDUu5Y1CvG0WSZUbUhSTCjGuTARtxL6Qm0IOtXiexlCyuF1jsXuHCAHlNP o0IOSa8DZMuqTcNDqWPHvlyYWGNCuKUmYzx2qtQeCPggsBSIerO0BJ3wJ0lm/WkBzYQ6 1mZ0zb22H2n6ky/vQUaYztwCSnmwUnfC3FZ1mYmSv6uF+A7Hq9SzlImpCPiOpGty7tHD +SpuCxTn/XV7cFIp8bae7mSDhA4M2f1Xr57ejWkQKDGYM5EkIhF+vKfrWdzDZaP5PGFW V9QdIGYLZP1AhQ4yhCWdDb/5tjEc5+A39xFwl4EGMUULyTdoobvGisPdCoFtaDPzrQCK DzqQ== 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; bh=mqweLjn7P5yfV8flcNBnhBMX4bKk/maGqtVdo4/Utis=; b=FRgJBS10cODzScpmOBVE2rgqfU8+VnuZ5WbA18+3OmMzW1mt6wJzRrJ8tegWt6/rJL vh/NXj/F+WZE/S1XIWZLx3c5/0dRP+4hXoiApWg7FJ6IHbcfSTcLv/ZWGP1ESEUGFqRM yrkRvIMS6nmCGAVzuy+OmZTHch6spSL1YQbSbppxHJJHABsiG7Ci3u5qTpE6d3VYr5YQ ajXkH1iOHQKplIiP4WX5ldHnZ1ASuWwHe8e91Q4ek6FfZb4iSo1tz2Qnq+eBs9EcwgqW cdwZ1VoMuhQEWPAe1Dh9hvZxfppCpvRrQlb6/7k+yu5Dq4Wl6Ecsq3ARa9UHk9fM6rsc Cr2w== X-Gm-Message-State: AOAM532inhqAngZVQtMAyBrOVjkgZP9mCsY8xrGftPSf0R0kPXJ2EtN1 UxN2CebDUdCT9aHnUKiQwVj1Bk++WDBz7fF3ohY= X-Google-Smtp-Source: ABdhPJy9GSX6O8WxSRZJq7b9OtAElaqDvbHecxP9S7yp4wvtCQWKQaIrHdcDIAuXqKyh3b/NAvXYJ5JeLWknpGRAcLE= X-Received: by 2002:a5d:6c67:: with SMTP id r7mr6870258wrz.286.1639621799936; Wed, 15 Dec 2021 18:29:59 -0800 (PST) MIME-Version: 1.0 References: <87y25ztcgr.fsf@localhost> In-Reply-To: <87y25ztcgr.fsf@localhost> From: Kaushal Modi Date: Wed, 15 Dec 2021 21:29:23 -0500 Message-ID: Subject: Re: [BUG] org-element--cache gives "Unregistered buffer modifications" warning [9.5 (9.5-g859984 @ /home/john/.emacs.d/straight/build/org/)] To: Ihor Radchenko Content-Type: multipart/alternative; boundary="000000000000f3848f05d33a32c7" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=kaushal.modi@gmail.com; helo=mail-wr1-x42c.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-org list , John Mathena Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639621901; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=mqweLjn7P5yfV8flcNBnhBMX4bKk/maGqtVdo4/Utis=; b=O/DgecI6rL5Yqk+0/YWVIbTrQTU+p48ES0y6sKUXVuw0AECHWJO3ekHTPL3m2lgDHNwoA/ zdYTXTKKV+6LmVh13mtpECRZPGwtlLGFQ0mpkWYW7aWpLogfLxxdCnfNHg3n4aNHowN6V0 xXVRGS7frJG+tNu9q/4hjAGWt4+Lj6eWv4sS3QLUK563JT1lPr29Z5rlZ4F+RXYtS7jzeL DTS9tpQ6qTJ69ZEf7W7rDEHBFZW+JNLgZZGLQkoqtgzZINL+fpIxhEMTqtSIAfSvvf6GZ5 8cZ3h2YZxRELGeY5sDhWJGmCD7Ezomkv4co0va7T0WjMpHWSzs6aHwxTKjcDlg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639621901; a=rsa-sha256; cv=none; b=T4oFfkKKeoqphBpaFaZOTvOUeaLeOvI2ua5bMo40wK5q5GgpHpOvwF1lR/zB26Fdm1QctG Rfbxh/pvvHtP8EWcGabGGXTFMOwmx32RbvFkyFWkXESKOfWp6NqcqMNyWvY1k72ns+eZbs JrNoCFMuXDy5wwS5b75DPni7UEOP45YDKIxTyjboouzMbGhK32GpX1MU/EJCNQc9EsYG2m 4tDqrixfVv4ptNEhh/nJz71gO0Za4PvoYZIh8rf+nZGeIoGltU6vz0tCrhPYCt0SfuuiZ3 9XCqN3249WszWs7yokd0RAJW28CNdeQdTU8fVFcbIq8kZAAXvg2iyYQP+XijIw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=aBvSTj62; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.99 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=aBvSTj62; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D455217CF6 X-Spam-Score: -2.99 X-Migadu-Scanner: scn0.migadu.com X-TUID: K2DpqWl9ANBN --000000000000f3848f05d33a32c7 Content-Type: text/plain; charset="UTF-8" On Mon, Nov 8, 2021 at 1:05 AM Ihor Radchenko wrote: > > I was able to reproduce the issue. This is a bug on ox-hugo side. > `org-hugo--get-pre-processed-buffer' inserts text with > inhibit-modification-hooks bound to non-nil, which breaks > org-element-cache. The cache is enabled by default in latest Org, which > is why the issue revealed itself. > > The fix on ox-hugo side can be made similarly to the new implementation > of `org-export--generate-copy-script' - ox-hugo needs to manually reset > the cache after silent changes in temporary Org buffer. > Hi Ihor, I followed your change to `org-export--generate-copy-script' in https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=fe6cefdaaf020c315031a139a7b9bc443cbefc5c and added a `(org-element-cache-reset)' call in `org-hugo--get-pre-processed-buffer' after the `(insert ..)' in the temp buffer. But I am still seeing that warning. Ref commit to a branch: https://github.com/kaushalmodi/ox-hugo/commit/2bdbf51922ec2e01be65397b237d0b716edb5cb4 Can you help fix this? Thanks! --000000000000f3848f05d33a32c7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Nov 8, 2021 at 1:05 AM Ihor Radchenko <yantar92@gmail.com> wrote:

I was able to reproduce the issue. This is a bug on ox-hugo side.
`org-hugo--get-pre-processed-buffer' inserts text with
inhibit-modification-hooks bound to non-nil, which breaks
org-element-cache. The cache is enabled by default in latest Org, which
is why the issue revealed itself.

The fix on ox-hugo side can be made similarly to the new implementation
of `org-export--generate-copy-script' - ox-hugo needs to manually reset=
the cache after silent changes in temporary Org buffer.

Hi Ihor,

I followed your change t= o=20 `org-export--generate-copy-script'=C2=A0 in https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commi= t/?id=3Dfe6cefdaaf020c315031a139a7b9bc443cbefc5c and added a `(org-elem= ent-cache-reset)' call in=20 `org-hugo--get-pre-processed-buffer' after the `(insert ..)' in the temp buffer.

But I am still seeing that warning.


Can you help fix this?

Thanks!
= --000000000000f3848f05d33a32c7--