emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Refresh buffer properties and local variables
Date: Tue, 19 Nov 2013 22:26:07 -0500	[thread overview]
Message-ID: <878uwj3ga8.fsf@gmail.com> (raw)
In-Reply-To: m1bo1f4z3x.fsf@poto.westell.com

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

  reply	other threads:[~2013-11-20  3:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20  1:54 Refresh buffer properties and local variables Thomas S. Dye
2013-11-20  3:26 ` Nick Dokos [this message]
2013-11-20 18:28   ` Thomas S. Dye
2013-11-20 18:38     ` Bastien
2013-11-20 19:47       ` Nick Dokos
2013-11-21  5:37 ` Nick Dokos
2013-11-21  7:13   ` Bastien
2013-11-21 13:51     ` Nick Dokos
2013-11-21 17:08       ` Thomas S. Dye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878uwj3ga8.fsf@gmail.com \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).