From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Refresh buffer properties and local variables Date: Thu, 21 Nov 2013 00:37:01 -0500 Message-ID: <87eh6a1fk2.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjMx9-0002ni-1i for emacs-orgmode@gnu.org; Thu, 21 Nov 2013 00:37:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjMx2-0000xx-Si for emacs-orgmode@gnu.org; Thu, 21 Nov 2013 00:37:22 -0500 Received: from plane.gmane.org ([80.91.229.3]:49337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjMx2-0000xk-LW for emacs-orgmode@gnu.org; Thu, 21 Nov 2013 00:37:16 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VjMwy-00032w-B0 for emacs-orgmode@gnu.org; Thu, 21 Nov 2013 06:37:12 +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 ; Thu, 21 Nov 2013 06:37:12 +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 ; Thu, 21 Nov 2013 06:37:12 +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 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. > > Is this intended? > > I end up running M-x normal-mode afterwards, which is sometimes > difficult to remember. > > All the best, > Tom Patch attached. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Ensure-that-file-local-variables-are-set.patch Content-Description: Patch to ensure that file local variables are set properly >From 5ea02285bacb9592b20c95d4797ca7c2ec68ecac Mon Sep 17 00:00:00 2001 From: Nick Dokos Date: Thu, 21 Nov 2013 00:30:05 -0500 Subject: [PATCH] Ensure that file local variables are set * lisp/org.el (org-mode): Call `hack-local-variables' at the end of `org-mode' to set file local variables. Cribbed from `normal-mode'. Reported by Tom Dye: C-c C-c on e.g an #+OPTIONS line would lose file local variable settings. --- lisp/org.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index febee75..8539f51 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5512,7 +5512,10 @@ 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)) + ;; Make sure that file local variables are set. + (report-errors "File local-variables error: %s" + (hack-local-variables))) ;; Update `customize-package-emacs-version-alist' (add-to-list 'customize-package-emacs-version-alist -- 1.8.3.101.g727a46b --=-=-= Content-Type: text/plain -- Nick --=-=-=--