-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hanging after hit save (:w
) with emacs 28
#109
Comments
Thank you for reporting. This screen shot was taken from GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0) of 2021-11-13 (native-compile). I will try with Windows and Emacs 27.2 later. Is it possible for you to try without Doom (e.g. I have heard it has a sandbox system to remove Doom configuration) by any chance? |
Thanks @nobiot i finally found a way to dehang / defreeze running
I try without doom if i found way to do that. |
It could be also related to #105 -- the issue will start to appear with Org v9.6, which Doom pulls in. I'm still using 9.5 and 9.4 (9.6 has not been released yet). |
I try with doom sandbox mode with vanilla, but that create other errors because langage in org-babel are not loaded automatically outside doom, i will retry tonight after reading some doc. I try to rebuild doom + emacs 28 + pin to previous org mode to see (https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tag/?h=release_9.5) Edit : I have errors when i !pin org to another version ... so it seems this is not a good pratice : doomemacs/doomemacs#5721 say @hlissner I retry by rebuilding |
@nobiot I confirm even with doom sandbox and emacs vanilla, i cannot use org-transclusion :-/ Transcluded code is correctly added to buffer in READ-MODE, but i can't execute That don't freeze, but that also don't work "snif ..." |
I think that's the limitation noted in readme -- it's the issue with noweb.
I don't use it and don't really know what it does. Is it possible for you to not use it? It seems to try to replace the transcluded region, which it cannot because the region is read-only. You might be able to temporarily disable read-only as discussed in issue #86 for export. |
Noweb is a really powerfull functionality present originaly in Literate Programing of Donald Knuth. There is two possibility, the You have very simple example here : https://orgmode.org/manual/Noweb-Reference-Syntax.html And for real example of usage : I will try by removing noweb |
I think I have made See below. If you have time, I'd appreciate if you tested this with the latest commit. test.org is this (copied from https://orgmode.org/manual/Noweb-Reference-Syntax.html)
Org-transclusion is part of ELPA. There is To use ELPA-devel, you would need to add this to variable
For Doom, it might be easier to get the source from GitHub. |
Sorry for the delay, i will try before or after the 1/1/22 Happy new year and thanks again for this package ;) |
@reyman The change is now pushed to the latest (stable) ELPA release http://elpa.gnu.org/packages/org-transclusion.html so I believe you can simply use |
I've rolled back to Org 9.5 but I still experience the issue when saving buffer. it is duplicating the links... Update: my issue turned out to be caused by real-auto-save, which doesn't have much functionality to be causing a problem... Update 2: it seems like it is the combination of org 9.6 and real-auto-save... |
This is certainly a critical issue and I would love to reproduce and fix it. I'd appreciate it if you can:
At the moment, I cannot reproduce it. I just tried with the following:
|
Reported in GitHub issues #109 #177. I cannot reproduce the issue myself so far. I am put in place (1) small preventive measure and (2) heuristics to defect and break the infinite loop on save-buffer. (1) Org-transclusion (OT) tries not to save the transcluded buffer content and instead save only the #+transclude keyword line to the file. To achieve this, OT uses 'before-' and 'after-save-hook' to remove-all the transclusions and then add-all them. This operation relies on the returned value of the point from 'org-transclusion-remove' function. In this commit, the point (integer) is changed to marker. This way, any arbitrary buffer change between these remove-all and add-all processes can have less impact on the moving points of reference -- makers automatically move to adopt to the new buffer state. I suspect something like 'whitespace-cleanup` put in 'before-save-buffer' might dislocate the positions in some situations. This preventive measure hopefully preempt the issues. (2) The heuristics is simple but should work if there is an unexpected number loop happens. Since it is simply compare the length of a list, and the 'dolist' loops for the same list, logically this should be redundant; however, since the infinite loop itself to me is anomaly, this heuristics might catch the issue and break the loop. As you can see, both attempts are not based on causal analysis but rather "stabbing in the dark" heuristics.
In order to contain the issue of infinite loop, I have pushed commit 43c478c. I'd appreciate it if anyone has bumped into the error message: "org-transclusion: Aborting. You may be in an infinite loop". fix: heuristics to identify & break infinite loop on save Reported in GitHub issues #109 #177. I cannot reproduce the issue myself so far. I am putting in place (1) (1) Org-transclusion (OT) tries not to save the transcluded buffer (2) The heuristics is simple but should work if there is an unexpected As you can see, both attempts are not based on causal analysis but rather |
Even running with -debug-init, emacs Freezing/Hanging problem when saving (
:w
) with transclude mode running : garbage collecting running infinitly.Emacs
GNU Emacs 28.0.90 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2021-12-15
Org file transcluded (my-file.org) :
Into main.org, call to function in the transcluded file :
Doom version
v21.12.0-alpha
A debug trace i have sometimes when i hit
:w
The text was updated successfully, but these errors were encountered: