* [BUG] Warning when creating preview
@ 2023-08-18 13:20 Edgar Lux
2023-08-18 16:04 ` Ihor Radchenko
2023-10-11 9:11 ` Ihor Radchenko
0 siblings, 2 replies; 19+ messages in thread
From: Edgar Lux @ 2023-08-18 13:20 UTC (permalink / raw)
To: Emacs Orgmode
Hi,
I don't really need help with this. Org has been telling me for days that I should report this, but I don't really want to share my configuration publicly, and I thought that it was only for a file on which I was working. It seems to be general for my configuration. I hope that it helps. If you have an encrypted personal account to which I can send my config file, let me know.
* What happens
When I type some equations and get the preview, I get this warning
#+begin_quote
\begin{gather}
t = 0
\end{gather}
#+end_quote
* My "system"
Emacs : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6)
of 2023-01-03
Package: Org mode version 9.4.6 (release_9.4.6-13-g4be129)
* The message
Warning (org-element-cache): org-element--cache: Org parser error in t.org::35. Resetting.
The error was: (error "Invalid search bound (wrong side of point)")
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 ...\" (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 ...\" (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 ...\" (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 ...\" (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 ...\" ... 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 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 (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) (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 (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) (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 (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) (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 (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 (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()
(or element (org-element-at-point))
(let* ((pos (point)) (element (or element (org-element-at-point))) (type (org-element-type element)) (post (org-element-post-affiliated element))) (cond ((and post (< pos post)) (forward-line 0) (let ((case-fold-search t)) (looking-at org-element--affiliated-re)) (cond ((not (member-ignore-case (match-string 1) org-element-parsed-keywords)) (throw 'objects-forbidden element)) ((< (match-end 0) pos) (narrow-to-region (match-end 0) (line-end-position))) ((and (match-beginning 2) (>= pos (match-beginning 2)) (< pos (match-end 2))) (narrow-to-region (match-beginning 2) (match-end 2))) (t (throw 'objects-forbidden element))) (setq type 'keyword)) ((eq type 'item) (let ((tag (org-element--property :tag element nil nil))) (if (or (not tag) (/= (line-beginning-position) post)) (throw 'objects-forbidden element) (forward-line 0) (search-forward tag (line-end-position)) (goto-char (match-beginning 0)) (if (and (>= pos ...) (< pos ...)) (narrow-to-region (point) (match-end 0)) (throw 'objects-forbidden element))))) ((memq type '(headline inlinetask)) (let ((case-fold-search nil)) (goto-char (org-element-begin element)) (looking-at org-complex-heading-regexp) (let ((end (match-end 4))) (if (not end) (throw 'objects-forbidden element) (goto-char (match-beginning 4)) (if (looking-at org-element-comment-string) (progn ...)) (if (>= ... end) (throw ... element) (narrow-to-region ... end)))))) ((memq type '(paragraph table-row verse-block)) (let ((cbeg (org-element-contents-begin element)) (cend (org-element-contents-end element))) (if (and cbeg cend (>= pos cbeg) (or (< pos cend) (and ... ...))) (narrow-to-region cbeg cend) (throw 'objects-forbidden element)))) (t (throw 'objects-forbidden element))) (goto-char (point-min)) (let ((restriction (org-element-restriction type)) (parent element) last) (catch 'exit (while t (let ((next (org-element--object-lex restriction))) (if next (progn (if ... ... ...))) (if (or (not next) (> ... pos)) (throw 'exit (or last parent)) (let (... ... ...) (cond ... ... ...))))))))
(save-restriction (widen) (let* ((pos (point)) (element (or element (org-element-at-point))) (type (org-element-type element)) (post (org-element-post-affiliated element))) (cond ((and post (< pos post)) (forward-line 0) (let ((case-fold-search t)) (looking-at org-element--affiliated-re)) (cond ((not (member-ignore-case ... org-element-parsed-keywords)) (throw 'objects-forbidden element)) ((< (match-end 0) pos) (narrow-to-region (match-end 0) (line-end-position))) ((and (match-beginning 2) (>= pos ...) (< pos ...)) (narrow-to-region (match-beginning 2) (match-end 2))) (t (throw 'objects-forbidden element))) (setq type 'keyword)) ((eq type 'item) (let ((tag (org-element--property :tag element nil nil))) (if (or (not tag) (/= ... post)) (throw 'objects-forbidden element) (forward-line 0) (search-forward tag (line-end-position)) (goto-char (match-beginning 0)) (if (and ... ...) (narrow-to-region ... ...) (throw ... element))))) ((memq type '(headline inlinetask)) (let ((case-fold-search nil)) (goto-char (org-element-begin element)) (looking-at org-complex-heading-regexp) (let ((end ...)) (if (not end) (throw ... element) (goto-char ...) (if ... ...) (if ... ... ...))))) ((memq type '(paragraph table-row verse-block)) (let ((cbeg (org-element-contents-begin element)) (cend (org-element-contents-end element))) (if (and cbeg cend (>= pos cbeg) (or ... ...)) (narrow-to-region cbeg cend) (throw 'objects-forbidden element)))) (t (throw 'objects-forbidden element))) (goto-char (point-min)) (let ((restriction (org-element-restriction type)) (parent element) last) (catch 'exit (while t (let ((next ...)) (if next (progn ...)) (if (or ... ...) (throw ... ...) (let ... ...))))))))
(save-excursion (save-restriction (widen) (let* ((pos (point)) (element (or element (org-element-at-point))) (type (org-element-type element)) (post (org-element-post-affiliated element))) (cond ((and post (< pos post)) (forward-line 0) (let ((case-fold-search t)) (looking-at org-element--affiliated-re)) (cond ((not ...) (throw ... element)) ((< ... pos) (narrow-to-region ... ...)) ((and ... ... ...) (narrow-to-region ... ...)) (t (throw ... element))) (setq type 'keyword)) ((eq type 'item) (let ((tag ...)) (if (or ... ...) (throw ... element) (forward-line 0) (search-forward tag ...) (goto-char ...) (if ... ... ...)))) ((memq type '(headline inlinetask)) (let ((case-fold-search nil)) (goto-char (org-element-begin element)) (looking-at org-complex-heading-regexp) (let (...) (if ... ... ... ... ...)))) ((memq type '(paragraph table-row verse-block)) (let ((cbeg ...) (cend ...)) (if (and cbeg cend ... ...) (narrow-to-region cbeg cend) (throw ... element)))) (t (throw 'objects-forbidden element))) (goto-char (point-min)) (let ((restriction (org-element-restriction type)) (parent element) last) (catch 'exit (while t (let (...) (if next ...) (if ... ... ...))))))))
(catch 'objects-forbidden (save-excursion (save-restriction (widen) (let* ((pos (point)) (element (or element (org-element-at-point))) (type (org-element-type element)) (post (org-element-post-affiliated element))) (cond ((and post (< pos post)) (forward-line 0) (let (...) (looking-at org-element--affiliated-re)) (cond (... ...) (... ...) (... ...) (t ...)) (setq type 'keyword)) ((eq type 'item) (let (...) (if ... ... ... ... ... ...))) ((memq type '...) (let (...) (goto-char ...) (looking-at org-complex-heading-regexp) (let ... ...))) ((memq type '...) (let (... ...) (if ... ... ...))) (t (throw 'objects-forbidden element))) (goto-char (point-min)) (let ((restriction (org-element-restriction type)) (parent element) last) (catch 'exit (while t (let ... ... ...))))))))
org-element-context()
(let ((datum (org-element-context))) (and (memq (org-element-type datum t) '(latex-environment latex-fragment)) (let ((beg (org-element-begin datum)) (end (org-element-end datum))) (if (org-clear-latex-preview beg end) (message \"LaTeX preview removed\") (message \"Creating LaTeX preview...\") (org--latex-preview-region beg end) (message \"Creating LaTeX preview... done.\")) t)))
(cond ((not (display-graphic-p)) nil) ((equal arg '(64)) (org-clear-latex-preview (point-min) (point-max)) (message \"LaTeX previews removed from buffer\")) ((equal arg '(16)) (message \"Creating LaTeX previews in buffer...\") (org--latex-preview-region (point-min) (point-max)) (message \"Creating LaTeX previews in buffer... done.\")) ((equal arg '(4)) (org-clear-latex-preview (if (use-region-p) (region-beginning) (if (org-before-first-heading-p) (point-min) (save-excursion (progn (defvar org-called-with-limited-levels) (defvar org-outline-regexp) (defvar outline-regexp) (defvar org-outline-regexp-bol) (let* ... ... ...))))) (if (use-region-p) (region-end) (progn (defvar org-called-with-limited-levels) (defvar org-outline-regexp) (defvar outline-regexp) (defvar org-outline-regexp-bol) (let* ((org-called-with-limited-levels t) (org-outline-regexp ...) (outline-regexp org-outline-regexp) (org-outline-regexp-bol ...)) (org-entry-end-position)))))) ((use-region-p) (message \"Creating LaTeX previews in region...\") (org--latex-preview-region (region-beginning) (region-end)) (message \"Creating LaTeX previews in region... done.\")) ((let ((datum (org-element-context))) (and (memq (org-element-type datum t) '(latex-environment latex-fragment)) (let ((beg (org-element-begin datum)) (end (org-element-end datum))) (if (org-clear-latex-preview beg end) (message \"LaTeX preview removed\") (message \"Creating LaTeX preview...\") (org--latex-preview-region beg end) (message \"Creating LaTeX preview... done.\")) t)))) (t (let ((beg (if (org-before-first-heading-p) (point-min) (save-excursion (progn ... ... ... ... ...)))) (end (progn (defvar org-called-with-limited-levels) (defvar org-outline-regexp) (defvar outline-regexp) (defvar org-outline-regexp-bol) (let* (... ... ... ...) (org-entry-end-position))))) (message \"Creating LaTeX previews in section...\") (org--latex-preview-region beg end) (message \"Creating LaTeX previews in section... done.\"))))
org-latex-preview(nil)
funcall-interactively(org-latex-preview nil)
call-interactively(org-latex-preview nil nil)
command-execute(org-latex-preview)
"
Please report this to Org mode mailing list (M-x org-submit-bug-report). Disable showing Disable logging
--
Sent with https://mailfence.com
Secure and private email
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [BUG] Warning when creating preview
2023-08-18 13:20 [BUG] Warning when creating preview Edgar Lux
@ 2023-08-18 16:04 ` Ihor Radchenko
2023-08-19 0:37 ` Edgar Lux
2023-08-22 16:29 ` Edgar Lux
2023-10-11 9:11 ` Ihor Radchenko
1 sibling, 2 replies; 19+ messages in thread
From: Ihor Radchenko @ 2023-08-18 16:04 UTC (permalink / raw)
To: Edgar Lux; +Cc: Emacs Orgmode
Edgar Lux <edgarlux@mailfence.com> writes:
> I don't really need help with this. Org has been telling me for days
> that I should report this, but I don't really want to share my
> configuration publicly, and I thought that it was only for a file on
> which I was working. It seems to be general for my configuration. I
> hope that it helps. If you have an encrypted personal account to which
> I can send my config file, let me know.
You do not have to. If you wish, you can disable the warning by clicking
on Disable showing or Disable logging.
However, the warning indicates a problem with Org parser cache. Org
recovers from it, but not necessarily immediately. You may get certain
edits bugging out if the parser cache is not correct. For example,
certain edits may "lose" first star of a heading behind. That's why we
are so into the face of users with this warning you are seeing.
> * What happens
>
> When I type some equations and get the preview, I get this warning
>
> #+begin_quote
> \begin{gather}
> t = 0
> \end{gather}
> #+end_quote
>
> * My "system"
>
> Emacs : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6)
> of 2023-01-03
> Package: Org mode version 9.4.6 (release_9.4.6-13-g4be129)
>
> * The message
>
> Warning (org-element-cache): org-element--cache: Org parser error in t.org::35. Resetting.
> The error was: (error "Invalid search bound (wrong side of point)")
The Org version is very strange. Emacs 28 ships with Org 9.5.5 and the
latest stable version of Org available on ELPA is Org 9.6.7. The warning
comes from Org >9.6.
It appears to me that you have some problem with Org installation.
May you try to install the latest stable Org first, following
https://orgmode.org/manual/Installation.html? You should get M-x
org-version printing Org 9.6.7.
Then, let us know if the warning keeps appearing.
--
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] 19+ messages in thread
* Re: [BUG] Warning when creating preview
2023-08-18 16:04 ` Ihor Radchenko
@ 2023-08-19 0:37 ` Edgar Lux
2023-08-22 16:29 ` Edgar Lux
1 sibling, 0 replies; 19+ messages in thread
From: Edgar Lux @ 2023-08-19 0:37 UTC (permalink / raw)
To: Emacs Orgmode
On Aug 18, 2023 at 6:04 PM, Ihor Radchenko <yantar92@posteo.net> wrote:Edgar Lux <edgarlux@mailfence.com> writes:
> The Org version is very strange. Emacs 28 ships with Org 9.5.5 and the
> latest stable version of Org available on ELPA is Org 9.6.7. The warning
> comes from Org >9.6.
Super weird. I don't know why I ended up in some 9.4 branch (a246a1318), and when I did checkout master, I would still be there. Now in 9.7-pre
> Then, let us know if the warning keeps appearing.
I saw you holding your breath :P .
THAAANKS
--
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>
--
Sent with https://mailfence.com
Secure and private email
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [BUG] Warning when creating preview
2023-08-18 16:04 ` Ihor Radchenko
2023-08-19 0:37 ` Edgar Lux
@ 2023-08-22 16:29 ` Edgar Lux
2023-08-23 7:56 ` Ihor Radchenko
1 sibling, 1 reply; 19+ messages in thread
From: Edgar Lux @ 2023-08-22 16:29 UTC (permalink / raw)
To: Emacs Orgmode
On Aug 18, 2023 at 6:04 PM, Ihor Radchenko <yantar92@posteo.net> wrote:
> May you try to install the latest stable Org first, following
> https://orgmode.org/manual/Installation.html? You should get M-x
> org-version printing Org 9.6.7.
> Then, let us know if the warning keeps appearing.
* What happens
When I type some equations and get the preview, I get this warning
* Steps to reproduce
1. Type this equation
#+begin_quote
\begin{gather}
t = 0
\end{gather}
#+end_quote
2. Ask for preview =C-c C-x C-l= with point on the equation
3. Ask to remove preview (without moving point) =C-c C-x C-l=
4. You get the message (below)
If you repeat 1--3, the message is gone. It comes back if you remove the =./ltximg/<file>.svg=
* My "system"
#+begin_src emacs-lisp
(setq org-latex-pdf-process
'("xelatex -file-line-error -no-pdf -interaction nonstopmode -shell-escape -output-directory %o %f"
;; Check this too: https://tex.stackexchange.com/a/455164
"[[ -f %o/%b.idx ]] && texindy %o/%b.idx"
;; https://stackoverflow.com/a/57734531
;; "latexmk -pdfxe -bibtex %F") ; gives issues with silly errors
"latexmk -shell-escape -f -pdfxe -bibtex %F")
;; https://emacs.stackexchange.com/a/33172
org-preview-latex-process-alist
(quote ((dvisvgm :programs ("xelatex" "dvisvgm")
:description "dvi > svg"
:message ((concat
"you need to install the programs: "
"xelatex and dvisvgm."))
:use-xcolor t
:image-input-type "xdv"
:image-output-type "svg"
:image-size-adjust (1.3 . 1.5)
:latex-compiler ("xelatex -no-pdf -interaction nonstopmode -output-directory %o %f")
:image-converter ("dvisvgm %o%b.xdv -n -b min -c %S -o %O"))
))
org-preview-latex-default-process 'dvisvgm)
#+end_src
#+begin_src emacs-lisp
(format "%s\n%s"
(org-version)
(emacs-version))
#+end_src
#+RESULTS:
: 9.7-pre
: GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6)
: of 2023-01-03
Org commit: 3cbd9f423385bf725dc964a5cff573bba17db3ff
* The message
#+begin_example
Warning (org-element-cache): org-element--cache: Org parser error in t.org::189. Resetting.
The error was: (error "Invalid search bound (wrong side of point)")
Backtrace:
" backtrace-to-string(nil)
org-element-at-point()
org-element-context()
org-latex-preview(nil)
funcall-interactively(org-latex-preview nil)
call-interactively(org-latex-preview nil nil)
command-execute(org-latex-preview)
"
Please report this to Org mode mailing list (M-x org-submit-bug-report). Disable showing Disable logging
#+end_example
--
Sent with https://mailfence.com
Secure and private email
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [BUG] Warning when creating preview
2023-08-22 16:29 ` Edgar Lux
@ 2023-08-23 7:56 ` Ihor Radchenko
2023-08-26 15:39 ` Edgar Lux
0 siblings, 1 reply; 19+ messages in thread
From: Ihor Radchenko @ 2023-08-23 7:56 UTC (permalink / raw)
To: Edgar Lux; +Cc: Emacs Orgmode
Edgar Lux <edgarlux@mailfence.com> writes:
> * Steps to reproduce
>
> 1. Type this equation
>
> #+begin_quote
> \begin{gather}
> t = 0
> \end{gather}
> #+end_quote
>
> 2. Ask for preview =C-c C-x C-l= with point on the equation
>
> 3. Ask to remove preview (without moving point) =C-c C-x C-l=
>
> 4. You get the message (below)
I cannot get the message on my side.
I did (using Emacs 28 and also Emacs master):
1. Save the equation to file /tmp/bug.org
2. Save your `setq' snippet to /tmp/bug.el
3. cd /path/to/org/repo
4. make repro REPRO_ARGS="-l /tmp/bug.el /tmp/bug.org"
5. Move point to "t = 0" line
6. C-c C-x C-l (2x)
7. The preview appears and then disappears, as expected.
May you please repeat my steps and let me know if your are seeing the warning?
--
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] 19+ messages in thread
* Re: [BUG] Warning when creating preview
2023-08-23 7:56 ` Ihor Radchenko
@ 2023-08-26 15:39 ` Edgar Lux
2023-08-26 16:28 ` Ihor Radchenko
0 siblings, 1 reply; 19+ messages in thread
From: Edgar Lux @ 2023-08-26 15:39 UTC (permalink / raw)
To: Emacs Orgmode
On Aug 23, 2023 at 9:56 AM, Ihor Radchenko <yantar92@posteo.net>
> 1. Save the equation to file /tmp/bug.org
> 2. Save your `setq' snippet to /tmp/bug.el
> 3. cd /path/to/org/repo
> 4. make repro REPRO_ARGS="-l /tmp/bug.el /tmp/bug.org"
> 5. Move point to "t = 0" line
> 6. C-c C-x C-l (2x)
> 7. The preview appears and then disappears, as expected.
>
> May you please repeat my steps and let me know if your are seeing the warning?
1. emacs (loading my full configuration)
2. find the file of my previous bug report: t.org
3. dedent and mark the equation (without the =_quote=)
4. M-x copy-to-buffer RET bug.org RET
5. Save to /tmp/bug.org
6. add :tangle /tmp/bug.el to the emacs-lisp source block
7. C-u C-c C-v t to tangle (save) the file
8. find /path/to/org/repo (with dired)
9. M-& make repro REPRO_ARGS="-l /tmp/bug.el /tmp/bug.org"
10. M-x switch-to-buffer RET /tmp/bug.org RET
11. Move point to "t = 0" line
12. C-c C-x C-l (2x)
I see the warning.
After step 10, I removed the files in ltximg, ran =emacs -q=, find file /tmp/bug.org, step 11 & 12, and I see no warning. There must be something else in my configuration which triggers the error (if you want to follow the rabbit, let me know).
In this case, the warning was:
#+begin_example
Warning (org-element-cache): org-element--cache: Org parser error in bug.org::22. Resetting.
The error was: (error "Invalid search bound (wrong side of point)")
Backtrace:
" backtrace-to-string(nil)
org-element-at-point()
org-element-context()
org-latex-preview(nil)
funcall-interactively(org-latex-preview nil)
call-interactively(org-latex-preview nil nil)
command-execute(org-latex-preview)
"
Please report this to Org mode mailing list (M-x org-submit-bug-report). Disable showing Disable logging
#+end_example
--
Sent with https://mailfence.com
Secure and private email
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [BUG] Warning when creating preview
2023-08-26 15:39 ` Edgar Lux
@ 2023-08-26 16:28 ` Ihor Radchenko
2023-08-27 11:13 ` Edgar Lux
0 siblings, 1 reply; 19+ messages in thread
From: Ihor Radchenko @ 2023-08-26 16:28 UTC (permalink / raw)
To: Edgar Lux; +Cc: Emacs Orgmode
Edgar Lux <edgarlux@mailfence.com> writes:
> 9. M-& make repro REPRO_ARGS="-l /tmp/bug.el /tmp/bug.org"
Did you see a new Emacs instance at this point?
> 10. M-x switch-to-buffer RET /tmp/bug.org RET
> 11. Move point to "t = 0" line
> 12. C-c C-x C-l (2x)
>
> I see the warning.
>
> After step 10, I removed the files in ltximg, ran =emacs -q=, find file /tmp/bug.org, step 11 & 12, and I see no warning. There must be something else in my configuration which triggers the error (if you want to follow the rabbit, let me know).
Sure, I do want to go into this rabbit hole. This kind of problem is
runtime and very hard to catch unless we get help from users with
unusual configs.
--
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] 19+ messages in thread
* Re: [BUG] Warning when creating preview
2023-08-26 16:28 ` Ihor Radchenko
@ 2023-08-27 11:13 ` Edgar Lux
2023-08-27 11:28 ` Ihor Radchenko
0 siblings, 1 reply; 19+ messages in thread
From: Edgar Lux @ 2023-08-27 11:13 UTC (permalink / raw)
To: Emacs Orgmode
On Aug 26, 2023 at 6:28 PM, Ihor Radchenko <yantar92@posteo.net> wrote:
> Did you see a new Emacs instance at this point?
Nope. I just launched Emacs again (there is another instance running) and copied the command
>> 9. M-& make repro REPRO_ARGS="-l /tmp/bug.el /tmp/bug.org"
Shell buffer shows
#+begin_example
make -C doc cleanall; make -C etc cleanall; make -C lisp cleanall;
make[1]: Entering directory '/path/to/org/repo/doc'
rm -f *.pdf *.html *.info *_letter.tex org-version.inc org-version.tex \
*.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs *.toc \
*.tp *.tps *.vr *.vrs *.log *.ps
rm -f org.texi orgguide.texi
rm -fr guide manual
make[1]: Leaving directory '/path/to/org/repo/doc'
make[1]: Entering directory '/path/to/org/repo/etc'
make[1]: Nothing to be done for 'cleanall'.
make[1]: Leaving directory '/path/to/org/repo/etc'
make[1]: Entering directory '/path/to/org/repo/lisp'
rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc org-install.elc
rm -f *.elc
make[1]: Leaving directory '/path/to/org/repo/lisp'
rm -fr /tmp/tmp-orgtest || { \
find /tmp/tmp-orgtest -type d -exec chmod u+w {} + && \
rm -fr /tmp/tmp-orgtest ; \
}
find . \( -name \*~ -o -name \*# -o -name .#\* \) -exec rm -f {} +
find testing mk \( -name \*~ -o -name \*.elc \) -exec rm -f {} +
make -C lisp autoloads
make[1]: Entering directory '/path/to/org/repo/lisp'
rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc org-install.elc
org-version: 9.7-pre (release_9.6.7-698-g3cbd9f)
Loading /path/to/org/repo/lisp/org-compat.el (source)...
Loading /path/to/org/repo/mk/org-fixup.el (source)...
org-loaddefs: 9.7-pre (release_9.6.7-698-g3cbd9f)
Loading /path/to/org/repo/lisp/org-compat.el (source)...
Loading /path/to/org/repo/mk/org-fixup.el (source)...
make[1]: Leaving directory '/path/to/org/repo/lisp'
#+end_example
--
Sent with https://mailfence.com
Secure and private email
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [BUG] Warning when creating preview
2023-08-18 13:20 [BUG] Warning when creating preview Edgar Lux
2023-08-18 16:04 ` Ihor Radchenko
@ 2023-10-11 9:11 ` Ihor Radchenko
1 sibling, 0 replies; 19+ messages in thread
From: Ihor Radchenko @ 2023-10-11 9:11 UTC (permalink / raw)
To: Emacs Orgmode
Edgar Lux <edgarlux@mailfence.com> writes:
> Emacs : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6)
> of 2023-01-03
Hopefully, fixed now.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=37d6bde27
(the reproducer was found in a private email thread, and is not public)
--
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] 19+ messages in thread
end of thread, other threads:[~2023-10-11 9:10 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-18 13:20 [BUG] Warning when creating preview Edgar Lux
2023-08-18 16:04 ` Ihor Radchenko
2023-08-19 0:37 ` Edgar Lux
2023-08-22 16:29 ` Edgar Lux
2023-08-23 7:56 ` Ihor Radchenko
2023-08-26 15:39 ` Edgar Lux
2023-08-26 16:28 ` Ihor Radchenko
2023-08-27 11:13 ` Edgar Lux
2023-08-27 11:28 ` Ihor Radchenko
2023-08-27 17:26 ` Edgar Lux
2023-08-27 17:29 ` Ihor Radchenko
[not found] ` <1064170796.778390.1693179229311@ichabod.co-bxl>
2023-08-28 9:00 ` Ihor Radchenko
2023-09-28 14:21 ` Edgar Lux
2023-09-28 14:53 ` Edgar Lux
2023-10-02 10:14 ` Edgar Lux
2023-10-05 14:31 ` Ihor Radchenko
[not found] ` <1472786502.941.1696851881089@ichabod.co-bxl>
2023-10-09 13:59 ` Edgar Lux
2023-10-09 14:17 ` Edgar Lux
2023-10-11 9:11 ` Ihor Radchenko
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).