jkitchin / org-ref-cite

An org-cite processor that is like org-ref.
42 stars 6 forks source link

Error running timer ‘flyspell-lazy-check-visible #18

Closed prmadev closed 3 years ago

prmadev commented 3 years ago

Hi! I'm not sure why this error comes up each time I install org-ref-cite on my doom-emacs setup. I'm also very new to emacs world, so if there is anything else that might help, please tell me to report.

Error running timer ‘flyspell-lazy-check-visible’: (invalid-function (code entity export-snippet inline-babel-call inline-src-block line-break latex-fragment link macro statistics-cookie target timestamp verbatim citation citation-reference)) [2 times]
Debugger entered--Lisp error: (invalid-function (code entity export-snippet inline-babel-call inline-src-block line-break latex-fragment link macro statistics-cookie target timestamp verbatim citation citation-reference))
  (code entity export-snippet inline-babel-call inline-src-block line-break latex-fragment link macro statistics-cookie target timestamp verbatim citation citation-reference)(nil)
  org-ref-cite--flyspell-object-check-p((paragraph (:begin 13302 :end 13547 :contents-begin 13302 :contents-end 13547 :post-blank 0 :post-affiliated 13302 :parent nil)))
  apply(org-ref-cite--flyspell-object-check-p (paragraph (:begin 13302 :end 13547 :contents-begin 13302 :contents-end 13547 :post-blank 0 :post-affiliated 13302 :parent nil)))
  org--flyspell-object-check-p((paragraph (:begin 13302 :end 13547 :contents-begin 13302 :contents-end 13547 :post-blank 0 :post-affiliated 13302 :parent nil)))
  org-mode-flyspell-verify()
  flyspell-word()
  flyspell-check-region-doublons(13498 14739)
  flyspell-large-region(13498 14739)
  flyspell-region(13498 14739)
  flyspell-lazy-check-visible()
  apply(flyspell-lazy-check-visible nil)
  explain-pause--wrap-callback(#s(explain-pause-command-record :command idle-timer :native t :parent #s(explain-pause-command-record :command root-emacs :native nil :parent nil :executing-time 31980 :entry-snap (24852 11566 804425 188000) :too-slow nil :is-profiled nil :under-profile nil :profile nil :depth 0) :executing-time 0 :entry-snap nil :too-slow nil :is-profiled nil :under-profile nil :profile nil :depth 1) flyspell-lazy-check-visible)
  apply(explain-pause--wrap-callback (#s(explain-pause-command-record :command idle-timer :native t :parent #s(explain-pause-command-record :command root-emacs :native nil :parent nil :executing-time 31980 :entry-snap (24852 11566 804425 188000) :too-slow nil :is-profiled nil :under-profile nil :profile nil :depth 0) :executing-time 0 :entry-snap nil :too-slow nil :is-profiled nil :under-profile nil :profile nil :depth 1) flyspell-lazy-check-visible))
  timer-event-handler([t 0 3 0 t explain-pause--wrap-callback (#s(explain-pause-command-record :command idle-timer :native t :parent #s(explain-pause-command-record :command root-emacs :native nil :parent nil :executing-time 31980 :entry-snap (24852 11566 804425 188000) :too-slow nil :is-profiled nil :under-profile nil :profile nil :depth 0) :executing-time 0 :entry-snap nil :too-slow nil :is-profiled nil :under-profile nil :profile nil :depth 1) flyspell-lazy-check-visible) idle 0])
jkitchin commented 3 years ago

I don't know why you are getting that error (I don't see it). But, I do know what causes it. It is from a function I added advice to so that cite elements wouldn't be spell-checked. You could remove that advice with:

(advice-remove 'org--flyspell-object-check-p 'org-ref-cite--flyspell-object-check-p)

It is the same code as org--flyspell-object-check-p though with the addition of the citation and citation-reference elements though, which is why I am confused by the error.

prmadev commented 3 years ago

Thanks that did the trick. I'm pretty new and I have played with configs a lot. So I might have accidentally messed them up somehow. So it's probably from my end.