kidd / org-gcal.el

Org sync with Google Calendar. (active maintained project as of 2019-11-06)
435 stars 47 forks source link

rx--translate-bounded-repetition: rx ‘**’ range error #172

Closed Jonghyun-Yun closed 2 years ago

Jonghyun-Yun commented 2 years ago

I requested a new token today, and then org-gcal-fetch stop working. I am using Doom with emacs-mac. Any helps would be much appreciated. The below is copied from Backtrace.

Debugger entered--Lisp error: (error "rx ‘**’ range error")
  signal(error ("rx ‘**’ range error"))
  error("rx `%s' range error" **)
  rx--translate-bounded-repetition(** (1 0 "*"))
  rx--translate-**((1 0 "*"))
  rx--translate-form((** 1 0 "*"))
  rx--translate((** 1 0 "*"))
  mapcar(rx--translate (line-start (** 1 0 "*") " "))
  rx--translate-seq((line-start (** 1 0 "*") " "))
  rx--translate-form((seq line-start (** 1 0 "*") " "))
  rx--translate((seq line-start (** 1 0 "*") " "))
  rx-to-string((seq line-start (** 1 0 "*") " "))
  org-element-headline-parser(2525 t)
  org-gcal--archive-old-event()
  org-gcal-sync(t)
  org-gcal-fetch()
  funcall-interactively(org-gcal-fetch)
  call-interactively(org-gcal-fetch nil nil)
  command-execute(org-gcal-fetch)
Jonghyun-Yun commented 2 years ago

It seems the error resulted from org-gcal--archive-old-event. For a temporary solution, I disabled the auto archiving by (setq! org-gcal-auto-archive nil).

maikol-solis commented 2 years ago

It seems the error resulted from org-gcal--archive-old-event. For a temporary solution, I disabled the auto archiving by (setq! org-gcal-auto-archive nil).

Thanks. I had the same behavior. Disabling auto-archiving is the solution for now.

jsilve24 commented 2 years ago

Also running into this issue. Thanks for the temporary fix.

madnificent commented 2 years ago

Thanks for the workaround @Jonghyun-Yun! I just noticed the issue locally and was very happy to discover a workaround.

I'm on vanilla Emacs on Linux 29.0.50.

rhaps0dy commented 2 years ago

I have been able to solve this issue by adding (move-beginning-of-line) to line 1434 https://github.com/kidd/org-gcal.el/blob/ad4261ac34f6270a9ddd61c3a0471d582c462365/org-gcal.el#L1430-L1435 that is, just before org-element-headline-parser.

The bug is that org-element-headline-parser assumes the point is at the beginning of the headline, whereas the re-search-forward loop moves the point to the end.

maikol-solis commented 2 years ago

If anyone has the same problem, this config works in doom until the #179 is merged

(package! org-gcal :recipe (:host github :repo "rhaps0dy/org-gcal.el") :pin "6ac62f796a2c")