From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id zr5zM84lqGHtfQEAgWs5BA (envelope-from ) for ; Thu, 02 Dec 2021 02:47:58 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 8A5aLs4lqGHEcwAAB5/wlQ (envelope-from ) for ; Thu, 02 Dec 2021 01:47:58 +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 5C47A360E4 for ; Thu, 2 Dec 2021 02:47:58 +0100 (CET) Received: from localhost ([::1]:49366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msbCX-0005gS-9n for larch@yhetil.org; Wed, 01 Dec 2021 20:47:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msbBk-0005gJ-Oh for emacs-orgmode@gnu.org; Wed, 01 Dec 2021 20:47:08 -0500 Received: from [2607:f8b0:4864:20::530] (port=46039 helo=mail-pg1-x530.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msbBi-0003ER-Q5 for emacs-orgmode@gnu.org; Wed, 01 Dec 2021 20:47:08 -0500 Received: by mail-pg1-x530.google.com with SMTP id 133so7310296pgc.12 for ; Wed, 01 Dec 2021 17:47:06 -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=/jzcGIFMYyYDjJUMWa4+qhOc6BxnUAZCa0t7gvhNNTY=; b=ow99O63SIa+wdY9SoxRJprLPfI0ijHbtBSNcbv502wEfUGM43MCy9c1jQ/xvbL5212 J7qtTeZ5LfT6fnoaU9z5aZlvZg6EOivfoTmJsPBDiqFL/P154KnAdbcnVPtHEt+VVHB7 yt/cO/WC00nUJ0DFUkvmPfkC1TuJErzWB2yccHbuW1KPTpByOpn3bIKpvd4MlYDsk1pf m7QnCL2lrYUBZb2oZswU48L/QlZyK7mSGwu097I4a2G49TGovu0e8Aeaxgzfxzm1t/8F g9p83v9t2sNqUh1XmIsN6sSvhXnQrhJLkZIHvpICw3zIQt0Zx750nKfgaIMGcyGeSa6G BODw== 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=/jzcGIFMYyYDjJUMWa4+qhOc6BxnUAZCa0t7gvhNNTY=; b=n8AYmtfryiJAMo7lIW3NJ8xQmBjM3v46IEmLuPMJljzj1svWZitjBMGblL0YKg7jan Cl5vd35cWduXC+VwpH7W7BFVuHoAZtqhbdueM6vFC0NxAXI91pVoS8he/espzTS1TqAh LYL0JbnU6V+OI58MBpL4Pa6NhMmOBCLAUmVrX8DbCe50nC/SPstlwXHmgVnTHsGzmsTZ wO6pyc/M+Hw5Ei7QMp/+TfbFfWYIUyRkTV+z20W4wbdxwpwIeh/dfWOHVhJRnsbi1xOy /hCYSPrSjWiTnZtb2Ug7GuSjG8VPACZUGaICxB3F8tgIKktTrAKoD1+zMnOXdutE44zB /NsA== X-Gm-Message-State: AOAM530it+k4xwLkQX8kiDNqcl5jP3sQ25pntm6EYlpLqTX87uFm0c9O GEeW6vSaAI0JkNiSWN3IwZgiGaaZR5vbAw== X-Google-Smtp-Source: ABdhPJy9aDHQki5NBb2yzIQ2gZ973ScajdS47/GFXLG1SWTCj2M23vObc2Voty2hs9FqckqYrXQYEQ== X-Received: by 2002:a05:6a00:c8c:b0:49f:ed92:f386 with SMTP id a12-20020a056a000c8c00b0049fed92f386mr9879278pfv.8.1638409625189; Wed, 01 Dec 2021 17:47:05 -0800 (PST) Received: from localhost ([103.125.234.111]) by smtp.gmail.com with ESMTPSA id p3sm503248pjd.45.2021.12.01.17.47.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 17:47:04 -0800 (PST) From: Ihor Radchenko To: Max Nikulin Subject: Re: [BUG] C-c C-* causes "org-element--cache: Unregistered buffer modifications detected." In-Reply-To: References: <87pmr6lu1y.fsf@localhost> <87ee7jdv70.fsf@localhost> <87czmtvrbz.fsf@localhost> <871r2x953m.fsf@localhost> Date: Thu, 02 Dec 2021 09:48:30 +0800 Message-ID: <87o85z7p5d.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::530 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=yantar92@gmail.com; helo=mail-pg1-x530.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: emacs-orgmode@gnu.org 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=1638409678; 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=/jzcGIFMYyYDjJUMWa4+qhOc6BxnUAZCa0t7gvhNNTY=; b=fJcuVD/7ir6jetHJmjsXmh8QfH7XhruwzpApj28tAcjaRbJQ/0bBmu0qpnY51SrUCTXL8W jDCpRDIaDu8+zfpPVWmyL2NbOoOLzsqngc2a/Ef4INmD41/peLSC7T4Z962qaIEUkMaldh 5iraPwy3foj4xM9bxPR3DgkaWvOSWCx0y/dJbsTcjXX0rvL3XLB0E9u9PmAu6Qt/9iyoHb r1PsNJVGISNDBxjvLR9HxdTq449tNwGreTxJdIGfVkUGxiyVL2YFhY+TBLkdLqKaMQdPjY 6g0vEtajZE7sRrHDbXpvJxc7gzJqE0FTmbkYgzySZ0GrCIq9xwUCnpWNQDzPtQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638409678; a=rsa-sha256; cv=none; b=tdhts14EvP6fguR/Lw1FFtHXT1vZF16IBPgEpglrYh+Hd9gUsNJBoMUgAxO4bg1vYN8KE6 y0U/bGJw31OkvN09j3n50bisRf/VFXiM5XA/NSBiW1Vz34OsFMm3UtzFvVTO4u+8W6k545 y24N8m49+0lAgyP+8MhQ3u0XJ3JdZ/hYZcvGfqXccym3VRwEzK6SO9xZJIU7JPsPYcCaMH iKis4o1Q8zL3juuosh408wTrmj/nkttAmiRKyuFyRDz+EW526YCQQiZz4Akx3dV54F5S1v dTdxJEab3xbnHft63xKACLihuMrLPsEAo5UJbojPgA+IlCLfmxM+xV2v35pK5g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ow99O63S; dmarc=pass (policy=none) header.from=gmail.com; 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: -3.62 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ow99O63S; dmarc=pass (policy=none) header.from=gmail.com; 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: 5C47A360E4 X-Spam-Score: -3.62 X-Migadu-Scanner: scn0.migadu.com X-TUID: LRsJsUU9V8Kl Max Nikulin writes: >> Well... I added yet another exception on main. Note that this special >> case is also just in older Emacs versions. > > Ihor, have you pushed the change? I still can reproduce the issue with > Emacs-26.3 Oops. I fixed Emacs 27, but apparently not Emacs 26. Should be fixed now. >> (and I secretly hope that this kind of >> patch will be implemented by someone else as a part of tree-sitter >> integration). > > A piece of friendly trolling: it would be tree-sitter module for Org syntax. tree-sitter is comparable with org-element. org-element parser is fairly fast and also uses incremental parsing ;) tree-sitter vs. org-element on 15M Org file org-element-parse-buffer (16.090262757 1 0.7365683609999962) org-element-parse-buffer 'element granularity (7.688000744 0 0.0) 8sec tree-sitter via https://github.com/milisims/tree-sitter-org parsed down to 58% of the buffer in 5.3sec and exited with error extrapolates to ~9sec Racket's brack via https://github.com/tgbugs/laundry failed to finish parsing in reasonable time. Cancelled at 10m11.436s Clojure parser via https://github.com/200ok-ch/org-parser failed to finish parsing with java.lang.OutOfMemoryError: GC overhead limit exceeded Running time 8m28.078s So, tree-sitter may be faster, but not that much faster and we will have communication overheads when using tree-sitter module. >> The most problematic >> is the case triggered by self-insert-command, but it will not trigger >> cache reset. > > I mean namely this case of just typing text somewhere in a large file. My data is for 15M file. Indeed, things will be worse for even larger files, but let's hope that people's Org files are not yet that large and we can wait until Emacs 28 is released. Best, Ihor