emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Crawford <sam.crawford@york.ac.uk>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] org-element-cache "rx '**' range error" [9.6 (9.6-??-8f50ea2d6 @ /home/samc/.emacs.d/.local/straight/build-27.2/org/)]
Date: Wed, 29 Dec 2021 09:25:21 +0000	[thread overview]
Message-ID: <CAEDXn+LWf83vs8rhfVKXaEe1heH4hauKaGA5C=Ynj=8EjLmgQg@mail.gmail.com> (raw)
In-Reply-To: <87zgokngts.fsf@localhost>

[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]

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 <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:
> >
> >>  Warning (org-element-cache): org-element--cache: Org parser error in
> > thesis.pdf::316345. Resetting.
> >>  The error was: (error "rx ‘**’ 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
>

[-- Attachment #2: Type: text/html, Size: 2306 bytes --]

  reply	other threads:[~2021-12-29  9:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-28 10:09 [BUG] org-element-cache "rx '**' range error" [9.6 (9.6-??-8f50ea2d6 @ /home/samc/.emacs.d/.local/straight/build-27.2/org/)] Samuel Crawford
2021-12-29  5:03 ` Ihor Radchenko
2021-12-29  9:25   ` Samuel Crawford [this message]
2022-06-11  7:38     ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEDXn+LWf83vs8rhfVKXaEe1heH4hauKaGA5C=Ynj=8EjLmgQg@mail.gmail.com' \
    --to=sam.crawford@york.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).