chenyanming / shrface

Extend eww/nov with org-mode features, archive web pages to org files with shr.
GNU General Public License v3.0
211 stars 14 forks source link

(error "rx ‘**’ range error") #23

Closed muello closed 5 months ago

muello commented 8 months ago

On a minimal config loading straight.el, use-package, and shrface, I get versions of the above error upon calling eww-open-file.

Emacs 28.2, Org 9.7

The warning/error:

Warning (org-element-cache): org-element--cache: Org parser error in *eww*::536. Resetting.
 The error was: (error "rx ‘**’ range error")
 Backtrace:
nil

On my usual config, the message is different, but seems to indicate the same error somewhere:

Error running timer ‘org-indent-initialize-agent’: (error "rx ‘**’ range error") [13 times]

The config:


(defconst packages-for-straight
  '(
    ;; package management
    use-package
    straight
    shrface
    )
  "List of packages for straight.el.")

;;;; straight: bootstrap code
(defvar bootstrap-version)
(let ((bootstrap-file
       (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
      (bootstrap-version 6))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
         "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
         'silent 'inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))

;;;; install/use packages
(dolist (package packages-for-straight)
  (straight-use-package package))

;; Configure use-package to use straight.el by default
(use-package straight
  :custom (straight-use-package-by-default t))

;;;; eww
  (use-package eww
    :defer t
    :init
    (add-hook 'eww-after-render-hook #'shrface-mode)
    :config
    (require 'shrface))

;;;; shrface
  (use-package shrface
    :defer t
    :config
    (shrface-basic)
    ;; (shrface-trial)
    (shrface-default-keybindings) ; setup default keybindings
    (setq shrface-href-versatile t))
chenyanming commented 5 months ago

Sorry to note that org-indent-mode is updated and no longer support non-org mode. Please use shr-indentation instead.

muello commented 5 months ago

Hi there @chenyanming, thanks for the package, and thanks for the fix!