all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [BUG] `org-element-at-point-no-context' error in flyspell `org-mode-flyspell-verify'
@ 2023-11-07  4:05 Christopher M. Miles
  2023-11-07  9:00 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Christopher M. Miles @ 2023-11-07  4:05 UTC (permalink / raw)
  To: Org mode

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


I got following error:

#+begin_example
Please report this to Org mode mailing list (M-x org-submit-bug-report).
⛔ Warning (org-element-cache): org-element--cache: Org parser error in Code.org::434180. Resetting.
 The error was: (wrong-number-of-arguments ((t) nil "Return outline-regexp with limited number of levels.
The number of levels is controlled by `org-inlinetask-min-level'." (cond ((not (derived-mode-p 'org-mode)) outline-regexp) ((not (featurep 'org-inlinetask)) org-outline-regexp) (t (let* ((limit-level (1- org-inlinetask-min-level)) (nstars (if org-odd-levels-only (1- (* limit-level 2)) limit-level))) (format "\\*\\{1,%d\\} " nstars))))) 1)
 Backtrace:
"  backtrace-to-string(nil)
  (progn (backtrace-to-string (backtrace-get-frames 'backtrace)))
  (if (and (fboundp 'backtrace-get-frames) (fboundp 'backtrace-to-string)) (progn (backtrace-to-string (backtrace-get-frames 'backtrace))))
  (format \"Org parser error in %s::%S. Resetting.\\n The error was: %S\\n Backtrace:\\n%S\\n Please report this to Org mode mailing list (M-x org-submit-bug-report).\" (buffer-name (current-buffer)) epom err (if (and (fboundp 'backtrace-get-frames) (fboundp 'backtrace-to-string)) (progn (backtrace-to-string (backtrace-get-frames 'backtrace)))))
  (let* ((format-string (format \"Org parser error in %s::%S. Resetting.\\n The error was: %S\\n Backtrace:\\n%S\\n Please report this to Org mode mailing list (M-x org-submit-bug-report).\" (buffer-name (current-buffer)) epom err (if (and (fboundp 'backtrace-get-frames) (fboundp 'backtrace-to-string)) (progn (backtrace-to-string (backtrace-get-frames ...)))))) (format-string (if (or (not org-element--cache-diagnostics-ring) (not (eq 'backtrace org-element--cache-self-verify))) format-string (prog1 (concat (format \"Warning(%s): \" (buffer-name ...)) format-string \"\\nBacktrace:\\n  \" (mapconcat #'identity (ring-elements org-element--cache-diagnostics-ring) \"\\n  \")) (setq org-element--cache-diagnostics-ring nil))))) (if (and (boundp 'org-batch-test) org-batch-test) (error \"%s\" (concat \"org-element--cache: \" format-string)) (display-warning 'org-element-cache (concat \"org-element--cache: \" format-string))))
  (condition-case err (org-element--parse-to epom) ((debug error) (let* ((format-string (format \"Org parser error in %s::%S. Resetting.\\n The error was: %S\\n Backtrace:\\n%S\\n Please report this to Org mode mailing list (M-x org-submit-bug-report).\" (buffer-name (current-buffer)) epom err (if (and ... ...) (progn ...)))) (format-string (if (or (not org-element--cache-diagnostics-ring) (not ...)) format-string (prog1 (concat ... format-string \"\\nBacktrace:\\n  \" ...) (setq org-element--cache-diagnostics-ring nil))))) (if (and (boundp 'org-batch-test) org-batch-test) (error \"%s\" (concat \"org-element--cache: \" format-string)) (display-warning 'org-element-cache (concat \"org-element--cache: \" format-string)))) (org-element-cache-reset) (org-element--parse-to epom)))
  (if cached-only (if (and (org-element--cache-active-p) (or (not org-element--cache-sync-requests) (< epom (aref (car org-element--cache-sync-requests) 1)))) (progn (org-element--cache-find epom))) (condition-case err (org-element--parse-to epom) ((debug error) (let* ((format-string (format \"Org parser error in %s::%S. Resetting.\\n The error was: %S\\n Backtrace:\\n%S\\n Please report this to Org mode mailing list (M-x org-submit-bug-report).\" (buffer-name ...) epom err (if ... ...))) (format-string (if (or ... ...) format-string (prog1 ... ...)))) (if (and (boundp 'org-batch-test) org-batch-test) (error \"%s\" (concat \"org-element--cache: \" format-string)) (display-warning 'org-element-cache (concat \"org-element--cache: \" format-string)))) (org-element-cache-reset) (org-element--parse-to epom))))
  (setq element (if cached-only (if (and (org-element--cache-active-p) (or (not org-element--cache-sync-requests) (< epom (aref (car org-element--cache-sync-requests) 1)))) (progn (org-element--cache-find epom))) (condition-case err (org-element--parse-to epom) ((debug error) (let* ((format-string (format \"Org parser error in %s::%S. Resetting.\\n The error was: %S\\n Backtrace:\\n%S\\n Please report this to Org mode mailing list (M-x org-submit-bug-report).\" ... epom err ...)) (format-string (if ... format-string ...))) (if (and (boundp ...) org-batch-test) (error \"%s\" (concat \"org-element--cache: \" format-string)) (display-warning 'org-element-cache (concat \"org-element--cache: \" format-string)))) (org-element-cache-reset) (org-element--parse-to epom)))))
  (let (element) (if (org-element--cache-active-p) (progn (if (not (save-current-buffer (set-buffer (or ... ...)) org-element--cache)) (org-element-cache-reset) (if cached-only nil (org-element--cache-sync (current-buffer) epom))))) (setq element (if cached-only (if (and (org-element--cache-active-p) (or (not org-element--cache-sync-requests) (< epom (aref ... 1)))) (progn (org-element--cache-find epom))) (condition-case err (org-element--parse-to epom) ((debug error) (let* ((format-string ...) (format-string ...)) (if (and ... org-batch-test) (error \"%s\" ...) (display-warning ... ...))) (org-element-cache-reset) (org-element--parse-to epom))))) (if (and (org-element--cache-active-p) element (org-element--cache-verify-element element)) (progn (setq element (org-element--parse-to epom)))) (if (eq (org-element-type element t) 'org-data) nil (if (and cached-only (not (and element (or (= epom ...) (and ... ... ...) (and ... ... ...) (and ... ... ...))))) nil (if (not (eq (org-element-type element t) 'section)) element (org-element-at-point (1+ epom) cached-only)))))
  (save-restriction (widen) (goto-char (or --mepom (point))) (if (derived-mode-p 'org-mode) nil (error \"`org-element-at-point' cannot be used in non-Org buffer %S (%s)\" (current-buffer) major-mode)) (if (and cached-only (memq this-command org-element--cache-non-modifying-commands)) (progn (setq cached-only nil))) (let (element) (if (org-element--cache-active-p) (progn (if (not (save-current-buffer (set-buffer ...) org-element--cache)) (org-element-cache-reset) (if cached-only nil (org-element--cache-sync (current-buffer) epom))))) (setq element (if cached-only (if (and (org-element--cache-active-p) (or (not org-element--cache-sync-requests) (< epom ...))) (progn (org-element--cache-find epom))) (condition-case err (org-element--parse-to epom) ((debug error) (let* (... ...) (if ... ... ...)) (org-element-cache-reset) (org-element--parse-to epom))))) (if (and (org-element--cache-active-p) element (org-element--cache-verify-element element)) (progn (setq element (org-element--parse-to epom)))) (if (eq (org-element-type element t) 'org-data) nil (if (and cached-only (not (and element (or ... ... ... ...)))) nil (if (not (eq (org-element-type element t) 'section)) element (org-element-at-point (1+ epom) cached-only))))))
  (save-excursion (save-restriction (widen) (goto-char (or --mepom (point))) (if (derived-mode-p 'org-mode) nil (error \"`org-element-at-point' cannot be used in non-Org buffer %S (%s)\" (current-buffer) major-mode)) (if (and cached-only (memq this-command org-element--cache-non-modifying-commands)) (progn (setq cached-only nil))) (let (element) (if (org-element--cache-active-p) (progn (if (not (save-current-buffer ... org-element--cache)) (org-element-cache-reset) (if cached-only nil (org-element--cache-sync ... epom))))) (setq element (if cached-only (if (and (org-element--cache-active-p) (or ... ...)) (progn (org-element--cache-find epom))) (condition-case err (org-element--parse-to epom) ((debug error) (let* ... ...) (org-element-cache-reset) (org-element--parse-to epom))))) (if (and (org-element--cache-active-p) element (org-element--cache-verify-element element)) (progn (setq element (org-element--parse-to epom)))) (if (eq (org-element-type element t) 'org-data) nil (if (and cached-only (not (and element ...))) nil (if (not (eq ... ...)) element (org-element-at-point (1+ epom) cached-only)))))))
  (save-excursion (cond ((markerp --mepom) (set-buffer (marker-buffer --mepom))) ((numberp --mepom)) (t (if (let* ((parray (and t ...))) (if parray (let* (...) (if ... ... ...)) (let* (...) (cond ... ... ...)))) (progn (set-buffer (let* (...) (if parray ... ...))))) (setq --mepom (let* ((parray (and t ...))) (if parray (let* (...) (if ... ... ...)) (let* (...) (cond ... ... ...))))))) (save-excursion (save-restriction (widen) (goto-char (or --mepom (point))) (if (derived-mode-p 'org-mode) nil (error \"`org-element-at-point' cannot be used in non-Org buffer %S (%s)\" (current-buffer) major-mode)) (if (and cached-only (memq this-command org-element--cache-non-modifying-commands)) (progn (setq cached-only nil))) (let (element) (if (org-element--cache-active-p) (progn (if (not ...) (org-element-cache-reset) (if cached-only nil ...)))) (setq element (if cached-only (if (and ... ...) (progn ...)) (condition-case err (org-element--parse-to epom) (... ... ... ...)))) (if (and (org-element--cache-active-p) element (org-element--cache-verify-element element)) (progn (setq element (org-element--parse-to epom)))) (if (eq (org-element-type element t) 'org-data) nil (if (and cached-only (not ...)) nil (if (not ...) element (org-element-at-point ... cached-only))))))))
  (let ((--mepom epom)) (save-excursion (cond ((markerp --mepom) (set-buffer (marker-buffer --mepom))) ((numberp --mepom)) (t (if (let* ((parray ...)) (if parray (let* ... ...) (let* ... ...))) (progn (set-buffer (let* ... ...)))) (setq --mepom (let* ((parray ...)) (if parray (let* ... ...) (let* ... ...)))))) (save-excursion (save-restriction (widen) (goto-char (or --mepom (point))) (if (derived-mode-p 'org-mode) nil (error \"`org-element-at-point' cannot be used in non-Org buffer %S (%s)\" (current-buffer) major-mode)) (if (and cached-only (memq this-command org-element--cache-non-modifying-commands)) (progn (setq cached-only nil))) (let (element) (if (org-element--cache-active-p) (progn (if ... ... ...))) (setq element (if cached-only (if ... ...) (condition-case err ... ...))) (if (and (org-element--cache-active-p) element (org-element--cache-verify-element element)) (progn (setq element ...))) (if (eq (org-element-type element t) 'org-data) nil (if (and cached-only ...) nil (if ... element ...))))))))
  (if (org-element-type epom t) epom (setq epom (or epom (point))) (let ((--mepom epom)) (save-excursion (cond ((markerp --mepom) (set-buffer (marker-buffer --mepom))) ((numberp --mepom)) (t (if (let* (...) (if parray ... ...)) (progn (set-buffer ...))) (setq --mepom (let* (...) (if parray ... ...))))) (save-excursion (save-restriction (widen) (goto-char (or --mepom (point))) (if (derived-mode-p 'org-mode) nil (error \"`org-element-at-point' cannot be used in non-Org buffer %S (%s)\" (current-buffer) major-mode)) (if (and cached-only (memq this-command org-element--cache-non-modifying-commands)) (progn (setq cached-only nil))) (let (element) (if (org-element--cache-active-p) (progn ...)) (setq element (if cached-only ... ...)) (if (and ... element ...) (progn ...)) (if (eq ... ...) nil (if ... nil ...))))))))
  org-element-at-point(nil)
  (let (org-element-use-cache) (org-element-at-point pom))
  (or (org-element-at-point pom 'cached-only) (let (org-element-use-cache) (org-element-at-point pom)))
  org-element-at-point-no-context()
  (let* ((element (org-element-at-point-no-context)) (post-affiliated (let* ((parray (and t (let* ... ...)))) (if parray (let* ((val ...)) (if (eq val ...) 'nil (let ... val))) (let* ((val ...)) (cond (... ...) (... ...) (t ...))))))) (cond ((< (point) post-affiliated) (and (save-excursion (beginning-of-line) (let ((case-fold-search t)) (looking-at \"[ \\11]*#\\\\+CAPTION:\"))) (> (point) (match-end 0)) (org--flyspell-object-check-p element))) ((let ((log (org-log-into-drawer))) (and log (let ((drawer ...)) (and drawer (org-string-equal-ignore-case log ...))))) nil) (t (let* ((temp (org-element-type element))) (cond ((memql temp '...) t) ((eql temp 'comment-block) (and (> ... post-affiliated) (save-excursion ... ... ...))) ((eql temp 'keyword) (and (member ... ...) (save-excursion ...))) ((memql temp '...) (let (... ...) (and cbeg ... ... ...))))))))
  (if (org-at-heading-p) (and (save-excursion (beginning-of-line) (and (let ((case-fold-search t)) (not (looking-at-p \"\\\\*+ END[ \\11]*$\"))) (let ((case-fold-search nil)) (looking-at org-complex-heading-regexp)))) (match-beginning 4) (>= (point) (match-beginning 4)) (or (not (match-beginning 5)) (< (point) (match-beginning 5))) (org--flyspell-object-check-p (org-element-at-point-no-context))) (let* ((element (org-element-at-point-no-context)) (post-affiliated (let* ((parray (and t ...))) (if parray (let* (...) (if ... ... ...)) (let* (...) (cond ... ... ...)))))) (cond ((< (point) post-affiliated) (and (save-excursion (beginning-of-line) (let (...) (looking-at \"[ \\11]*#\\\\+CAPTION:\"))) (> (point) (match-end 0)) (org--flyspell-object-check-p element))) ((let ((log (org-log-into-drawer))) (and log (let (...) (and drawer ...)))) nil) (t (let* ((temp (org-element-type element))) (cond ((memql temp ...) t) ((eql temp ...) (and ... ...)) ((eql temp ...) (and ... ...)) ((memql temp ...) (let ... ...))))))))
  org-mode-flyspell-verify()
  flyspell-word()
  flyspell-post-command-hook()
"
#+end_example

Seems the `pom` is nil caused `org-element-at-point` this error.

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [BUG] `org-element-at-point-no-context' error in flyspell `org-mode-flyspell-verify'
  2023-11-07  4:05 [BUG] `org-element-at-point-no-context' error in flyspell `org-mode-flyspell-verify' Christopher M. Miles
@ 2023-11-07  9:00 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2023-11-07  9:00 UTC (permalink / raw)
  To: numbchild; +Cc: Org mode

"Christopher M. Miles" <numbchild@gmail.com> writes:

> I got following error:
>
> #+begin_example
> Please report this to Org mode mailing list (M-x org-submit-bug-report).
> ⛔ Warning (org-element-cache): org-element--cache: Org parser error in Code.org::434180. Resetting.
>  The error was: (wrong-number-of-arguments ((t) nil "Return outline-regexp with limited number of levels.
> The number of levels is controlled by `org-inlinetask-min-level'." (cond ((not (derived-mode-p 'org-mode)) outline-regexp) ((not (featurep 'org-inlinetask)) org-outline-regexp) (t (let* ((limit-level (1- org-inlinetask-min-level)) (nstars (if org-odd-levels-only (1- (* limit-level 2)) limit-level))) (format "\\*\\{1,%d\\} " nstars))))) 1)

This complains about too many arguments (1) in
`org-get-limited-outline-regexp'.

On main, `org-get-limited-outline-regexp' can accept an optional
argument, but it is not the case in the built-in Org mode.
I suspect some problem with mixed installation.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-07  8:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-07  4:05 [BUG] `org-element-at-point-no-context' error in flyspell `org-mode-flyspell-verify' Christopher M. Miles
2023-11-07  9:00 ` Ihor Radchenko

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.