From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Refresh buffer properties and local variables Date: Tue, 19 Nov 2013 22:26:07 -0500 Message-ID: <878uwj3ga8.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViyQs-0002P7-OB for emacs-orgmode@gnu.org; Tue, 19 Nov 2013 22:26:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ViyQm-0008II-JN for emacs-orgmode@gnu.org; Tue, 19 Nov 2013 22:26:26 -0500 Received: from plane.gmane.org ([80.91.229.3]:40150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViyQm-0008I9-D1 for emacs-orgmode@gnu.org; Tue, 19 Nov 2013 22:26:20 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ViyQk-0007Zk-9b for emacs-orgmode@gnu.org; Wed, 20 Nov 2013 04:26:18 +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 ; Wed, 20 Nov 2013 04:26:18 +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 ; Wed, 20 Nov 2013 04:26:18 +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 tsd@tsdye.com (Thomas S. Dye) writes: > Aloha all, > > I just discovered that refreshing buffer properties, C-c C-c at the top > of my Org mode file, resets Local Variables to their default values (I > think). At any rate, the Local Variables I set at the end of the file > are changed by refreshing buffer properties. > Indeed: by the time org-mode is called, the variables have been forgotten. > Is this intended? > I doubt it. > I end up running M-x normal-mode afterwards, which is sometimes > difficult to remember. > Looking at what normal-mode does, I came up with the following hack. Does it fix things for you? --8<---------------cut here---------------start------------->8--- diff --git a/lisp/org.el b/lisp/org.el index febee75..caf0348 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5512,7 +5512,8 @@ 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))) + (set-face-foreground 'org-hide (org-find-invisible-foreground)) + (hack-local-variables)) ;; Update `customize-package-emacs-version-alist' (add-to-list 'customize-package-emacs-version-alist --8<---------------cut here---------------end--------------->8--- -- Nick