From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: commit 5ea0228 has problem opening big org-mode file Date: Mon, 25 Nov 2013 11:57:10 -0500 Message-ID: <878uwcbes9.fsf@alphaville.bos.redhat.com> References: <871u255cla.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkzTZ-0006ag-MA for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 11:57:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VkzTS-0002ug-Ab for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 11:57:33 -0500 Received: from plane.gmane.org ([80.91.229.3]:55893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkzTR-0002tZ-TE for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 11:57:26 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VkzTQ-0000UW-EP for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 17:57:24 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Nov 2013 17:57:24 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Nov 2013 17:57:24 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nick Dokos writes: > York Zhao 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