From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gJgeN08c/mPuHgEAbAwnHQ (envelope-from ) for ; Tue, 28 Feb 2023 16:22:56 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id IHgsNk8c/mPOrgAAG6o9tA (envelope-from ) for ; Tue, 28 Feb 2023 16:22:55 +0100 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 8AE73B402 for ; Tue, 28 Feb 2023 16:22:55 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677597775; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=SQILXAtALUVP3f8Hik5+JUfNsd2eHMzWOmMUB/NsXUQ=; b=RHSE5Ze3igz7V7t0Yzq/lf+hXjKrLsZ5CXl+oALuSr3ukryTBYp9Ax6bYx/R1yAe6hZmOi pxIfLNA2bpgRGpwHNN1VfvP5yity3N2ds7tZIsrPJBbPbbQHfFhEr36QlnrIew137WDHk3 RpxuA6TwsCVphT2v31qJKUMWXwKL8nBZKg6y21VfZs0GXwpGNvn1Ellmho38VRR3Dy2gtI ZY/VBVVYkefnnMRIbbBb1e2z6NP0y4T6CwcB+dJ+iSSuJgQUNEWw/cVTcFB9GRh38yobfJ kvI2qpPG2mKXxFL8CEwOgnu/LZZbRPHbxzBPgkQEbxNeWkCluiJTbSo2+t9C0A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677597775; a=rsa-sha256; cv=none; b=kOEhYmpV4bZDBHQualwj2TzVN6O6L1n6PNY7WVIUgamt6wK5GrhGNsYveanCeTCGMP2ZpU koZsua3mpyHRFq2bRQN0uVu0u7n7lSDP0xCP77+TN06YMx1ENd/iVE3ZIqEVKfz5XoDJET gHu93dli4F0fkoXbY3ErZe7VXlxd2gCi6H8p1o9v4dAD71UnvoAvSF4rSxndK0f+Qr2uxW eZzqFEGu+XChTDBCv7nEBllAlMfmKbbzFQider8rC+uGSW4C1LKnk2auUzi4PPKDfMt9U6 o6II6KnLQeOHye8hkdhO2B4BE5wWVnLXUMAERrftQPRZUjHHJKjP/eeeBGYeZg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pX1nd-0007dl-E8; Tue, 28 Feb 2023 10:21:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pX1nb-0007d3-Hv for emacs-orgmode@gnu.org; Tue, 28 Feb 2023 10:21:51 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pX1nZ-0007Q5-CQ for emacs-orgmode@gnu.org; Tue, 28 Feb 2023 10:21:51 -0500 Received: (Authenticated sender: self@gkayaalp.com) by mail.gandi.net (Postfix) with ESMTPSA id 9A661240016 for ; Tue, 28 Feb 2023 15:21:40 +0000 (UTC) From: =?utf-8?Q?G=C3=B6ktu=C4=9F_Kayaalp?= To: emacs-orgmode@gnu.org Subject: Broken org-persist-storage probably leads to =?utf-8?Q?=E2=80=98o?= =?utf-8?Q?rg-open-at-point=E2=80=99?= ask for TAGS file Date: Tue, 28 Feb 2023 18:21:22 +0300 Message-ID: <87h6v5vmrx.fsf@gkayaalp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: none client-ip=217.70.178.230; envelope-from=self@gkayaalp.com; helo=relay10.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham 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: X-Migadu-Spam-Score: -3.49 X-Spam-Score: -3.49 X-Migadu-Scanner: scn0.migadu.com X-Migadu-Queue-Id: 8AE73B402 List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: Mc23B4mgN4Bz Hello, I have discovered a weird behaviour that I have tracked back to org-persist and org-element-cache, where after some time, when I try to follow a document internal link in org mode, whether to a headline or to a =3D<>=3D, it would ask me to load a TAGS file, I think somewhat like how xref might ask you to do when you call say =E2=80=98xref-find-definitions=E2=80=99. This has been going on for a few weeks I think and I finally had a chance to debug this, and it appears that some problem in the persistent cache might be triggering this bug. I haven=E2=80=99t been able to fully de= bug the problem because by the time I had discovered it had anything to do with org-persist and where the storage files for the latter were, I had reset the database. I do not have a backup of =E2=80=98org-persist-director= y=E2=80=99 to compare thus, or, for now, to reproduce the bug. It appears that one thing that can trigger the error is Org mode parser errors. For example, while trying to poke around =E2=80=98org-open-at-point= =E2=80=99 a bit, I noticed that eval=E2=80=99ing the call to =E2=80=98org-element-linea= ge=E2=80=99 in its definition (let* ((context ;; Only consider supported types, even if they are not the ;; closest one. (org-element-lineage (org-element-context) '(citation citation-reference clock comment comment-block footnote-definition footnote-reference headline inline-src-block inlinetask keyword link node-prope= rty planning src-block timestamp) t)) resulted in the following warning, which then implored me to send a bug report: =E2=9B=94 Warning (org-element-cache): org-element--cache: Org parser error= in org.el.gz::333063. Resetting. The error was: (error "rx =E2=80=98**=E2=80=99 range error") Backtrace: " (backtrace-to-string nil) (org-element-at-point) (org-element-context) (org-element-lineage (org-element-context) '(citation citation-reference = clock comment comment-block footnote-definition footnote-reference headline= inline-src-block inlinetask keyword link node-property planning src-block = timestamp) t) (progn (org-element-lineage (org-element-context) '(citation citation-ref= erence clock comment comment-block footnote-definition footnote-reference h= eadline inline-src-block inlinetask keyword link node-property planning src= -block timestamp) t)) (eval (progn (org-element-lineage (org-element-context) '(citation citati= on-reference clock comment comment-block footnote-definition footnote-refer= ence headline inline-src-block inlinetask keyword link node-property planni= ng src-block timestamp) t)) t) (elisp--eval-last-sexp nil) after which the bug was triggered and I had become unable to use file internal links in org mode. In another instance an args out of range error in a =E2=80=98progn=E2=80=99= was encountered while trying to store a link in a test buffer which only had "\n\n\n<>" in it, which again triggered the bug. I then tried to disable the cache which didn=E2=80=99t help, and to reset t= he cache and then some other things, listed below, which didn=E2=80=99t either= . But after restarting Emacs (with the org element cache enabled), I was no longer able to reproduce the bug. (setf org-element-use-cache t) M-x org-element-cache-reset (org-element-cache-reset t t) (org-element-cache-refresh (point)) (setq-local org-element--cache nil) (setq-local org-element--headline-cache nil) (setq-local org-element--cache-hash-left nil org-element--cache-hash-right nil) It is after this point that I debugged further and discovered org-persist and its role. Sadly the default location of =E2=80=98org-persist-directory=E2=80=99 is not a location I include in my b= ackups, so I cannot reproduce the bug unless I accidentally recreate whatever triggered it. All this debugging occurred in the org mode package as it comes with upstream emacs, built by me from commit 6c4abbab7999f55792a323e4bb1eb55ef5a7b990. In case it is helpful, below are links to my org mode config and Emacs build script https://codeberg.org/cadadr/personal-computing/src/commit/748803bb63d756e0a= 2ec75b00c34dfbd1f40cf0f/emacs.d/gk/gk-org.el https://codeberg.org/cadadr/personal-computing/src/commit/748803bb63d756e0a= 2ec75b00c34dfbd1f40cf0f/emacs.d/bin/build-emacs.sh =E2=80=98org-version=E2=80=99 reports Org mode version 9.6.1 (release_9.6.1-34-geea8da @ /home/cadadr/local/emacs= /share/emacs/30.0.50/lisp/org/) The org-persist storage verion currently seems to be 3.1 (exceprt from =3D/home/cadadr/.cache/org-persist/index=3D below). I don=E2=80=99t know wh= at it was beforehand, but I usually build Emacs from git tip every Sunday, so that might give a tip (:container ((index "3.1")) Sadly I cannot do any further debugging, as I can=E2=80=99t reproduce the b= ug anymore. - G=C3=B6ktu=C4=9F. P.S. Please keep me in CC if you want me to see your replies, I am not subscribed to the list.