From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YDcZJ1cTjWEoiAAAgWs5BA (envelope-from ) for ; Thu, 11 Nov 2021 13:57:59 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id ADu2IlcTjWG6RQAAbx9fmQ (envelope-from ) for ; Thu, 11 Nov 2021 12:57:59 +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 6B5B6370B3 for ; Thu, 11 Nov 2021 13:57:58 +0100 (CET) Received: from localhost ([::1]:43878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ml9eM-0001Ii-Nt for larch@yhetil.org; Thu, 11 Nov 2021 07:57:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ml9dQ-0001H6-S5 for emacs-orgmode@gnu.org; Thu, 11 Nov 2021 07:56:59 -0500 Received: from [2607:f8b0:4864:20::102c] (port=36557 helo=mail-pj1-x102c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ml9dO-000310-Tm for emacs-orgmode@gnu.org; Thu, 11 Nov 2021 07:56:56 -0500 Received: by mail-pj1-x102c.google.com with SMTP id n15-20020a17090a160f00b001a75089daa3so4561718pja.1 for ; Thu, 11 Nov 2021 04:56:53 -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=vBspjDJ2jXB40l4XxHhV0aOkjd2xAg6D0wppHYrlZEE=; b=krQES+bK7+ButURonNcvZFUFZeHIPJd9RMoA5RrFubos2a9g+zac6EU4kLTQLBGAgA Wj2LhG9IoSpwqY/gmEZ7+ePe6USXp07Qo2pTIh+tTfvtAYOTSPy94VkjS/CtPzOCuCOJ Qa5NHClRere3Ga7Aji2hc1xF59N8XONGpZ0IKLfEqarf3ILQQhj9BK/r9hYE3OgwvPNf zSvzL2J50UCSk0ABngE2iJ6UNAXqtG20aYkVQ8MRjIzdl3xmfwx+arS71+FQs4H9mBA0 9ZbkdzpqyvUCPYg3JksVy4Zb5vEbJ99hyOGhIYgK7Y//+tei9Wq9aCv/SRYCZVNaEVJK E9LA== 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=vBspjDJ2jXB40l4XxHhV0aOkjd2xAg6D0wppHYrlZEE=; b=kDHgdWoa1DkuJRKiWljWtoGWOwDvGlqQWsdAq3ZKrQjwWlyxGzzTDDbEi8CdYRKfXv mpnAK1sYNYjBbozXVqaVpyO1ncP/QAQ17ubxs/CHCch99ZEKgkXDmGpAwv1JsA5GYNhE UQ2Oa+R2ZK74/f6lz9nzD2jx+mAAY02eRIQCxCmhKlCpWTFOHfcoz9+9DMfUCSxyR8a9 EgFsikbq4lFB9hQzD/YcmR3m8stJqsFeIdZ0O4EsqCYtqGeAL5R/lesbOM4OxVVZo7qK +JS/EwBNoPvPihcNfrzt3hlWo4E3cziEQ669jyT5sx7cVQcNYZdWeVC1rbRdfNItr1YB 8sKA== X-Gm-Message-State: AOAM533DHlMYGwgmgPhozNjAuw4p+HL7h9kcMc0WTd27MiAo4iLGQAjJ 8w6ov8pgxTfVWsOA5ibEbAI= X-Google-Smtp-Source: ABdhPJxGaUe075LkdaDlTBc7zT6paQ3JrshcF6sWIPo9RTXLnQR5g3rLiAPcL7tr/UVL+AOeceWJRg== X-Received: by 2002:a17:902:e5c9:b0:142:53c4:478d with SMTP id u9-20020a170902e5c900b0014253c4478dmr7231688plf.33.1636635412614; Thu, 11 Nov 2021 04:56:52 -0800 (PST) Received: from localhost ([103.125.234.210]) by smtp.gmail.com with ESMTPSA id n16sm2460843pja.46.2021.11.11.04.56.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Nov 2021 04:56:52 -0800 (PST) From: Ihor Radchenko To: Max Nikulin Subject: Re: table and Cyrillic characters: org-element--cache: Unregistered buffer modifications detected. Resetting In-Reply-To: <5e0a2e13-41ed-b0fc-6cb6-625d4bb164de@gmail.com> References: <875yszmgvi.fsf@smoon4.bkoty.ru> <87wnlfkzk2.fsf@localhost> <5e0a2e13-41ed-b0fc-6cb6-625d4bb164de@gmail.com> Date: Thu, 11 Nov 2021 20:58:16 +0800 Message-ID: <87sfw2luhj.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::102c (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102c.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=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: Vladimir Lomov , emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636635478; 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=vBspjDJ2jXB40l4XxHhV0aOkjd2xAg6D0wppHYrlZEE=; b=aFEMZzE4CVxEq3vJgdR43Am/JgQb3lHIAqrvxfPIfaEARjLla2hMY56pRyVRh9+PITUGaB tDOuBqg6mVEjLzzwsElTCARpbiyzedZVACE222cP0nd9f9f9T3UzLN84Cz1FC0CgbDjbIL zHgQYKIiQwY+1cmEQXwBg07I2/cNCW3PmCW0rs0a3i/BII9s9QlSrsRe94Ynuw05UknQ9U ZBR0at6ErJzdMTY5wrhbF7+aDJLYmbPz/v+1ua9XCIEJqaByY1Uun7+GpxTdH63s27LmoQ 0AXo4TKiAV8P318sSo8cuonZreZ+1H3mvwvPR+rlzjwil+fM21Z3mXXyvPVPVg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636635478; a=rsa-sha256; cv=none; b=JCnJp+MIVNd1G2b6DdKb7XDml+kXsMA8acVhy71z3MsN36p/bSB6DOKak7Y015SIJKhCAr K3cuYmWE+6sd+TmaJXkRM1HlQOG3LRqLp7bYvK6CLT/+6/DrI6YQWvwJgzjksgoCrbaMcJ cUAFAdRBB519e/KSxLuN16wSlQV86KgKcVWcW7HgZAL0SSvLwOF8du8M/Rb7KAntV5+m1O 1dFBUxo+xsc6YsfTre5YrL44E+h5IflJe3xZetBmDZj3KC1OjiqGNr1s3v6z4gA829yzFB 1vE8sAiV4kl774jT4MRxXGdA0NRhyhJj6wR+qLTUiRZzDlShFWXKq11Ew2jfgg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=krQES+bK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.53 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=krQES+bK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 6B5B6370B3 X-Spam-Score: -3.53 X-Migadu-Scanner: scn1.migadu.com X-TUID: W8laKBLKBZBX Max Nikulin writes: > On 11/11/2021 13:50, Vladimir Lomov wrote: >> ** Ihor Radchenko: >> >>> Vladimir Lomov writes: >>>> Warning (emacs): org-element--cache: Unregistered buffer modifications detected. Resetting. >> >>> Are you able to reproduce with emacs -Q? > > I can confirm it starting with a simple file > > ---- >8 ---- > | 1 | > ---- 8< ---- > > LANG=en_US.UTF-8 emacs -Q -L ~/src/org-mode/lisp/ cyrtable.org > > C-\ russian-computer RET to switch input method > TAB to create a new cell > Any letter Confirmed I can also reproduce with russian-computer and at least arabic. Seems to be an issue with non-latin input methods. The warning is triggered because return value of buffer-chars-modified-tick with non-latin input method changes _before_ text is inserted. If I add debug-on-entry for self-insert-command or org-self-insert-command, buffer-chars-modified-tick changes twice: (1) some time after pressing the keyboard key but before entering self-insert function (symbol is not inserted into buffer); (2) after actual insertion. The problem happens in non-Org buffers as well and with emacs -Q. org-element-cache relies on the return value of buffer-chars-modified-tick to control if all the changes in buffer are reflected in the cache. The docstring says: >> By comparing the values returned by two individual calls of >> buffer-chars-modified-tick, you can tell whether a character change >> occurred in that buffer in between these calls So, what we observe looks like a Emacs bug. On Org side, this bug is very bad news. We cannot wait for the Emacs fixing the bug - older Emacs versions will still be affected. Alternative ways to control buffer modifications are buffer-hash and secure-hash. In the past, I had some random failures when buffer-hash did not reliably reflect buffer updates. The only alternative is secure-hash, but I am not sure about it's performance. buffer-hash docstring says that "It should be somewhat more efficient on larger buffers than secure-hash is, and should not allocate more memory.". So, I need to test the actual performance on large buffers before switching from buffer-chars-modified-tick to secure-hash. Also, I am somehow unable to reproduce the problem in my private Org branch. Maybe there is some alternative fix without getting rid of buffer-chars-modified-tick. Vladimir, if the issue is affecting your workflows, you can disable org-element-cache until we fix the bug. Just set org-element-use-cache to nil in your config before loading Org. Best, Ihor