* [BUG] A custom org-num-format-function causes org-latex-preview warn when it called. [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.3/lisp/org/)]
@ 2024-04-13 8:34 Garid Zorigoo
2024-04-13 13:00 ` Ihor Radchenko
0 siblings, 1 reply; 3+ messages in thread
From: Garid Zorigoo @ 2024-04-13 8:34 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1468 bytes --]
* What I'm experiencing:
A custom ~org-num-format-function~ causes ~org-latex-preview~ warn when it
is called.
* Exact "Warning" I'm getting.
⛔ Warning (org-element-cache): org-element--cache: Org parser error in
ask.org::648. Resetting.
The error was: (error "Invalid search bound (wrong side of point)")
Backtrace:
nil
* Info about when this Warning comes:
- Warning comes up when equation change from "previewed-state (image)" back
to "text-state"
- Warning only comes when the equation is changed.
* Setup (the custom ~org-num-format-function~)
#+begin_src elisp
(defun my/org-num-format (numbering)
(concat
(number-to-string (car numbering)) "." (mapconcat (lambda (x) (format
"%02d" x)) (cdr numbering) ".") " "))
(setq org-num-format-function #'my/org-num-format)
#+end_src
#+RESULTS:
: my/org-num-format
* To Reproduce
1. Change the org-num-format-function as written above
2. (In org-file) Turn-on ~org-num-mode~
3. (In org-file) On any equation, change it.
4. run ~org-latex-preview~ to preview the equation image.
5, run ~org-latex-preview~ go back to text mode. (here warning comes)
(If warning doesn't appear try from step 3 again)
(When org-num-mode turned off, it doesn't produce warning)
$\alpha$
Emacs : GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.41, cairo version 1.18.0)
Package: Org mode version 9.6.15 (release_9.6.15 @
/usr/share/emacs/29.3/lisp/org/)
[-- Attachment #2: Type: text/html, Size: 1720 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [BUG] A custom org-num-format-function causes org-latex-preview warn when it called. [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.3/lisp/org/)]
2024-04-13 8:34 [BUG] A custom org-num-format-function causes org-latex-preview warn when it called. [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.3/lisp/org/)] Garid Zorigoo
@ 2024-04-13 13:00 ` Ihor Radchenko
2024-04-19 12:20 ` Ihor Radchenko
0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2024-04-13 13:00 UTC (permalink / raw)
To: Garid Zorigoo; +Cc: emacs-orgmode
Garid Zorigoo <garidzorigoo@gmail.com> writes:
> * To Reproduce
>
> 1. Change the org-num-format-function as written above
> 2. (In org-file) Turn-on ~org-num-mode~
> 3. (In org-file) On any equation, change it.
> 4. run ~org-latex-preview~ to preview the equation image.
> 5, run ~org-latex-preview~ go back to text mode. (here warning comes)
> (If warning doesn't appear try from step 3 again)
> (When org-num-mode turned off, it doesn't produce warning)
>
> $\alpha$
Thanks for reporting!
I was able to reproduce using the provided steps using the built-in Org
mode version and using the latest stable Org mode version.
However, I am unable to reproduce using the latest development Org mode
version.
--
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] 3+ messages in thread
* Re: [BUG] A custom org-num-format-function causes org-latex-preview warn when it called. [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.3/lisp/org/)]
2024-04-13 13:00 ` Ihor Radchenko
@ 2024-04-19 12:20 ` Ihor Radchenko
0 siblings, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2024-04-19 12:20 UTC (permalink / raw)
To: Garid Zorigoo; +Cc: emacs-orgmode
Ihor Radchenko <yantar92@posteo.net> writes:
> I was able to reproduce using the provided steps using the built-in Org
> mode version and using the latest stable Org mode version.
> However, I am unable to reproduce using the latest development Org mode
> version.
Handled.
--
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] 3+ messages in thread
end of thread, other threads:[~2024-04-19 12:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-13 8:34 [BUG] A custom org-num-format-function causes org-latex-preview warn when it called. [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.3/lisp/org/)] Garid Zorigoo
2024-04-13 13:00 ` Ihor Radchenko
2024-04-19 12:20 ` 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.