From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id d8CANchDGmbgSgAAqHPOHw:P1 (envelope-from ) for ; Sat, 13 Apr 2024 10:35:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id d8CANchDGmbgSgAAqHPOHw (envelope-from ) for ; Sat, 13 Apr 2024 10:35:20 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=P7uvzl+i; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712997320; a=rsa-sha256; cv=none; b=nuGvCwhS+rRhSOriuSF42MMStdAlk3HccnUp48Z7TxX+nmlwnjAVCiLcq/jkoK8RwgA4O/ 11DOgX24V3g5qSo2jyAPhVIcFFGQKQ61V4GaK8vkZ7WB5eD3s6rbUNMtXBXqkLIEwg64Su WI88X+WIU8a5gmhiniaUq6FxMfwcgYCg5pJ9WD9PklsnW6x6l/53rDiZLvCa6j2jfRvYzo sTAtfJ2suDI4ozYXqrwA0a/w9PD2qQChL1Q81CoPEkPujbnuHDNzFf7yMJanTOr9jRrnb6 ilbXnKR/F8/gLtBfQAuc6lFEuG46x/EhGDt04QzHx1F+peAhhMvUpDgn1yRwPw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=P7uvzl+i; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712997320; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=5icNCmIv83vIB0WRw5kqDxUo2zo/Pe3Vr+Pzvy3wQ/o=; b=MU2xpoKfetDTt+uk4yGDt3zTdHcas1veAOOkDKUnoKXlTSxlH4qVA1VhnL+9gG8DYIi1rC Gbv/YwVl+jlV1KQZYUL5hWqwIB74yR2dt83HAlFaviGg3g0js/mMrUIrsNlZp519K0a7KP dJ7w45iR6Pzn6+1e9zboYQu7HLp5S3Oxwz/QmGr/UN+Iny5mPhUum2yVgKggK3pPjjv79D wmuuorqYsqJKWlZjolAPVRW/X98Sn7mFVMGhKbpzLNXe2cJG2CFfri+OMP09fP18sd45bl HoYnAnheflhqHyZxxde5aTgpHXLwkRTn8iKHIzdsJgGGEAZh/cmHLM4lHoD4fA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5DFBE210C4 for ; Sat, 13 Apr 2024 10:35:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rvYqQ-0002Pv-13; Sat, 13 Apr 2024 04:34:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rvYqO-0002PW-95 for emacs-orgmode@gnu.org; Sat, 13 Apr 2024 04:34:40 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rvYqJ-0004qC-CG for emacs-orgmode@gnu.org; Sat, 13 Apr 2024 04:34:40 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-5171a529224so2036545e87.0 for ; Sat, 13 Apr 2024 01:34:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712997272; x=1713602072; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=5icNCmIv83vIB0WRw5kqDxUo2zo/Pe3Vr+Pzvy3wQ/o=; b=P7uvzl+iBYKkGIrYeQCF5Ta6Gc7fX6/rLTBbtjZ7r+XfvvpUzHgcBDmiuJi8sA8t56 GXcin7U77MJBqpBoHpE/hZvkePFRkHRTlpGp8TEYU13zDrX7TLQruDJ1jj6Wr7nMdTL8 gRkD9mCEK/MTQFqLeadKl2UcRdyeIjUz+z0vBYisabPIB+Jm6GolKnblqIRIum3V31cC OpgCCOk2Y9ZXhyWrQZVARB4jTAMxmT+jgSnGm/wIlrNn6GLBRFE+bNKDuDDY8FsnFPS2 OzZMEcOKO/y/YSHnDCwT10PzrtNvMmzZIujBiph2m33G+IcaZf99MP+9mdVNFTkSCexu ljkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712997272; x=1713602072; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5icNCmIv83vIB0WRw5kqDxUo2zo/Pe3Vr+Pzvy3wQ/o=; b=AyzD9R8810khYhHwnaEqEpIxS1o2lZzwzGk68jV6wMetnv/4VEKivMPaDWwnkgjhNJ FtUtdw5LE18oRCQHdug7LBqsq9xIhqOAolpa/ugGh0VYrsHu1b40PixZgFCvAQyyCVdK WPzgdjyxZ60StEh9c9pdQ/avja4HOKDTNJO9AF+0i+/8R+4se9GWEIwe4lfdYNZ89/fB FTUWUpo+n7A3MJLSeVjdjWHX6jU+Qygd1xEVcutbRTOX+3iNmoUSfmbAKYLJVmUzgy+h 5iAuBP+IMuknrEq9eW4eXscKadDy2EMMY51zStNM2yfhjcWhO0iS4x9VTQA0Dlhf81h7 LDKw== X-Gm-Message-State: AOJu0YwqtFNpBe87eSwkKF7hac23Sw83GyQ6E83HUOZiKbTL9wzOiO1V VlAff9uTk4r2Ak/ntdaZfEgPiEORNlrYtqH5TYHtYzt2cRGvMDG+vy3EiLjj/ZuDwHuZcyuAt2i cH/C1f6tuNt/g6qdrksM9CYmw9UBKPP0ayo0= X-Google-Smtp-Source: AGHT+IE8DJqCU5L9Tvj1VTg+Awc2C6HJ8/1VviuiEvGzgOMTXhFhWGDvtKTlACetD/BLZ9vIZLICL2UnGOHpZMMq1UA= X-Received: by 2002:a05:6512:2506:b0:518:9ab5:a987 with SMTP id be6-20020a056512250600b005189ab5a987mr2060937lfb.18.1712997272367; Sat, 13 Apr 2024 01:34:32 -0700 (PDT) MIME-Version: 1.0 From: Garid Zorigoo Date: Sat, 13 Apr 2024 17:34:16 +0900 Message-ID: Subject: [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/)] To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000ebbc290615f641a9" Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=garidzorigoo@gmail.com; helo=mail-lf1-x135.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -7.89 X-Migadu-Queue-Id: 5DFBE210C4 X-Migadu-Spam-Score: -7.89 X-Migadu-Scanner: mx10.migadu.com X-TUID: evnk/jCgMA5L --000000000000ebbc290615f641a9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable * What I'm experiencing: A custom ~org-num-format-function~ causes ~org-latex-preview~ warn when it is called. * Exact "Warning" I'm getting. =E2=9B=94 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/) --000000000000ebbc290615f641a9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
* What I'm experiencing:
A custom ~org-num-f= ormat-function~ causes ~org-latex-preview~ warn when it is called.

*= Exact "Warning" I'm getting.
=E2=9B=94 Warning (org-eleme= nt-cache): org-element--cache: Org parser error in ask.org::648. Resetting.=
=C2=A0The error was: (error "Invalid search bound (wrong side of p= oint)")
=C2=A0Backtrace:
nil
=C2=A0
* Info about when this= Warning comes:
- Warning comes up when equation change from "previ= ewed-state (image)" back to "text-state"
- Warning only c= omes when the equation is changed.

* Setup (the custom ~org-num-form= at-function~)=C2=A0
#+begin_src elisp
(defun my/org-num-format (numbe= ring)
=C2=A0 =C2=A0 (concat
=C2=A0 =C2=A0 =C2=A0(number-to-string (ca= r numbering)) "." (mapconcat (lambda (x) (format "%02d"= x)) (cdr numbering) ".") " "))

(setq org-num-fo= rmat-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)=C2=A0
(If warning doesn't appear = try from step 3 again)
(When org-num-mode turned off, it doesn'= ;t produce warning)

=C2=A0 =C2=A0$\alpha$


Emacs =C2=A0: G= NU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo ve= rsion 1.18.0)
Package: Org mode version 9.6.15 (release_9.6.15 @ /usr/sh= are/emacs/29.3/lisp/org/)
--000000000000ebbc290615f641a9--