* [BUG] setting org-element-use-cache to nil doesn't seem to disable element cache [9.7.3 (release_9.7.3 @ /usr/share/emacs/30.0.50/lisp/org/)]
@ 2024-06-16 7:42 Platon Pronko
2024-06-19 14:30 ` Ihor Radchenko
0 siblings, 1 reply; 6+ messages in thread
From: Platon Pronko @ 2024-06-16 7:42 UTC (permalink / raw)
To: emacs-orgmode
I've attempted to disable the element cache using `(setq org-element-use-cache nil)`.
However, it seems that cache is still in use, because I'm regularly getting org-element--cache errors like:
⛔ Warning (org-element): org-element--cache: Org parser error in todo-routine.org::55572. Resetting.
The error was: (error "Not an Org time string: <2024-0-15 Sat .+1m")
Emacs : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.42, cairo version 1.18.0)
of 2024-06-12
Package: Org mode version 9.7.3 (release_9.7.3 @ /usr/share/emacs/30.0.50/lisp/org/)
current state:
==============
(setq
org-special-ctrl-a/e t
org-yank-image-file-name-function 'org-yank-image-autogen-filename
org-persist-before-write-hook '(org-element--cache-persist-before-write)
org-deadline-warning-days 1
org-M-RET-may-split-line nil
org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate)
org-persist-after-read-hook '(org-element--cache-persist-after-read)
org-confirm-elisp-link-function 'yes-or-no-p
org-log-done 'time
org-mode-hook '(#[0 "\301\211\x10\207" [imenu-create-index-function org-imenu-get-tree] 2]
#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-fold-show-all append local] 5]
#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec
org-babel-hide-all-hashes)
org-confirm-shell-link-function 'yes-or-no-p
org-archive-hook '(org-attach-archive-delete-maybe)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-occur-hook '(org-first-headline-recenter)
org-ellipsis " [+]"
org-agenda-scheduled-leaders '("Scheduled: " "%2d d. ago: ")
org-bibtex-headline-format-function 'org-bibtex-headline-format-default
org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link) ("w3m" :store org-w3m-store-link)
("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link)
("irc" :follow org-irc-visit :store org-irc-store-link :export org-irc-export)
("info" :follow org-info-open :export org-info-export :store org-info-store-link :insert-description org-info-description-as-command)
("id" :follow org-id-open :store org-id-store-link-maybe) ("gnus" :follow org-gnus-open :store org-gnus-store-link)
("eww" :follow org-eww-open :store org-eww-store-link)
("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link)
("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("file+sys")
("file+emacs") ("shell" :follow org-link--open-shell)
("news" :follow #[514 "\301\300\302\x04Q\x02\"\207" ["news" browse-url ":"] 6 ("/usr/share/emacs/30.0.50/lisp/org/ol.elc" . 50874)])
("mailto" :follow #[514 "\301\300\302\x04Q\x02\"\207" ["mailto" browse-url ":"] 6 ("/usr/share/emacs/30.0.50/lisp/org/ol.elc" . 50874)])
("https" :follow #[514 "\301\300\302\x04Q\x02\"\207" ["https" browse-url ":"] 6 ("/usr/share/emacs/30.0.50/lisp/org/ol.elc" . 50874)])
("http" :follow #[514 "\301\300\302\x04Q\x02\"\207" ["http" browse-url ":"] 6 ("/usr/share/emacs/30.0.50/lisp/org/ol.elc" . 50874)])
("ftp" :follow #[514 "\301\300\302\x04Q\x02\"\207" ["ftp" browse-url ":"] 6 ("/usr/share/emacs/30.0.50/lisp/org/ol.elc" . 50874)])
("help" :follow org-link--open-help :store org-link--store-help) ("file" :complete org-link-complete-file)
("elisp" :follow org-link--open-elisp))
org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
org-agenda-skip-comment-trees nil
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
org-sort-function 'string-collate-lessp
org--warnings nil
org-babel-pre-tangle-hook '(save-buffer)
org-agenda-prefix-format '((agenda . " %?-12t% s") (todo . " "))
org-export-before-parsing-hook '(org-attach-expand-links)
org-link-shell-confirm-function 'yes-or-no-p
org-fold-core-isearch-open-function 'org-fold-core--isearch-reveal
outline-isearch-open-invisible-function 'outline-isearch-open-invisible
org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
org-modules '(ol-bbdb ol-bibtex ol-docview ol-eww ol-gnus org-habit ol-info ol-irc ol-mhe ol-rmail ol-w3m)
org-agenda-loop-over-headlines-in-active-region nil
org-agenda-files '("/home/redacted/todo.org")
org-link-elisp-confirm-function 'yes-or-no-p
org-startup-indented t
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-cycle-optimize-window-after-visibility-change
org-cycle-display-inline-images)
org-persist-before-read-hook '(org-element--cache-persist-before-read)
org-agenda-sorting-strategy '((agenda habit-up deadline-down priority-down category-keep) (todo priority-down category-keep)
(tags priority-down category-keep) (search category-keep))
org-agenda-skip-archived-trees nil
)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] setting org-element-use-cache to nil doesn't seem to disable element cache [9.7.3 (release_9.7.3 @ /usr/share/emacs/30.0.50/lisp/org/)]
2024-06-16 7:42 [BUG] setting org-element-use-cache to nil doesn't seem to disable element cache [9.7.3 (release_9.7.3 @ /usr/share/emacs/30.0.50/lisp/org/)] Platon Pronko
@ 2024-06-19 14:30 ` Ihor Radchenko
2024-06-20 7:52 ` Platon Pronko
0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2024-06-19 14:30 UTC (permalink / raw)
To: Platon Pronko; +Cc: emacs-orgmode
Platon Pronko <platon7pronko@gmail.com> writes:
> I've attempted to disable the element cache using `(setq org-element-use-cache nil)`.
>
> However, it seems that cache is still in use, because I'm regularly getting org-element--cache errors like:
>
> ⛔ Warning (org-element): org-element--cache: Org parser error in todo-routine.org::55572. Resetting.
> The error was: (error "Not an Org time string: <2024-0-15 Sat .+1m")
This particular warning may also happen when cache is disabled.
You encountered some error with Org parser.
Any chance you can create a reproducer?
--
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] 6+ messages in thread
* Re: [BUG] setting org-element-use-cache to nil doesn't seem to disable element cache [9.7.3 (release_9.7.3 @ /usr/share/emacs/30.0.50/lisp/org/)]
2024-06-19 14:30 ` Ihor Radchenko
@ 2024-06-20 7:52 ` Platon Pronko
2024-06-20 14:30 ` Ihor Radchenko
0 siblings, 1 reply; 6+ messages in thread
From: Platon Pronko @ 2024-06-20 7:52 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
> This particular warning may also happen when cache is disabled.
> You encountered some error with Org parser.
>
> Any chance you can create a reproducer?
>
Yes. Looks like this particular error is related to org-startup-indented:
1. Create file reproducer.org with contents:
* TODO item
DEADLINE: <2024-07-10 .+1d>
2. Launch Emacs with org-startup-indented=t:
$ emacs -Q --eval "(progn (require 'org) (setq org-startup-indented t))" reproducer.org
3. Delete one character from the date to make it invalid. For example delete the "4" so that the file becomes:
* TODO item
DEADLINE: <202-07-10 .+1d>
4. Observe the error:
⛔ Warning (org-element): org-element--cache: Org parser error in reproducer.org::13. Resetting.
The error was: (error "Not an Org time string: <202-07-10 .+1d")
Backtrace:
nil
Please report this to Org mode mailing list (M-x org-submit-bug-report).
--
Best regards,
Platon Pronko
PGP 2A62D77A7A2CB94E
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] setting org-element-use-cache to nil doesn't seem to disable element cache [9.7.3 (release_9.7.3 @ /usr/share/emacs/30.0.50/lisp/org/)]
2024-06-20 7:52 ` Platon Pronko
@ 2024-06-20 14:30 ` Ihor Radchenko
2024-06-21 8:58 ` Platon Pronko
0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2024-06-20 14:30 UTC (permalink / raw)
To: Platon Pronko; +Cc: emacs-orgmode
Platon Pronko <platon7pronko@gmail.com> writes:
>> Any chance you can create a reproducer?
> ...
> Yes. Looks like this particular error is related to org-startup-indented:
>
> 1. Create file reproducer.org with contents:
> * TODO item
> DEADLINE: <2024-07-10 .+1d>
>
> 2. Launch Emacs with org-startup-indented=t:
> $ emacs -Q --eval "(progn (require 'org) (setq org-startup-indented t))" reproducer.org
>
> 3. Delete one character from the date to make it invalid. For example delete the "4" so that the file becomes:
> * TODO item
> DEADLINE: <202-07-10 .+1d>
Thanks!
This appears to be an old bug in the parser.
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=9f4f7338d
Not for bugfix release as I do not want to break the parser accidentally
without testing, and the problem appears to rare enough to not call it
critical.
--
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] 6+ messages in thread
* Re: [BUG] setting org-element-use-cache to nil doesn't seem to disable element cache [9.7.3 (release_9.7.3 @ /usr/share/emacs/30.0.50/lisp/org/)]
2024-06-20 14:30 ` Ihor Radchenko
@ 2024-06-21 8:58 ` Platon Pronko
2024-06-21 9:12 ` Ihor Radchenko
0 siblings, 1 reply; 6+ messages in thread
From: Platon Pronko @ 2024-06-21 8:58 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
> Thanks!
> This appears to be an old bug in the parser.
> Fixed, on main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=9f4f7338d
>
> Not for bugfix release as I do not want to break the parser accidentally
> without testing, and the problem appears to rare enough to not call it
> critical.
Tested the fix, the problem seems to be gone. Thank you!
However, regarding the original problem about cache seemingly being active - I do often notice that there are other issues with text highlighting (dates/todo markers/etc) and indentation breaking seemingly without reason. I will keep looking for these issues, but making a reliable reproducer for them is hard.
--
Best regards,
Platon Pronko
PGP 2A62D77A7A2CB94E
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] setting org-element-use-cache to nil doesn't seem to disable element cache [9.7.3 (release_9.7.3 @ /usr/share/emacs/30.0.50/lisp/org/)]
2024-06-21 8:58 ` Platon Pronko
@ 2024-06-21 9:12 ` Ihor Radchenko
0 siblings, 0 replies; 6+ messages in thread
From: Ihor Radchenko @ 2024-06-21 9:12 UTC (permalink / raw)
To: Platon Pronko; +Cc: emacs-orgmode
Platon Pronko <platon7pronko@gmail.com> writes:
> However, regarding the original problem about cache seemingly being
> active - I do often notice that there are other issues with text
> highlighting (dates/todo markers/etc) and indentation breaking
> seemingly without reason. I will keep looking for these issues, but
> making a reliable reproducer for them is hard.
To be 100% clear, cache might get activated for short periods even when
you set org-element-use-cache to nil. But that happens only for the
duration of a single (expensive) command and the cache is discarded
immediately after. It may theoretically cause problems when you perform
some kinds of commands that edit multiple headings/other objects in
region: org-encrypt-entries, org-decrypt-entries, setting tags in
region, setting deadlines/scheduled in region, and archiving.
Text highlighting in particular should not be affected, AFAIK.
If there are problems with fontification, you may try setting
`backtrace-on-redisplay-error'. If there are any problems during
fontification, the last one will be recorded in *Redisplay-trace* buffer
(the buffer itself is not auto-displayed, you need to switch to it
manually).
--
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] 6+ messages in thread
end of thread, other threads:[~2024-06-21 9:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-16 7:42 [BUG] setting org-element-use-cache to nil doesn't seem to disable element cache [9.7.3 (release_9.7.3 @ /usr/share/emacs/30.0.50/lisp/org/)] Platon Pronko
2024-06-19 14:30 ` Ihor Radchenko
2024-06-20 7:52 ` Platon Pronko
2024-06-20 14:30 ` Ihor Radchenko
2024-06-21 8:58 ` Platon Pronko
2024-06-21 9:12 ` 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.