emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Grant Rettke <gcr@wisdomandwonder.com>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: What is a good way to get some source blocks to inherit file local variables? lexical-binding specifically
Date: Mon, 17 Aug 2015 20:26:19 -0500	[thread overview]
Message-ID: <CAAjq1md-_1rQRct5pFvn1zV_XxgQAZ+LtyTE7V49P+bt-xBYTQ@mail.gmail.com> (raw)

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

                 reply	other threads:[~2015-08-18  1:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CAAjq1md-_1rQRct5pFvn1zV_XxgQAZ+LtyTE7V49P+bt-xBYTQ@mail.gmail.com \
    --to=gcr@wisdomandwonder.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).