Nick Dokos <ndo...@gmail.com> writes: > York Zhao <gtdplatf...@gmail.com> writes: > >> Hi List, >> >> I have an org-mode file that is 3230004 bytes in size. With commit "92f30ae" >> it >> can be opened without any problem. However, with commit "5ea0228" the same >> file >> could not be opened properly. >> >> What I did was: I opened Dired buffer, select the file, press enter, nothing >> happened and Emacs locks up, hit C-g to get out, and I noticed that the file >> had >> actually been opened, so I just visited the buffer, this time the contents of >> the file appeared, but my org-tables are not fontified at all. >> >> Just now I tried again, this time I toggled "debug on error" on, closed the >> file, and tried to open the file, again, Emacs locks up, hit C-g and my emacs >> revived, again, the file had been opened, just didn't show up. So I visited >> the >> buffer, this time my org-tables are fontified properly. >> >> What's the problem do you think this could be? >> >> > Sounds like an infinite loop, but there isn't enough information to > determine where. Can you set debug-on-quit, try again and post the > backtrace? >
I tried and failed to reproduce the problem. In a private communication (I hope he reposts it to the list), the OP said that he *had* turned on debug-on-quit (he misspoke when he said debug-on-error) but there was no backtrace when he pressed C-g (that in itself indicates a problem, either with emacs or with the OP's setup.) He mentioned that he was using a derived mode, so I tried to reproduce the problem with the following minimal org file: --8<---------------cut here---------------start------------->8--- (add-to-list 'load-path "~/src/emacs/org/org-mode/lisp") (add-to-list 'load-path "~/src/emacs/org/org-mode/contib/lisp") (require 'org-loaddefs) (define-derived-mode ndk-mode org-mode "ndk") (add-to-list 'auto-mode-alist '("\\.ndk$" . ndk-mode)) --8<---------------cut here---------------end--------------->8--- I copied an org file (albeit a small one: 15K - I don't have anything as big as the OP's 3Mb file) to foo.ndk and started emacs with emacs -Q -l /path/to/minimal/min.org.el foo.ndk Everything works as expected and I don't get a hang/inf-loop or any other problem. It may be that hack-local-variables takes a long time to process a large file, although I don't think so: iirc, it limits itself to a tail of the file of a given size, or the last "page" of the file (demarcated by ^L), whichever is smaller. Does CPU utilization go to 100% (on the core that emacs is running on) when emacs is unresponsive? Does emacs -Q with a minimal org file as above solve the problem (i.e. is the problem with the OP's .emacs)? Questions, questions... Nick