nobiot / org-transclusion

Emacs package to enable transclusion with Org Mode
https://nobiot.github.io/org-transclusion/
GNU General Public License v3.0
917 stars 44 forks source link

Warning (emacs): org-element--cache: Unregistered buffer modifications detected. Resetting #105

Closed nobiot closed 2 years ago

nobiot commented 2 years ago

This is to record and serve as a reminder for a issue raised in Org-mode mailing list.

Source in Org-mode mailing list

https://list.orgmode.org/87wnlmpdf1.fsf@mat.ucm.es/

Related to https://list.orgmode.org/m2bl36sfrw.fsf@gmail.com/

The problem is on development version. It is related to latest changes to org-element-cache (previously, cache would fail terribly instead of showing the warning). Org must keep track of changes in buffer to maintain element cache. org-transclusion uses with-silent-modifications macro, which prevents org-element-cache from working properly. I recommend dropping with-silent-modifications or at least using combine-after-change-calls.

tim-uni commented 2 years ago

I am facing this issue at the moment (emacs 28.0.90 with doom develop package status) when enabling transcludes. Is there any information I could provide to support your development efforts?

nobiot commented 2 years ago

Thank you for reporting this. It’s a known issue and will start happening with Org 9.6 (unreleased at the moment).

I need to work with Org upstream developers to properly address this issue but at the moment I was advised that you could simply suppress the warning message.

I am not with my PC at the moment so I cannot search for the source of this information or tell you how you might suppress the message (if you are interested, you can look up the Org’s development mailinglist in October or November this year).

Hope this helps for now.

I’ll also update the documentation once I get chance.

tim-uni commented 2 years ago

Thanks for getting back to me. In the buffer that appears with the warning there is also a link-like text saying "stop showing this" and "stop logging this" (or similar), clicking it made the warnings disappear. And I am indeed using org 9.6 already.

edit: you can also (setq warning-suppress-types (append warning-suppress-types '((org-element-cache))))

nobiot commented 2 years ago

Thank you. Good to know. I hope I can get to this issue soon-ish but realistically it will be in the new year... Have a great holiday season.

nobiot commented 2 years ago

Hopefully the latest commit has fixed the warning -- forward porting (?) to for Org v9.6 currently unreleased.

nobiot commented 2 years ago

I believe The latest ELPA release v1.1.1 has fixed this issue.

andrej1919 commented 1 year ago

I have Emacs 28.1 (9.0) on Mac, fresh install of Doom and org-roam. It does not matter how I save the buffer (:w or C-c), this error appears in any case:

Warning (org-element-cache): org-element--cache: Unregistered buffer modifications detected. Resetting. If this warning appears regularly, please report the warning text to Org mode mailing list (M-x org-submit-bug-report). The buffer is: *temp* Current command: find-file Backtrace: nil Disable showing Disable logging

yantar92 commented 1 year ago

andrej1919 @.***> writes:

I have Emacs 28.1 (9.0) on Mac, fresh install of Doom and org-roam. It does not matter how I save the buffer (:w or C-c), this error appears in any case:

Warning (org-element-cache): org-element--cache: Unregistered buffer modifications detected. Resetting. If this warning appears regularly, please report the warning text to Org mode mailing list (M-x org-submit-bug-report). The buffer is: *temp* Current command: find-file Backtrace: nil Disable showing Disable logging

As the warning states, please submit this to Org mailing list.

-- Ihor Radchenko, 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

andrej1919 commented 1 year ago

As the warning states, please submit this to Org mailing list.

Done. Thank you, I was not sure whom to communicate as this issue appears just while saving Org Roam files.

nobiot commented 1 year ago

@andrej1919 Do you use Org-transclusion? You mention Org-roam and I don’t maintain it.

@yantar92 I’d appreciate it if you could let me know if I should change something in Org-transclusion—I thought I followed your initial advice and fixed the issue then (as the linked commit above).

andrej1919 commented 1 year ago

@nobiot Not yet, just started with Org Roam. Thank you for directing me to Org-transclusion.

nobiot commented 1 year ago

@andrej1919 You're welcome. Just to be sure: You raised this issue for Org mode that you experience with Org-roam in the repository of Org-transclusion -- a wrong repository. I think confusion has now been cleared.

I am sure you are in good hands now.

akashpal-21 commented 4 months ago

For self reference -- -- creating a cross reference with a bug that causes infinite warnings to be generated.

243

I reckon this bug and that is related. Will need to be solved at future point of time.