From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QLwWMwAelmO1qQAAbAwnHQ (envelope-from ) for ; Sun, 11 Dec 2022 19:14:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YEAOMwAelmMpKAAAauVa8A (envelope-from ) for ; Sun, 11 Dec 2022 19:14:24 +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 6CB43165A5 for ; Sun, 11 Dec 2022 19:14:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4QpW-0008BF-Sh; Sun, 11 Dec 2022 13:13:38 -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 1p4QpV-0008B2-Q7; Sun, 11 Dec 2022 13:13:37 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4QpV-0002PA-Bz; Sun, 11 Dec 2022 13:13:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=To:Subject:Date:From:In-Reply-To:References: MIME-Version; bh=D66TqjIGtXBpOKfKt3nPXN3j5H9XgDJ7ryPu52aU3P8=; b=WJRwltfJ42wh o5CrGRuaBQJ1dCqdkKFqZF6KTZfOK/GAqY9vcpKENWizXN1yKeErRiz3K/Ic7OQVRIPFqHJ57u2v0 vTSLDgD+gwLJ6j4TzMs4tYgYMWKu6SC9vTGj4uIWsm4twZ2uljdUY6rrlY+GWYVWrFq/6b64lj16e Bw2swXemmW+cA5/TE+X7ywwzhR4qnvld2HjonB1aRhUwAWZ/XaQe70QWJeq9xCUKjvq/zimWPrCGB LTCPNumrOVBBXGPU0enXxrF5uyQy8pQYQAT9fB3WTXBVCdA1cJx9HQ9PJRu1U9wxvBo7rWXK/lXuo NdNj3NjCbuKl1UKJ6V/+VA==; Received: from mail-ua1-f54.google.com ([209.85.222.54]) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4QpV-0000SZ-19; Sun, 11 Dec 2022 13:13:37 -0500 Received: by mail-ua1-f54.google.com with SMTP id 97so2621455uam.0; Sun, 11 Dec 2022 10:13:36 -0800 (PST) X-Gm-Message-State: ANoB5pnmBrik8Jbqb8TfDcPylHFxokIUfdFbyyyKnq4Kz1dj1S483CrC t7kzXsYqoY2e9DjDs/+ebN7lE/UkepWP0Utrx1s= X-Google-Smtp-Source: AA0mqf48l55ZYnDSXlEYEjp5T+M+ZB1NnI2HCBIVpk8ZuYeGxE6C/HBVhd72/uHfKE6pnGm1+F/Xm7ODbdw/NpT5wWU= X-Received: by 2002:ab0:5a8b:0:b0:419:cb7c:e6e7 with SMTP id w11-20020ab05a8b000000b00419cb7ce6e7mr9617077uae.110.1670782416408; Sun, 11 Dec 2022 10:13:36 -0800 (PST) MIME-Version: 1.0 References: <87h6zwbylo.fsf@no.workgroup> <87czak1ex8.fsf@localhost> In-Reply-To: <87czak1ex8.fsf@localhost> From: Robert Weiner Date: Sun, 11 Dec 2022 13:13:10 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [BUG] hyperbole action key on path name results in org-element-cache warning [9.6-pre (release_9.5.5-997-ge58bd0 @ /home/grfz/src/org-mode/lisp/)] To: Ihor Radchenko Cc: Gregor Zattler , emacs-orgmode@gnu.org, hyperbole-users@gnu.org Content-Type: multipart/alternative; boundary="0000000000006d591205ef91581b" 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: , Reply-To: rswgnu@gmail.com 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670782464; h=from:from:sender:sender:reply-to: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=D66TqjIGtXBpOKfKt3nPXN3j5H9XgDJ7ryPu52aU3P8=; b=eAXhRFKZPi7N6ZBM7vFRBPy8LhERi95LpSw96inOiaTImM87NdpDdrCxQhl9Rs/EcXttl4 DDNok7+W+L/7v/IHfiyZ/avVolnhFjRXtG7hueO7xs82ahx8X+j+iTCHqrK007aO604tsA msbyK6oguBYIXFkBUuy+lmrAwQnBMQ83eXXAtis86QlvsB9x3JAxGiaEroqGAtuy5oPV3F IYsOFbY2bdhRlLrsexSP9lQD847NDA8IIqLZss6gSYruXE6bly8G7fl07HIUCjGqvWVR1I BTxML+vVDVNNe2NMWk3CyNXxggo5y3SpgwIoeZ7GmNSRxpaKnfqVBJx/HGSTEQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=WJRwltfJ; 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=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670782464; a=rsa-sha256; cv=none; b=aJCE8cKJQlBrm59TOrIYgSQGONwxvt2cAEvSunMUWS8JhBn0G0GC4WrHukvrfZaHeG/IPQ TrYfw9bS6H0g3rBNa1r2L2PpBJcGgo2+Pscl/8cJTO85CpVSA0V6u3rJOtC+qj7x1DOqyE zI5e2VsIsWJRCutpScf+RAqpdKzJKbWsDZEbSuDIgtNCGWt2qaEiZJKyn5o82MaVr6Ph/L Dr9GY6gpcaYtaZnJPDNmU3ilO96foK8YH7C7oph6iwRaedangzrm1yU1vqFZJF0RyWCNWs +IuQvdEBPENNopHbdjwYncLf371Ufy+X0rRScqPcu6HwUbCf06Kc6DeUCVSsIQ== X-Migadu-Spam-Score: -7.32 X-Spam-Score: -7.32 X-Migadu-Queue-Id: 6CB43165A5 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=WJRwltfJ; 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=pass (policy=none) header.from=gnu.org X-TUID: /Wis+GBvdj+a --0000000000006d591205ef91581b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Ihor: So if we want to determine the Org type of an element outside of an Org buffer (when using org-type minor modes for example), how would we change this 'let' code: (let* ((context ;; Only consider supported types, even if they are not ;; the closest one. (org-element-lineage ;; Next line can trigger an error when `looking-at' is called ;; with a `nil' value of `org-complex-heading-regexp'. (org-element-context) '(clock footnote-definition footnote-reference headline inlinetask link timestamp) t)) (type (org-element-type context)) ...) Thanks, Bob On Sat, Oct 22, 2022 at 3:53 AM Ihor Radchenko wrote: > Gregor Zattler writes: > > > Dear org-mode and hyperbole developers, hitting hyperbole's > > action-key with point in "~/src/org-mode/contrilb/lisp" in a > > *Pp Eval Output* buffer holding my complete load-path > > resulted in this org-element--cache warning: > > > > =E2=96=A0 Warning (org-element-cache): org-element--cache: Org parser= error in > *Pp Eval Output*::5288. 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() > > hsys-org-link-at-p() > > This is a hyperbole bug. > The latest version of Org no longer supports calling > org-element-at-point in non-Org buffers. Previously it worked by > accident and did not throw an error. > > I recommend using regexp constants from Org to match against org-like > constructs outside Org mode buffers. > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at > > --0000000000006d591205ef91581b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Ihor:

So if we want to determine th= e Org type of an element outside of an Org buffer (when using org-type mino= r modes for example), how would we change this 'let' code:

= =C2=A0(let* ((context
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Only consider= supported types, even if they are not
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0;; the closest one.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(org-element-li= neage
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; Next line can trigger an err= or when `looking-at' is called
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;;= with a `nil' value of `org-complex-heading-regexp'.
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 (org-element-context)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 '(clock footnote-definition footnote-reference headline
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 inlinetask link timestamp)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 t))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (type (o= rg-element-type context))
=C2=A0 =C2=A0 =C2=A0...)

Thanks,
Bob

On Sat, Oct 22, 2022 at 3:53 AM Ihor Radchenko <yantar92@posteo.net> wrote:
Gregor Zattler <grfz@gmx.de> writes:

> Dear org-mode and hyperbole developers, hitting hyperbole's
> action-key with point in "~/src/org-mode/contrilb/lisp" in a=
> *Pp Eval Output* buffer holding my complete load-path
> resulted in this org-element--cache warning:
>
>=C2=A0 =E2=96=A0=C2=A0 Warning (org-element-cache): org-element--cache:= Org parser error in *Pp Eval Output*::5288. Resetting.
>=C2=A0 The error was: (error "rx =E2=80=98**=E2=80=99 range error&= quot;)
>=C2=A0 Backtrace:
> "=C2=A0 backtrace-to-string(nil)
>=C2=A0 =C2=A0org-element-at-point()
>=C2=A0 =C2=A0org-element-context()
>=C2=A0 =C2=A0hsys-org-link-at-p()

This is a hyperbole bug.
The latest version of Org no longer supports calling
org-element-at-point in non-Org buffers. Previously it worked by
accident and did not throw an error.

I recommend using regexp constants from Org to match against org-like
constructs outside Org mode buffers.

--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,=
or support my work at <https://liberapay.com/yantar92>

--0000000000006d591205ef91581b--