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 23:53:38 -0500 Message-ID: <87li0b4vcd.fsf@gmail.com> References: <871u255cla.fsf@gmail.com> <878uwcbes9.fsf@alphaville.bos.redhat.com> <87pppn4wg2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlAes-0006QS-Fj for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 23:54:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlAej-0005FD-KZ for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 23:53:58 -0500 Received: from plane.gmane.org ([80.91.229.3]:44464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlAej-0005F9-D7 for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 23:53:49 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VlAei-0007HZ-3V for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 05:53:48 +0100 Received: from pool-108-7-96-134.bstnma.fios.verizon.net ([108.7.96.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Nov 2013 05:53:48 +0100 Received: from ndokos by pool-108-7-96-134.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Nov 2013 05:53:48 +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 --=-=-= Content-Type: text/plain Nick Dokos writes: > The best solution I can think of so far: revert commit 5ea0228, > and change org-mode-restart to call normal-mode, instead of org-mode. > normal-mode splits the setting of the mode from the setting of local > variables, so it would avoid the recursion. > > I think (but I have not verified yet) that this would fix both the > problem that gave rise to commit 5ea0228 in the first place and this > bottomless recursion, without causing any other problems. I'll try it > out tomorrow if I find the time and submit a patch. Patch attached. It passed the two tests, but I have not done anything more. Can both interested parties (York Zhao and Tom Dye) please test it and let me know of any problems? --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=local-vars.patch Content-Description: Patch to set file local variables (second try) diff --git a/lisp/org.el b/lisp/org.el index 7a4d244..677d298 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5512,10 +5512,7 @@ The following commands are available: (unless org-inhibit-startup-visibility-stuff (org-set-startup-visibility)))) ;; Try to set org-hide correctly - (set-face-foreground 'org-hide (org-find-invisible-foreground)) - ;; Make sure that file local variables are set. - (report-errors "File local-variables error: %s" - (hack-local-variables))) + (set-face-foreground 'org-hide (org-find-invisible-foreground))) ;; Update `customize-package-emacs-version-alist' (add-to-list 'customize-package-emacs-version-alist @@ -20469,7 +20466,8 @@ This command does many different things, depending on context: "Restart Org-mode, to scan again for special lines. Also updates the keyword regular expressions." (interactive) - (org-mode) + ;; this will set the mode *and* set file local variables. + (normal-mode) (message "Org-mode restarted")) (defun org-kill-note-or-show-branches () --=-=-= Content-Type: text/plain Thanks, -- Nick --=-=-=--