emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Refresh buffer properties and local variables


From: Nick Dokos
Subject: Re: [O] Refresh buffer properties and local variables
Date: Tue, 19 Nov 2013 22:26:07 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

address@hidden (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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]