emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* What is a good way to get some source blocks to inherit file local variables? lexical-binding specifically
@ 2015-08-18  1:26 Grant Rettke
  0 siblings, 0 replies; only message in thread
From: Grant Rettke @ 2015-08-18  1:26 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

Good evening,

I am working on an Org document. It is mostly Emacs Lisp source blocks.
I set `lexical-binding' to `t' in the Org document. My goal was that
when I entered source-block-buffers that they would inherit that
property. They don't. I wanted that setting to get inherited because the
document is tangled into Emacs-Lisp files that have the property set.

Emacs: `24.4.1'.

Org-Mode: `8.3.1'. Obtained from Git. Latest.

The init file looks like this:

✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂
;; -*- lexical-binding: t -*- (setq load-prefer-newer t) (add-to-list
'load-path "~/src/org-mode/lisp") (add-to-list 'load-path
"~/src/org-mode/contrib/lisp") (setq org-list-allow-alphabetical t)
(require 'org) (setq org-babel-noweb-wrap-start "«") (setq
org-babel-noweb-wrap-end "»")
✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂

I start it like this: `open /Applications/Emacs.app --args --quick
--load ~/src/help/.org-mode-ecm.emacs.el'

A file that I am working on for example follows:

# ✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂
# -*- lexical-binding: t -*-

#+BEGIN_SRC emacs-lisp
lexical-binding
#+END_SRC

#+RESULTS:

# ✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂✂

When I enter the source block and evaluate it with
`org-babel-execute-src-block' the result it is nil. That is consistent
with inspecting it's value.

What is a good way to get some source blocks to inherit file local
variables?

Sincerely,

gcr

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-18  1:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-18  1:26 What is a good way to get some source blocks to inherit file local variables? lexical-binding specifically Grant Rettke

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).