From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:203:b4db::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kJ0rGvApzGFqQQAAgWs5BA (envelope-from ) for ; Wed, 29 Dec 2021 10:27:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id MHiuF/ApzGGBFAAA9RJhRA (envelope-from ) for ; Wed, 29 Dec 2021 10:27:12 +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 CB1DD1459F for ; Wed, 29 Dec 2021 10:27:11 +0100 (CET) Received: from localhost ([::1]:42272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2VEk-00076L-Te for larch@yhetil.org; Wed, 29 Dec 2021 04:27:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2VDG-00075U-C0 for emacs-orgmode@gnu.org; Wed, 29 Dec 2021 04:25:39 -0500 Received: from [2607:f8b0:4864:20::931] (port=38475 helo=mail-ua1-x931.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n2VDC-0004s3-Ul for emacs-orgmode@gnu.org; Wed, 29 Dec 2021 04:25:37 -0500 Received: by mail-ua1-x931.google.com with SMTP id o63so36352292uao.5 for ; Wed, 29 Dec 2021 01:25:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=york.ac.uk; s=20160523.google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ObwYr57TlKfmbg1Iq8xyesTwdKF3+528jgxeHEjorkY=; b=aANwDHLgNRyyUZOQbx5pQMWyiPG6EQpoA3aSIzX2Vbnd0jqwSdrdTAbjwM3hRIHgoh 4kCZ5d+WhC3Uid0XLD3uBrY2U7pTrfd18h65GzsjigGYbfAgbhBymhcx16w06ooz28g+ 2p6kJm7S69yBlkSM/f9ezrRiAcg84u/8/ug/s0cSwK6Ymux/NC2XjuOcuewSGg1mZHOQ 7JaI9bysrA1c6LP9CU4nzcQZb2T6j+sAYVaQL5fJU/L+HQ38p3pUTXq8oTrTACjqYeMA GLKH3eL1iUVQ/UZJ7zOEJgtdUsMTtYivsUrK7Oza8c1PghvQ+bY2qtxYJBdOLNSYYJjG jU2g== 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=ObwYr57TlKfmbg1Iq8xyesTwdKF3+528jgxeHEjorkY=; b=QQiMShcN/b/A4G8uybgr9T3uG2+RuPmrmRX13S86EtNzcBk+vBnGLHNof6dnHJXZIA tB+InPAc09LwFIacW6nCCGr4mTb/Qhxw1wATOHYOOg2fNj41uF3j/pgh4lE2G5UdIF3i 1a9Ooj9zYPSIvXD1Z3cIyS+g+5Wut10/6KmLtTCLsjk11AlwouX4gyuQB/LU7yT4895r QVF5ltDrJOZHVRrFVCqXP7J8v/xWw8UQXyBNvhv5kHXXzCac/weGaNWWji8aevc7BL0u MboxMy5muJ1cwDSRDDZBiJcqYAFYPEQUk5f8GJA3ksPn4G3dzXeIQZx+Dj8b7Nz1z6De I4QA== X-Gm-Message-State: AOAM5325QuydOkWUKERUwXi8H/iRUPpATDTDeezVYV36qXJNvatL03FP /PFf4DPMfOIOvmb3Z30lsSGUPowdH9kFt4hUs1U43Z+RISEfdc7G X-Google-Smtp-Source: ABdhPJyQCY9g1jLgrGMOrfgzyS437vyyXLCSOA8rnkOPTJorYqTcI4olI7iiVvFQBt3ZXou75MGuob6pA3d2WJDleC4= X-Received: by 2002:a67:f305:: with SMTP id p5mr7470646vsf.8.1640769932762; Wed, 29 Dec 2021 01:25:32 -0800 (PST) MIME-Version: 1.0 References: <87zgokngts.fsf@localhost> In-Reply-To: <87zgokngts.fsf@localhost> From: Samuel Crawford Date: Wed, 29 Dec 2021 09:25:21 +0000 Message-ID: Subject: Re: [BUG] org-element-cache "rx '**' range error" [9.6 (9.6-??-8f50ea2d6 @ /home/samc/.emacs.d/.local/straight/build-27.2/org/)] To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="00000000000000360705d44585eb" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::931 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::931; envelope-from=sam.crawford@york.ac.uk; helo=mail-ua1-x931.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, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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: , 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=1640770032; 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=ObwYr57TlKfmbg1Iq8xyesTwdKF3+528jgxeHEjorkY=; b=defJTMLcEN/vCBSjd4hXDAGX4qZoZZw2s9QolsCTSjZTrCYqJknqN84mfvV+2L7CeK3+8h xNzc6AFF1LNILJp6IePc5o2XrK6CBobb7nlgtdLtj63PJ17ifVlKzjAKXDF0GeuYyJuunJ SmV30z8sYgxvYZgZ4LCIXOJuMlV5olBx8M8/87Ktq8lI4ArlLKaqBxz/QS1mOuNq2B//ij 9l5sFos+31vXtTKelKvSwZrWc3dwYBV6XMqLbzKmfpWsoY3R+yrqO3YsIutkYnrvfIsJVQ B9InS1qPkR6aUDRruS9gfnZq5Nw6A/Tn4fK151L/zQlKqp1YuDHLpavvvjt1mA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640770032; a=rsa-sha256; cv=none; b=RTNLnh4444bjUjMSbmzA80I6w64Q896aQg8WHEFvtPmVnhnHZHcF1qjGfAFEXgoBsuV88R QGGVFnf2dC7xT29+Q0EwG+l7o2nC7g5Jal46GL5rpPSfudC+2kTSxL28CC4b8NkS4QLGjb 1uVOKhdmh1T6vSl/E56nLEE2PTmagteHXso52Pnr96XI8h9GDf5Jj33eh6f6c18EorNazF +GzsK7NfyWKv2y10gv5amPzv1hDWm9Ut2cYIcglt/mdmU12hKyLo2zruGBUh8yrw9SeW1H sgMMNPORbIMjpAOaMXXQhhCx/UfvdB+rKdvCTLs17DzordyJKh+2LxJU/Fojng== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=york.ac.uk header.s=20160523.google header.b=aANwDHLg; dmarc=pass (policy=reject) header.from=york.ac.uk; 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: -4.27 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=york.ac.uk header.s=20160523.google header.b=aANwDHLg; dmarc=pass (policy=reject) header.from=york.ac.uk; 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: CB1DD1459F X-Spam-Score: -4.27 X-Migadu-Scanner: scn1.migadu.com X-TUID: htw3crY7SWGj --00000000000000360705d44585eb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Ihor, The hook that is going wrong is pdf-tools-enable-minor-modes. After digging into it, there seems to be a whole bunch of problematic minor modes. My methodology wasn't super rigorous, but what I found was > pdf-misc-context-menu-minor-mode > pdf-misc-size-indication-minor-mode > pdf-misc-menu-bar-minor-mode > pdf-misc-minor-mode cause problems every time the pdf is loaded, and > pdf-links-minor-mode > pdf-outline-minor-mode > pdf-annot-minor-mode cause problems every *other* time the pdf is loaded. I found a couple of workarounds: adding (org-reload) to my init.el (actually config.el as I'm running doom emacs) solves the problem, though it does add another second to my load time. Alternatively, I was able to load the first set of minor modes without issue by using doom's (after! pdf-tools ...). This didn't seem to work for the latter minor modes though. Cheers, Sam On Wed, 29 Dec 2021 at 05:01, Ihor Radchenko wrote: > Samuel Crawford writes: > > > Every time I try to open a particular pdf I'm inundated with "Org parse= r > > error"s, all looking like this: > > > >> Warning (org-element-cache): org-element--cache: Org parser error in > > thesis.pdf::316345. Resetting. > >> The error was: (error "rx =E2=80=98**=E2=80=99 range error") > > > > Is there any way I can disable org-element-cache on pdfs as a > > workaround? > > AFAIU, something is calling org-mode function outside of org-mode (which > is wrong, even though it could work by accident in earlier versions of > Org). Can you check your hooks ran when you load the problematic pdf? > > Best, > Ihor > --00000000000000360705d44585eb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Ihor,

The hook that is go= ing wrong is pdf-tools-enable-minor-modes.

After d= igging into it, there seems to be a whole bunch of problematic minor modes.= My methodology wasn't super rigorous, but what I found was
= > pdf-misc-context-menu-minor-mode
> pdf-misc-size-indication-mino= r-mode
> pdf-misc-menu-bar-minor-mode
> pdf-misc-minor-mode
cause problems every time the pdf is loaded, and
> pdf-= links-minor-mode
> pdf-outline-minor-mode
> pdf-annot-minor-mod= e
cause problems every other time the pdf is loaded.
=

I found a couple of workarounds: adding (org-reload) to= my init.el (actually config.el as I'm running doom emacs) solves the p= roblem, though it does add another second to my load time. Alternatively, I= was able to load the first set of minor modes without issue by using doom&= #39;s (after! pdf-tools ...). This didn't seem to work for the latter m= inor modes though.

Cheers,
Sam
=

= On Wed, 29 Dec 2021 at 05:01, Ihor Radchenko <yantar92@gmail.com> wrote:
Samuel Crawford <sam.crawford@york.ac.uk> writes:=

> Every time I try to open a particular pdf I'm inundated with "= ;Org parser
> error"s, all looking like this:
>
>>=C2=A0 Warning (org-element-cache): org-element--cache: Org parser = error in
> thesis.pdf::316345. Resetting.
>>=C2=A0 The error was: (error "rx =E2=80=98**=E2=80=99 range er= ror")
>
> Is there any way I can disable org-element-cache on pdfs as a
> workaround?

AFAIU, something is calling org-mode function outside of org-mode (which is wrong, even though it could work by accident in earlier versions of
Org). Can you check your hooks ran when you load the problematic pdf?

Best,
Ihor
--00000000000000360705d44585eb--